File bsc1200009.patch of Package libreoffice.26317
Index: libreoffice-7.3.6.2/oox/source/export/drawingml.cxx
===================================================================
--- libreoffice-7.3.6.2.orig/oox/source/export/drawingml.cxx
+++ libreoffice-7.3.6.2/oox/source/export/drawingml.cxx
@@ -2162,6 +2162,22 @@ void DrawingML::WriteRunProperties( cons
// TODO: special handle embossed/engraved
WriteSolidFill(color, nTransparency);
}
+ else if (GetDocumentType() == DOCUMENT_PPTX)
+ {
+ // Resolve COL_AUTO for PPTX since MS Powerpoint doesn't have automatic colors.
+ bool bIsTextBackgroundDark = mbIsBackgroundDark;
+ if (rXShapePropSet.is() && GetProperty(rXShapePropSet, "FillStyle")
+ && mAny.get<FillStyle>() != FillStyle_NONE
+ && GetProperty(rXShapePropSet, "FillColor"))
+ {
+ ::Color aShapeFillColor(ColorTransparency, mAny.get<sal_uInt32>());
+ bIsTextBackgroundDark = aShapeFillColor.IsDark();
+ }
+ if (bIsTextBackgroundDark)
+ WriteSolidFill(COL_WHITE);
+ else
+ WriteSolidFill(COL_BLACK);
+ }
}
}