vcl/quartz/salgdicommon.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 77638038470a93d30a82f2ece86b89eda82696f9 Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Mar 25 09:40:51 2020 +0200 Commit: Tor Lillqvist <[email protected]> CommitDate: Wed Mar 25 19:36:56 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 <[email protected]> Reviewed-by: Tor Lillqvist <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91031 Tested-by: Jenkins diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 4ca5eede4578..6489b33d1fd9 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -935,7 +935,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(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
