summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2021-03-08 17:28:27 +0100
committerRegina Henschel <rb.henschel@t-online.de>2021-03-10 12:33:38 +0100
commitdbbb8cafcb801638bde3b21796eaebfc807acbdc (patch)
tree69a13cc253adb027edef7eb4857187033fe2a60b /sd
parent734f37aaf6027ef2d989b6440370dee46bac0df7 (diff)
tdf#140865 roundtrip pptx wordart 3D, add sp3d
Change-Id: I446ae4e8c9dd5f2fbf3efe289681339f967c515a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112185 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf140865Wordart3D.pptxbin0 -> 17158 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx24
2 files changed, 24 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf140865Wordart3D.pptx b/sd/qa/unit/data/pptx/tdf140865Wordart3D.pptx
new file mode 100644
index 000000000000..e55bc43800b4
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf140865Wordart3D.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 7c3739fa1a7d..1e5f673428c2 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -109,6 +109,7 @@ public:
void testTdf136911();
void testArcTo();
void testNarrationMimeType();
+ void testTdf140865Wordart3D();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest1);
@@ -160,6 +161,7 @@ public:
CPPUNIT_TEST(testTdf136911);
CPPUNIT_TEST(testArcTo);
CPPUNIT_TEST(testNarrationMimeType);
+ CPPUNIT_TEST(testTdf140865Wordart3D);
CPPUNIT_TEST_SUITE_END();
@@ -1380,6 +1382,28 @@ void SdOOXMLExportTest1::testNarrationMimeType()
xDocShRef->DoClose();
}
+void SdOOXMLExportTest1::testTdf140865Wordart3D()
+{
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf140865Wordart3D.pptx"), PPTX);
+ utl::TempFile aTempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &aTempFile);
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "ppt/slides/slide1.xml");
+
+ // without the fix in place a:sp3d was lost on round trip, and so extrusion was lost.
+ constexpr OStringLiteral sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr");
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d", "extrusionH", "342900");
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d", "contourW", "12700");
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelT", "w", "114300");
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelT", "h", "38100");
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelT", "prst", "softRound");
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelB", "h", "152400");
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:extrusionClr/a:srgbClr", "val", "990000");
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:contourClr/a:srgbClr", "val", "009876");
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest1);
CPPUNIT_PLUGIN_IMPLEMENT();