Kaydet (Commit) 6a91b67b authored tarafından Szymon Kłos's avatar Szymon Kłos

tdf#114848 Don't save empty themes

Change-Id: I7136f5c0bc884a2f9ea945b4e0bc093a5ef2d8df
Reviewed-on: https://gerrit.libreoffice.org/47481Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSzymon Kłos <szymon.klos@collabora.com>
üst d25465ae
......@@ -123,6 +123,7 @@ public:
void testGroupsPosition();
void testGroupsRotatedPosition();
void testAccentColor();
void testTdf114848();
void testTdf68759();
void testTdf90626();
......@@ -173,6 +174,7 @@ public:
CPPUNIT_TEST(testGroupsPosition);
CPPUNIT_TEST(testGroupsRotatedPosition);
CPPUNIT_TEST(testAccentColor);
CPPUNIT_TEST(testTdf114848);
CPPUNIT_TEST(testTdf68759);
CPPUNIT_TEST(testTdf90626);
......@@ -1304,6 +1306,19 @@ void SdOOXMLExportTest2::testAccentColor()
assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr", "val", "deb340");
}
void SdOOXMLExportTest2::testTdf114848()
{
::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf114848.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
xmlDocPtr pXmlDocTheme1 = parseExport(tempFile, "ppt/theme/theme1.xml");
assertXPath(pXmlDocTheme1, "/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val", "1f497d");
xmlDocPtr pXmlDocTheme2 = parseExport(tempFile, "ppt/theme/theme2.xml");
assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val", "1f497d");
}
void SdOOXMLExportTest2::testTdf68759()
{
::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf68759.odp"), ODP);
......
......@@ -2604,6 +2604,9 @@ bool PowerPointExport::WriteColorSchemes(FSHelperPtr pFS, const OUString& rTheme
aGrabBag.getValue(rThemePath) >>= aCurrentTheme;
if (!aCurrentTheme.getLength())
return false;
// Order is important
for (int nId = PredefinedClrSchemeId::dk2; nId != PredefinedClrSchemeId::Count; nId++)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment