oox/source/ppt/pptshape.cxx | 10 +++++++--- sd/qa/unit/data/pptx/tdf169524.pptx |binary sd/qa/unit/export-tests-ooxml4.cxx | 12 ++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-)
New commits: commit 2201c215642fc93b4c78a7e98c11272938880a05 Author: Karthik Godha <[email protected]> AuthorDate: Mon Dec 8 18:54:06 2025 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Wed Dec 10 09:45:10 2025 +0100 tdf#169559: PPTX import master placeholder styles Master Slide placeholder styles are skipped during import of PPTX Change-Id: I33fdf4e66cd5c2ab461e125c302bcbd2ca2cf14b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195229 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 98385c78e115..10ae157ee1fb 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -238,9 +238,6 @@ void PPTShape::addShape( ::oox::drawingml::ShapeIdMap* pShapeMap ) { SAL_INFO("oox.ppt","add shape id: " << msId << " location: " << ((meShapeLocation == Master) ? "master" : ((meShapeLocation == Slide) ? "slide" : ((meShapeLocation == Layout) ? "layout" : "other"))) << " subtype: " << mnSubType << " service: " << msServiceName); - // only placeholder from layout are being inserted - if ( mnSubType && ( meShapeLocation == Master ) ) - return; OUString sServiceName( msServiceName ); if (sServiceName.isEmpty()) @@ -522,6 +519,13 @@ void PPTShape::addShape( } else setMasterTextListStyle( aMasterTextListStyle ); + if (mnSubType && meShapeLocation == Master) + { + if (getTextBody() && !getTextBody()->isEmpty()) + setTextMasterStyles(rSlidePersist, rFilterBase, sServiceName); + return; + } + Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, bClearText, mpPlaceholder, aTransformation, getFillProperties() ) ); // Apply text properties on placeholder text inside this placeholder shape diff --git a/sd/qa/unit/data/pptx/tdf169524.pptx b/sd/qa/unit/data/pptx/tdf169524.pptx index f1e93c55ca3a..96361fffbef8 100644 Binary files a/sd/qa/unit/data/pptx/tdf169524.pptx and b/sd/qa/unit/data/pptx/tdf169524.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml4.cxx b/sd/qa/unit/export-tests-ooxml4.cxx index 18015db6ac16..fd9b7fd3cfca 100644 --- a/sd/qa/unit/export-tests-ooxml4.cxx +++ b/sd/qa/unit/export-tests-ooxml4.cxx @@ -1671,6 +1671,18 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testFooterIdxConsistency) // - In <>, attribute 'idx' of '//p:sp/p:nvSpPr/p:nvPr/p:ph' incorrect value. } +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf169559) +{ + createSdImpressDoc("pptx/tdf169524.pptx"); + save(u"Impress Office Open XML"_ustr); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); + assertXPath( + pXmlDoc, + "/p:sldMaster/p:cSld/p:spTree/p:sp[2]/p:txBody/a:lstStyle/a:lvl1pPr/a:spcAft/a:spcPts", + "val", u"1701"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
