sd/source/filter/eppt/pptx-epptooxml.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit c5eb2b9def1c1d189da71d8bb27f9fddd0a63ef7 Author: Karthik Godha <[email protected]> AuthorDate: Tue Oct 21 19:09:45 2025 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Wed Oct 22 19:50:42 2025 +0200 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]> diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index a3f72667012d..9df144934297 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -958,6 +958,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);
