[Libreoffice-commits] core.git: drawinglayer/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 9 14:10:19 UTC 2020


 drawinglayer/source/processor2d/vclprocessor2d.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4e3e65087c2b7b88ed9f08a4f8ca3dcc9245eafa
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Wed Sep 9 13:12:16 2020 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Sep 9 16:09:39 2020 +0200

    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 at collabora.com>

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*>(


More information about the Libreoffice-commits mailing list