summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2019-08-21 16:00:42 +0200
committerXisco Faulí <xiscofauli@libreoffice.org>2019-09-17 15:29:47 +0200
commit3fe3588d6743c27c3734b1b4993f5155c15abe98 (patch)
treeeeb3fb1d9dcbe0cd34661eed6fe95380af4bc3f3 /sd
parentc10fcfa4353801f64f203d11180c11a21b28f75e (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> (cherry picked from commit b50d1a42064c8333926166ec047d3467c83d2fd0) Reviewed-on: https://gerrit.libreoffice.org/79060 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rwxr-xr-xsd/qa/unit/data/odp/testLegacyShapeAutofit.odpbin0 -> 13611 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx18
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
new file mode 100755
index 000000000000..16a900b636c8
--- /dev/null
+++ b/sd/qa/unit/data/odp/testLegacyShapeAutofit.odp
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 5a6fbbd5f7f6..6d29d075c62d 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -175,6 +175,7 @@ public:
void testTdf111786();
void testFontScale();
void testShapeAutofitPPTX();
+ void testLegacyShapeAutofitPPTX();
void testTdf115394();
void testTdf115394Zero();
void testTdf115005();
@@ -267,6 +268,7 @@ public:
CPPUNIT_TEST(testTdf111786);
CPPUNIT_TEST(testFontScale);
CPPUNIT_TEST(testShapeAutofitPPTX);
+ CPPUNIT_TEST(testLegacyShapeAutofitPPTX);
CPPUNIT_TEST(testTdf115394);
CPPUNIT_TEST(testTdf115394Zero);
CPPUNIT_TEST(testTdf115005);
@@ -1644,6 +1646,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);