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

New commits:
commit 132834e2e9d5c8310ece4adbee84588e41bec35c
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Wed Mar 25 09:40:51 2020 +0200
Commit:     Tor Lillqvist <t...@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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tor Lillqvist <t...@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 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to