summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2022-01-03 17:18:57 +0100
committerLászló Németh <nemeth@numbertext.org>2022-01-31 17:06:40 +0100
commitb1865ecd67a4ea791ac24e3234d4ad3d2be9d1e3 (patch)
treeaeef66510cdd17ce74df352c17e34813a98bd18a /sd
parent44f00ff35c7ea5ed2bfb56fe1abab8c72ead7316 (diff)
tdf#130165 PPTX export: fix master objects visible property
Follow-up to commit 4574a1ea408c2ac30042dca32d02207ec7add4da "tdf#146223 PPTX import: fix master objects visible property". Change-Id: I34e6132837d6c84974f8446978c59226a9a7d2d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127908 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx14
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx10
2 files changed, 23 insertions, 1 deletions
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 7631b3113bbd..76e54f62ea1b 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -48,6 +48,7 @@ using namespace css;
class SdOOXMLExportTest1 : public SdModelTestBaseXML
{
public:
+ void testTdf130165();
void testTdf124781();
void testTdf144914();
void testTdf124232();
@@ -115,6 +116,7 @@ public:
CPPUNIT_TEST_SUITE(SdOOXMLExportTest1);
+ CPPUNIT_TEST(testTdf130165);
CPPUNIT_TEST(testTdf124781);
CPPUNIT_TEST(testTdf144914);
CPPUNIT_TEST(testTdf124232);
@@ -209,6 +211,18 @@ void checkFontAttributes( const SdrTextObj* pObj, ItemValue nVal, sal_uInt32 nId
}
+void SdOOXMLExportTest1::testTdf130165()
+{
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf146223.pptx"), PPTX);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+ xDocShRef->DoClose();
+
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ assertXPath(pXmlDoc, "/p:sld", "showMasterSp", "0");
+}
+
void SdOOXMLExportTest1::testTdf124781()
{
sd::DrawDocShellRef xDocShRef
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index b728278c843f..f6e78d357ead 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1361,6 +1361,7 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum
mpSlidesFSArray[ nPageNum ] = pFS;
const char* pShow = nullptr;
+ const char* pShowMasterShape = nullptr;
if (ImplGetPropertyValue(mXPagePropSet, "Visible"))
{
@@ -1369,7 +1370,14 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum
pShow = "0";
}
- pFS->startElementNS(XML_p, XML_sld, PNMSS, XML_show, pShow);
+ if (ImplGetPropertyValue(mXPagePropSet, "IsBackgroundObjectsVisible"))
+ {
+ bool bShowMasterShape(false);
+ if ((mAny >>= bShowMasterShape) && !bShowMasterShape)
+ pShowMasterShape = "0";
+ }
+
+ pFS->startElementNS(XML_p, XML_sld, PNMSS, XML_show, pShow, XML_showMasterSp, pShowMasterShape);
pFS->startElementNS(XML_p, XML_cSld);