diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2019-08-21 16:00:42 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-08-22 12:34:37 +0200 |
commit | b50d1a42064c8333926166ec047d3467c83d2fd0 (patch) | |
tree | 78566428c5136fac5390392e0f88e6cd51383e27 /sd/qa | |
parent | 3be72fe233b3e6d7aeb267f6c82d8bf9759b39ef (diff) |
tdf#127030 PPTX export: keep fixed size of legacy shapes
Classical/legacy shapes lost their fixed size by exporting them with the
option "Resize shape to fit text".
Regression from commit 86b14cc8bd910651cef422a0f7408adc0fc51a17
(tdf#119617 Fix export of Autofit property of shapes to PPTX)
Change-Id: Iab67db113edc61f4c94a89ec1bb8df0736c26f21
Reviewed-on: https://gerrit.libreoffice.org/77888
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd/qa')
-rwxr-xr-x | sd/qa/unit/data/odp/testLegacyShapeAutofit.odp | bin | 0 -> 13611 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 18 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/testLegacyShapeAutofit.odp b/sd/qa/unit/data/odp/testLegacyShapeAutofit.odp Binary files differnew file mode 100755 index 000000000000..16a900b636c8 --- /dev/null +++ b/sd/qa/unit/data/odp/testLegacyShapeAutofit.odp diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 9cef83c85ac2..d17122744fdb 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -180,6 +180,7 @@ public: void testTdf111786(); void testFontScale(); void testShapeAutofitPPTX(); + void testLegacyShapeAutofitPPTX(); void testTdf115394(); void testTdf115394Zero(); void testTdf115005(); @@ -274,6 +275,7 @@ public: CPPUNIT_TEST(testTdf111786); CPPUNIT_TEST(testFontScale); CPPUNIT_TEST(testShapeAutofitPPTX); + CPPUNIT_TEST(testLegacyShapeAutofitPPTX); CPPUNIT_TEST(testTdf115394); CPPUNIT_TEST(testTdf115394Zero); CPPUNIT_TEST(testTdf115005); @@ -1653,6 +1655,22 @@ void SdOOXMLExportTest2::testShapeAutofitPPTX() assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:bodyPr/a:noAutofit", 1); } +void SdOOXMLExportTest2::testLegacyShapeAutofitPPTX() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/testLegacyShapeAutofit.odp"), ODP); + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml"); + CPPUNIT_ASSERT(pXmlDocContent); + + // Text in a legacy rectangle + assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr/a:noAutofit", 1); + // Text in (closed) Polygon + assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:bodyPr/a:noAutofit", 1); + // Text in a legacy ellipse + assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[3]/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); |