File bsc1200009.patch of Package libreoffice
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index f355964..9d5af4f 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2268,6 +2268,23 @@
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);
+ }
}
}