[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/quartz

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Wed Mar 25 08:54:23 UTC 2020


 vcl/quartz/salgdicommon.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 132834e2e9d5c8310ece4adbee84588e41bec35c
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Mar 25 09:40:51 2020 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Mar 25 09:53:50 2020 +0100

    Avoid CGContextSetLineWidth warning about negative line width
    
    Change-Id: I82d37d0277e324e269674ed40592026e0097fa33
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91027
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 684cff1e9bd4..5cc6bb5e4ebc 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -975,7 +975,12 @@ bool AquaSalGraphics::drawPolyLine(
         CGContextSetAlpha( mrContext, 1.0 - fTransparency );
         CGContextSetLineJoin( mrContext, aCGLineJoin );
         CGContextSetLineCap( mrContext, aCGLineCap );
-        CGContextSetLineWidth( mrContext, aLineWidth.getX() );
+
+        // aLineWidth.getX() can be negative here. That causes a warning that shows up in the debugger.
+        if (aLineWidth.getX() > 0)
+        {
+            CGContextSetLineWidth( mrContext, aLineWidth.getX() );
+        }
         CGContextSetMiterLimit(mrContext, fCGMiterLimit);
         SAL_INFO( "vcl.cg", "CGContextDrawPath(" << mrContext << ",kCGPathStroke)" );
         CGContextDrawPath( mrContext, kCGPathStroke );


More information about the Libreoffice-commits mailing list