diff options
Diffstat (limited to 'sc/qa/unit/subsequent_export-test.cxx')
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 42921737b08a..ea0792f5acee 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -184,6 +184,7 @@ public: void testTextUnderlineColorXLSX(); void testSheetRunParagraphPropertyXLSX(); void testHiddenShapeXLSX(); + void testShapeAutofitXLSX(); void testHyperlinkXLSX(); void testMoveCellAnchoredShapesODS(); void testMatrixMultiplicationXLSX(); @@ -295,6 +296,7 @@ public: CPPUNIT_TEST(testTextUnderlineColorXLSX); CPPUNIT_TEST(testSheetRunParagraphPropertyXLSX); CPPUNIT_TEST(testHiddenShapeXLSX); + CPPUNIT_TEST(testShapeAutofitXLSX); CPPUNIT_TEST(testHyperlinkXLSX); CPPUNIT_TEST(testMoveCellAnchoredShapesODS); CPPUNIT_TEST(testMatrixMultiplicationXLSX); @@ -3518,6 +3520,20 @@ void ScExportTest::testHiddenShapeXLSX() assertXPath(pDoc, "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp[1]/xdr:nvSpPr/xdr:cNvPr", "hidden", "1"); } +void ScExportTest::testShapeAutofitXLSX() +{ + ScDocShellRef xDocSh = loadDoc("testShapeAutofit.", FORMAT_XLSX); + CPPUNIT_ASSERT(xDocSh.is()); + + xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); + CPPUNIT_ASSERT(pDoc); + + // TextAutoGrowHeight --> "Fit height to text" / "Resize shape to fit text" --> true + assertXPath(pDoc, "/xdr:wsDr/xdr:twoCellAnchor[1]/xdr:sp/xdr:txBody/a:bodyPr/a:spAutoFit", 1); + // TextAutoGrowHeight --> "Fit height to text" / "Resize shape to fit text" --> false + assertXPath(pDoc, "/xdr:wsDr/xdr:twoCellAnchor[2]/xdr:sp/xdr:txBody/a:bodyPr/a:noAutofit", 1); +} + void ScExportTest::testHyperlinkXLSX() { ScDocShellRef xDocSh = loadDoc("hyperlink.", FORMAT_XLSX); |