sd/qa/unit/export-tests-ooxml1.cxx | 14 ++++++++++++++ sd/source/filter/eppt/pptx-epptooxml.cxx | 10 +++++++++- 2 files changed, 23 insertions(+), 1 deletion(-)
New commits: commit 554b01c9f91fcc6d8c188ef3dc511b4d9c18b7e7 Author: Tibor Nagy <nagy.tib...@nisz.hu> AuthorDate: Mon Jan 3 17:18:57 2022 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Feb 1 10:58:21 2022 +0100 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 <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> (cherry picked from commit b1865ecd67a4ea791ac24e3234d4ad3d2be9d1e3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129247 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 9efb79ae9cf1..3b50dcf0b793 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -61,6 +61,7 @@ using namespace css; class SdOOXMLExportTest1 : public SdModelTestBaseXML { public: + void testTdf130165(); void testTdf124781(); void testTdf144914(); void testTdf124232(); @@ -128,6 +129,7 @@ public: CPPUNIT_TEST_SUITE(SdOOXMLExportTest1); + CPPUNIT_TEST(testTdf130165); CPPUNIT_TEST(testTdf124781); CPPUNIT_TEST(testTdf144914); CPPUNIT_TEST(testTdf124232); @@ -222,6 +224,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 1e175d8bc564..0bc49e4a63ac 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);