vcl/quartz/salgdicommon.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 0265a4803f72291d467eaafdace8fd435a833b0b Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Mar 25 09:40:51 2020 +0200 Commit: Tor Lillqvist <[email protected]> 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 <[email protected]> Reviewed-by: Tor Lillqvist <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94230 Tested-by: Tor Lillqvist <[email protected]> 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(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
