summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/styles/CommonStylePreviewRenderer.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx
index c23861e92a72..d92aac21d89c 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -335,12 +335,6 @@ bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, Rend
mrOutputDev.DrawRect(aRectangle);
}
- if (maFontColor != COL_AUTO)
- mrOutputDev.SetTextColor(maFontColor);
-
- if (maHighlightColor != COL_AUTO)
- mrOutputDev.SetTextFillColor(maHighlightColor);
-
Point aFontDrawPosition = aRectangle.TopLeft();
aFontDrawPosition.AdjustY(mnBaseLine);
if (eRenderAlign == RenderAlign::CENTER)
@@ -376,10 +370,16 @@ bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, Rend
mrOutputDev.Push(vcl::PushFlags::FONT);
if (oFont)
- {
mrOutputDev.SetFont(*oFont);
+
+ if (maFontColor != COL_AUTO)
+ mrOutputDev.SetTextColor(maFontColor);
+
+ if (maHighlightColor != COL_AUTO)
+ mrOutputDev.SetTextFillColor(maHighlightColor);
+
+ if (oFont)
oFont->QuickDrawText(&mrOutputDev, aFontDrawPosition, rText, nStart, nEnd - nStart, {});
- }
else
mrOutputDev.DrawText(aFontDrawPosition, rText, nStart, nEnd - nStart);