sd/source/filter/eppt/pptx-epptooxml.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 618daf04009ede9f6989e1739afbb1bec7ca474c Author: Karthik Godha <[email protected]> AuthorDate: Tue Oct 21 19:09:45 2025 +0530 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Oct 30 11:35:56 2025 +0100 tdf#168773: PPT->PPTX incorrect background in XML While exporting to PPTX check whether BITMAP filltypes have graphic content before starting <p:bgPr> element Change-Id: I5dfd57538fbd3f8c834495ba76535c641b7fa06f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192795 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit c5eb2b9def1c1d189da71d8bb27f9fddd0a63ef7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193074 Tested-by: Jenkins Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193134 diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 217acd8f10bc..8e939ec201fd 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -952,6 +952,12 @@ void PowerPointExport::ImplWriteBackground(const FSHelperPtr& pFS, const Referen aFillStyle == FillStyle_HATCH) return; + // For BITMAP fill style, check if graphic is valid before writing bgPr + if (aFillStyle == FillStyle_BITMAP + && (!ImplGetPropertyValue(rXPropSet, u"FillBitmap"_ustr) + || !mAny.has<uno::Reference<graphic::XGraphic>>())) + return; + pFS->startElementNS(XML_p, XML_bg); pFS->startElementNS(XML_p, XML_bgPr);
