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

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 15 14:12:16 UTC 2020


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

New commits:
commit 4758a6b9d3ae5df7627a414e5c52d2177375699c
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 Jul 15 16:11:40 2020 +0200

    Avoid CGContextSetLineWidth warning about negative line width
    
    This was already here but was (accidentally?) removed in
    7bb7c4362fff2bb3ea58a372e5e4cb833fa54603.
    
    Change-Id: If838b367884ffa4f8a149008376b74613d06d552
    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>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98828

diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index e926cf17c59e..ac86808147e1 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -933,7 +933,12 @@ bool AquaSalGraphics::drawPolyLine(
         CGContextSetAlpha( maContextHolder.get(), 1.0 - fTransparency );
         CGContextSetLineJoin( maContextHolder.get(), aCGLineJoin );
         CGContextSetLineCap( maContextHolder.get(), aCGLineCap );
-        CGContextSetLineWidth( maContextHolder.get(), aLineWidth.getX() );
+
+        // aLineWidth.getX() can be negative here. That causes a warning that shows up in the debugger.
+        if (aLineWidth.getX() > 0)
+        {
+            CGContextSetLineWidth( maContextHolder.get(), aLineWidth.getX() );
+        }
         CGContextSetMiterLimit(maContextHolder.get(), fCGMiterLimit);
         CGContextDrawPath( maContextHolder.get(), kCGPathStroke );
         maContextHolder.restoreState();


More information about the Libreoffice-commits mailing list