summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-09-18 15:30:59 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2017-09-19 16:22:23 +0200
commitf44aa84331cfa22db6e85e238b6cee698a8d9978 (patch)
treec7d2d6e666f70ad7e7cddedb62a3724e613a1d9d /sd
parentc72a1a74b5b1064fc9cdf9994b11fce26d866e26 (diff)
tdf#112333 PPTX export fill.type & fill.on
Change-Id: I2407d0227e10204354ee69fd9a2af9ca93077221 Reviewed-on: https://gerrit.libreoffice.org/42432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sd')
-rwxr-xr-xsd/qa/unit/data/pptx/tdf112333.pptxbin0 -> 30459 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx24
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx11
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx12
4 files changed, 47 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf112333.pptx b/sd/qa/unit/data/pptx/tdf112333.pptx
new file mode 100755
index 000000000000..c381ed8b353e
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf112333.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 38d39ead02c8..44e335d65a2d 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -108,6 +108,7 @@ public:
void testTdf106867();
void testTdf112280();
void testTdf112088();
+ void testTdf112333();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
@@ -143,6 +144,7 @@ public:
CPPUNIT_TEST(testTdf106867);
CPPUNIT_TEST(testTdf112280);
CPPUNIT_TEST(testTdf112088);
+ CPPUNIT_TEST(testTdf112333);
CPPUNIT_TEST_SUITE_END();
@@ -1068,6 +1070,28 @@ void SdOOXMLExportTest2::testTdf112088()
assertXPathChildren(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:gradFill/a:gsLst", 2);
}
+void SdOOXMLExportTest2::testTdf112333()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf112333.pptx"), PPTX);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+ xDocShRef->DoClose();
+
+ xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+
+ OUString sTo = getXPath(pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set[1]/p:to/p:strVal", "val");
+ CPPUNIT_ASSERT_EQUAL(OUString("solid"), sTo);
+
+ OUString sAttributeName = getXPathContent(pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set[1]/p:cBhvr/p:attrNameLst/p:attrName");
+ CPPUNIT_ASSERT_EQUAL(OUString("fill.type"), sAttributeName);
+
+ sTo = getXPath(pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set[2]/p:to/p:strVal", "val");
+ CPPUNIT_ASSERT_EQUAL(OUString("true"), sTo);
+
+ sAttributeName = getXPathContent(pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set[2]/p:cBhvr/p:attrNameLst/p:attrName");
+ CPPUNIT_ASSERT_EQUAL(OUString("fill.on"), sAttributeName);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 65c8ba385d31..1096019a2ccc 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -1451,6 +1451,17 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const OUStr
aDest += "solid";
}
}
+ else if (rAttributeName == "FillOn")
+ {
+ bool bFillOn;
+ if ( rSourceValue >>= bFillOn )
+ {
+ if ( bFillOn )
+ aDest += "true";
+ else
+ aDest += "false";
+ }
+ }
else if ( rAttributeName == "LineStyle" )
{
css::drawing::LineStyle eLineStyle;
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index f5d39c36ba0c..37ac57f83e40 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -936,6 +936,18 @@ void PowerPointExport::WriteAnimationAttributeName(const FSHelperPtr& pFS, const
pFS->writeEscaped("r");
pFS->endElementNS(XML_p, XML_attrName);
}
+ else if (rAttributeName == "FillStyle")
+ {
+ pFS->startElementNS(XML_p, XML_attrName, FSEND);
+ pFS->writeEscaped("fill.type");
+ pFS->endElementNS(XML_p, XML_attrName);
+ }
+ else if (rAttributeName == "FillOn")
+ {
+ pFS->startElementNS(XML_p, XML_attrName, FSEND);
+ pFS->writeEscaped("fill.on");
+ pFS->endElementNS(XML_p, XML_attrName);
+ }
else
{
SAL_WARN("sd.eppt", "unhandled animation attribute name: " << rAttributeName);