diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx index e26cc5575620..a3163ff4931b 100644 --- a/svx/source/styles/CommonStylePreviewRenderer.cxx +++ b/svx/source/styles/CommonStylePreviewRenderer.cxx @@ -373,6 +373,13 @@ bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, Rend if (maFontColor != COL_AUTO) mrOutputDev.SetTextColor(maFontColor); + else + { + if (maBackgroundColor != COL_AUTO) + mrOutputDev.SetTextColor(maBackgroundColor.IsDark() ? COL_WHITE : COL_BLACK); + else if (maHighlightColor != COL_AUTO) + mrOutputDev.SetTextColor(maHighlightColor.IsDark() ? COL_WHITE : COL_BLACK); + } if (maHighlightColor != COL_AUTO) mrOutputDev.SetTextFillColor(maHighlightColor);