diff options
Diffstat (limited to 'oox/source/export/drawingml.cxx')
-rw-r--r-- | oox/source/export/drawingml.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 85e73eb35c85..387bbf5c8d6d 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2299,6 +2299,23 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool 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); + } } } |