diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-09-09 13:12:16 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-09-09 16:09:39 +0200 |
commit | 4e3e65087c2b7b88ed9f08a4f8ca3dcc9245eafa (patch) | |
tree | e16980dee0788c522452dbaa5225f8f9fdb988f7 /drawinglayer | |
parent | a0d2e45f2efbe4e82b78c777d21b5eabec3a0924 (diff) |
Move the validity check before color manipulations
Change-Id: Id4a7a15b7b88df888d2cd224e375c839c59b882f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102301
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 148017cc2408..042ca9d765cd 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -135,6 +135,10 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( rTextCandidate.getFontAttribute(), aFontScaling.getX(), aFontScaling.getY(), fRotate, rTextCandidate.getLocale())); + // Don't draw fonts without height + if (aFont.GetFontHeight() <= 0) + return; + // set FillColor Attribute const Color aFillColor(rTextCandidate.getTextFillColor()); if (aFillColor != COL_TRANSPARENT) @@ -143,10 +147,6 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( aFont.SetTransparent(false); } - // Don't draw fonts without height - if (aFont.GetFontHeight() <= 0) - return; - // handle additional font attributes const primitive2d::TextDecoratedPortionPrimitive2D* pTCPP = dynamic_cast<const primitive2d::TextDecoratedPortionPrimitive2D*>( |