summaryrefslogtreecommitdiff
path: root/sd/qa/unit/export-tests-ooxml2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit/export-tests-ooxml2.cxx')
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 4d8de84766f0..cdf638d841bd 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -130,6 +130,7 @@ public:
void testTdf107608();
void testTdf111786();
void testFontScale();
+ void testShapeAutofitPPTX();
void testTdf115394();
void testTdf115394Zero();
void testTdf111789();
@@ -195,6 +196,7 @@ public:
CPPUNIT_TEST(testTdf107608);
CPPUNIT_TEST(testTdf111786);
CPPUNIT_TEST(testFontScale);
+ CPPUNIT_TEST(testShapeAutofitPPTX);
CPPUNIT_TEST(testTdf115394);
CPPUNIT_TEST(testTdf115394Zero);
CPPUNIT_TEST(testTdf111789);
@@ -1431,6 +1433,20 @@ void SdOOXMLExportTest2::testFontScale()
xDocShRef->DoClose();
}
+void SdOOXMLExportTest2::testShapeAutofitPPTX()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/testShapeAutofit.pptx"), PPTX);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+ xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ CPPUNIT_ASSERT(pXmlDocContent);
+
+ // TextAutoGrowHeight --> "Resize shape to fit text" --> true
+ assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr/a:spAutoFit", 1);
+ // TextAutoGrowHeight --> "Resize shape to fit text" --> false
+ assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:bodyPr/a:noAutofit", 1);
+}
+
void SdOOXMLExportTest2::testTdf115394()
{
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf115394.pptx"), PPTX);