From b50d1a42064c8333926166ec047d3467c83d2fd0 Mon Sep 17 00:00:00 2001 From: Balazs Varga Date: Wed, 21 Aug 2019 16:00:42 +0200 Subject: tdf#127030 PPTX export: keep fixed size of legacy shapes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: László Németh --- sd/qa/unit/data/odp/testLegacyShapeAutofit.odp | Bin 0 -> 13611 bytes sd/qa/unit/export-tests-ooxml2.cxx | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100755 sd/qa/unit/data/odp/testLegacyShapeAutofit.odp (limited to 'sd/qa') diff --git a/sd/qa/unit/data/odp/testLegacyShapeAutofit.odp b/sd/qa/unit/data/odp/testLegacyShapeAutofit.odp new file mode 100755 index 000000000000..16a900b636c8 Binary files /dev/null and b/sd/qa/unit/data/odp/testLegacyShapeAutofit.odp differ 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); -- cgit