diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2018-09-05 15:07:48 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2018-09-11 09:55:39 +0200 |
commit | 86b14cc8bd910651cef422a0f7408adc0fc51a17 (patch) | |
tree | 91ca58c7a4af3362d4fa6c24678146f908667eaf /sd | |
parent | 934735795dbddf074c85ae2a9d5d2b358d65e403 (diff) |
tdf#119617 Fix export of Autofit property of shapes to PPTX
With this patch the "Resize shape to fit text" property
(TextAutoGrowHeight-->spAutofit/noAutofit) will be exported
correctly to PPTX format.
Change-Id: I5fa975c6390a17bad30c360b3b17aa944bbe72af
Reviewed-on: https://gerrit.libreoffice.org/60043
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd')
-rwxr-xr-x | sd/qa/unit/data/pptx/testShapeAutofit.pptx | bin | 0 -> 35044 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/testShapeAutofit.pptx b/sd/qa/unit/data/pptx/testShapeAutofit.pptx Binary files differnew file mode 100755 index 000000000000..fd402c01c895 --- /dev/null +++ b/sd/qa/unit/data/pptx/testShapeAutofit.pptx diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index fa994f219d6a..c39f13a490d8 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -172,6 +172,7 @@ public: void testTdf107608(); void testTdf111786(); void testFontScale(); + void testShapeAutofitPPTX(); void testTdf115394(); void testTdf115394Zero(); void testTdf115005(); @@ -251,6 +252,7 @@ public: CPPUNIT_TEST(testTdf107608); CPPUNIT_TEST(testTdf111786); CPPUNIT_TEST(testFontScale); + CPPUNIT_TEST(testShapeAutofitPPTX); CPPUNIT_TEST(testTdf115394); CPPUNIT_TEST(testTdf115394Zero); CPPUNIT_TEST(testTdf115005); @@ -1557,6 +1559,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); |