[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/quartz
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 18 06:46:54 UTC 2020
vcl/quartz/salgdicommon.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 0265a4803f72291d467eaafdace8fd435a833b0b
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Mar 25 09:40:51 2020 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon May 18 08:46:21 2020 +0200
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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94230
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 19f74464622b..9317cc400f28 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -902,7 +902,12 @@ bool AquaSalGraphics::drawPolyLine(
CGContextSetAlpha( maContextHolder.get(), 1.0 - fTransparency );
CGContextSetLineJoin( maContextHolder.get(), aCGLineJoin );
CGContextSetLineCap( maContextHolder.get(), aCGLineCap );
- CGContextSetLineWidth( maContextHolder.get(), aLineWidths.getX() );
+
+ // aLineWidths.getX() can be negative here. That causes a warning that shows up in the debugger.
+ if (aLineWidths.getX() > 0)
+ {
+ CGContextSetLineWidth( maContextHolder.get(), aLineWidths.getX() );
+ }
CGContextSetMiterLimit(maContextHolder.get(), fCGMiterLimit);
CGContextDrawPath( maContextHolder.get(), kCGPathStroke );
maContextHolder.restoreState();
More information about the Libreoffice-commits
mailing list