[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - vcl/win

Armin Le Grand (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 5 06:52:42 UTC 2019


 vcl/win/gdi/gdiimpl.cxx |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit f101de99ff7d23b7e4316cfe463a3a7f6dc5dc07
Author:     Armin Le Grand <Armin.Le.Grand at me.com>
AuthorDate: Fri Jan 11 17:59:59 2019 +0100
Commit:     Juergen Funk (CIB) <juergen.funk_ml at cib.de>
CommitDate: Thu Sep 5 08:51:38 2019 +0200

    tdf#122384 Added isPrinter support to WinSalGraphicsImpl::drawPolyLine
    
    trac#29436
    
    As already guessed but not been sure (see 'One more hint'
    in WinSalGraphicsImpl::drawPolyPolygon) the strange WinGDI
    transform is also needed when printing for WinSalGraphicsImpl::
    drawPolyLine.
    
    Change-Id: I39f89eac0c17e524949221306723a355c6e94a17
    Reviewed-on: https://gerrit.libreoffice.org/66190
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <Armin.Le.Grand at cib.de>
    (cherry picked from commit 6e3c4ae8bca898700cde9caaff43c3a8a61eebc2)
    Reviewed-on: https://gerrit.libreoffice.org/78623
    Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>
    Tested-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>

diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index 69da79a8a4a4..ffbde0a37cb1 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -2318,6 +2318,21 @@ bool WinSalGraphicsImpl::drawPolyLine(
         aGraphics.SetSmoothingMode(Gdiplus::SmoothingModeNone);
     }
 
+    if(mrParent.isPrinter())
+    {
+        // tdf#122384 As metioned above in WinSalGraphicsImpl::drawPolyPolygon
+        // (look for 'One more hint: This *may* also be needed now in'...).
+        // See comments in same spot above *uregntly* before doing changes here,
+        // these comments are *still fully valid* at this place (!)
+        const Gdiplus::REAL aDpiX(aGraphics.GetDpiX());
+        const Gdiplus::REAL aDpiY(aGraphics.GetDpiY());
+
+        aGraphics.ScaleTransform(
+            Gdiplus::REAL(100.0) / aDpiX,
+            Gdiplus::REAL(100.0) / aDpiY,
+            Gdiplus::MatrixOrderAppend);
+    }
+
     aGraphics.DrawPath(
         &aPen,
         &(*pGraphicsPath));


More information about the Libreoffice-commits mailing list