summaryrefslogtreecommitdiff
path: root/sd/qa/unit/export-tests-ooxml2.cxx
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-10-17 22:14:38 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2017-10-19 21:02:07 +0200
commit98133504fde1e1b235c39e4bb3b72bb2ee0b7819 (patch)
treea40a89027bf64ac74fa9a3a76b0989e8bd679c7f /sd/qa/unit/export-tests-ooxml2.cxx
parent278bdbca318defa3bb862e0422cff2492ef46705 (diff)
PPTX export: remember color schemes in theme
Remember color scheme from loaded pptx file or use default values. Change-Id: Icb69c51603afc5f332c20c75e4ed5f659f4b5614 Reviewed-on: https://gerrit.libreoffice.org/43470 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sd/qa/unit/export-tests-ooxml2.cxx')
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 25a1963c8e75..586700e39863 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -120,6 +120,7 @@ public:
void testGroupRotation();
void testTdf104788();
void testSmartartRotation2();
+ void testAccentColor();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
@@ -165,6 +166,7 @@ public:
CPPUNIT_TEST(testGroupRotation);
CPPUNIT_TEST(testTdf104788);
CPPUNIT_TEST(testSmartartRotation2);
+ CPPUNIT_TEST(testAccentColor);
CPPUNIT_TEST_SUITE_END();
@@ -1255,6 +1257,23 @@ void SdOOXMLExportTest2::testSmartartRotation2()
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[1]/p:spPr/a:xfrm/a:off", "y", "719640");
}
+void SdOOXMLExportTest2::testAccentColor()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/accent-color.pptx"), PPTX);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+ xDocShRef->DoClose();
+
+ xmlDocPtr pXmlDocContent1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp/p:style/a:fillRef/a:schemeClr", "val", "accent6");
+ xmlDocPtr pXmlDocContent2 = parseExport(tempFile, "ppt/slides/slide2.xml");
+ assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:spTree/p:sp/p:style/a:fillRef/a:schemeClr", "val", "accent6");
+ xmlDocPtr pXmlDocTheme1 = parseExport(tempFile, "ppt/theme/theme1.xml");
+ assertXPath(pXmlDocTheme1, "/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr", "val", "70ad47");
+ xmlDocPtr pXmlDocTheme2 = parseExport(tempFile, "ppt/theme/theme2.xml");
+ assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr", "val", "deb340");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
CPPUNIT_PLUGIN_IMPLEMENT();