summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorPriyankaGaikwad <priyanka.gaikwad@synerzip.com>2015-05-07 16:19:38 +0530
committerCaolán McNamara <caolanm@redhat.com>2015-05-15 12:00:34 +0000
commitccf91b9f823c28f2cb08784e4be4157bad40837e (patch)
tree25077b405d07cb6ed5224ade324b9a66368c8eec /sc
parent1ab97fe7a244d091def863a1279e67394167144a (diff)
tdf#74932 FILESAVE: Shapes appear when saving a .XLSX file with filter
Problem Description If the attribute hidden is set and then after exporting it to .xlsx, the shape does not remain hidden. XML Difference Original : <xdr:cNvPr id="2" name="Rectangle 1" hidden="1"/> Roundtrip : <xdr:cNvPr id="0" name="CustomShape 1"></xdr:cNvPr> Change-Id: I2e87a484ea984b56415891fd157995cb49453f76 Reviewed-on: https://gerrit.libreoffice.org/15662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/xlsx/hiddenShape.xlsxbin0 -> 8445 bytes
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/hiddenShape.xlsx b/sc/qa/unit/data/xlsx/hiddenShape.xlsx
new file mode 100644
index 000000000000..3f389096f8ab
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/hiddenShape.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index d42e29eb8357..60b4b5c7dafe 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -143,6 +143,7 @@ public:
void testSheetCondensedCharacterSpace();
void testTextUnderlineColor();
void testSheetRunParagraphProperty();
+ void testHiddenShape();
CPPUNIT_TEST_SUITE(ScExportTest);
CPPUNIT_TEST(test);
@@ -196,6 +197,7 @@ public:
CPPUNIT_TEST(testSheetCondensedCharacterSpace);
CPPUNIT_TEST(testTextUnderlineColor);
CPPUNIT_TEST(testSheetRunParagraphProperty);
+ CPPUNIT_TEST(testHiddenShape);
CPPUNIT_TEST_SUITE_END();
@@ -2630,6 +2632,16 @@ void ScExportTest::testSheetRunParagraphProperty()
xDocSh->DoClose();
}
+void ScExportTest::testHiddenShape()
+{
+ ScDocShellRef xDocSh = loadDoc("hiddenShape.", XLSX);
+ CPPUNIT_ASSERT(xDocSh.Is());
+
+ xmlDocPtr pDoc = XPathHelper::parseExport(&(*xDocSh), m_xSFactory, "xl/drawings/drawing1.xml", XLSX);
+ CPPUNIT_ASSERT(pDoc);
+ assertXPath(pDoc, "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp[1]/xdr:nvSpPr/xdr:cNvPr", "hidden", "1");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();