tdf#125506: use rObjectToDevice if needed

Use same logic as in vcl/unx/generic/gdi/gdiimpl.cxx

Regression from 16091ff88aaab9ba9103c4e369bf79b97f431f40

See https://bugs.documentfoundation.org/show_bug.cgi?id=125506#c13
Thanks to Thorsten Wagner for pinpointing

Change-Id: I7a7a8c4b3355f5621ba1603939a3757cd03e7777
Reviewed-on: https://gerrit.libreoffice.org/73319
Tested-by: Jenkins
Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org>
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 913d2ac..333c23c 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -874,10 +874,15 @@
        return false;
#endif

    // need to check/handle LineWidth when ObjectToDevice transformation is used
    const basegfx::B2DVector aDeviceLineWidths(rObjectToDevice * rLineWidths);
    const bool bCorrectLineWidth(aDeviceLineWidths.getX() < 1.0 && rLineWidths.getX() >= 1.0);
    const basegfx::B2DVector aLineWidths(bCorrectLineWidth ? rLineWidths : aDeviceLineWidths);

    // #i101491# Aqua does not support B2DLineJoin::NONE; return false to use
    // the fallback (own geometry preparation)
    // #i104886# linejoin-mode and thus the above only applies to "fat" lines
    if( (basegfx::B2DLineJoin::NONE == eLineJoin) && (rLineWidths.getX() > 1.3) )
    if( (basegfx::B2DLineJoin::NONE == eLineJoin) && (aLineWidths.getX() > 1.3) )
        return false;

    // Transform to DeviceCoordinates, get DeviceLineWidth, execute PixelSnapHairline
@@ -946,7 +951,7 @@
        CGContextSetAlpha( maContextHolder.get(), 1.0 - fTransparency );
        CGContextSetLineJoin( maContextHolder.get(), aCGLineJoin );
        CGContextSetLineCap( maContextHolder.get(), aCGLineCap );
        CGContextSetLineWidth( maContextHolder.get(), rLineWidths.getX() );
        CGContextSetLineWidth( maContextHolder.get(), aLineWidths.getX() );
        CGContextSetMiterLimit(maContextHolder.get(), fCGMiterLimit);
        SAL_INFO( "vcl.cg", "CGContextDrawPath(" << maContextHolder.get() << ",kCGPathStroke)" );
        CGContextDrawPath( maContextHolder.get(), kCGPathStroke );