vcl/source/outdev/bitmap.cxx |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit f1d6788fe1767f97e3ca2c67c7415f8c18c3d618
Author:     Armin Le Grand (Collabora) <armin.le.gr...@me.com>
AuthorDate: Sat Feb 22 16:38:50 2020 +0100
Commit:     Armin Le Grand <armin.le.gr...@me.com>
CommitDate: Sat Feb 22 17:43:44 2020 +0100

    tdf#130768 need to use mnOutOffX/mnOutOffY
    
    in OutputDevice local stuff when want to get
    to pixel coordiantes. These are not often used
    local members of OutputDevice specially used
    in fake-Windows as internal windows offset.
    Thus there is the protected internal replacement
    ImplGetDeviceTransformation() for the usually
    used GetViewTransformation().
    A very problematic thing - we should in principle
    add this to GetViewTransformation() but I am sure
    that this will lead to other problems - argh!
    
    Change-Id: Ibedc3a7d6eb3f17c266082729872b81f607836a5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89259
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <armin.le.gr...@me.com>

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 9821fa0aade5..719c9e6e0b2a 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1222,7 +1222,10 @@ void OutputDevice::DrawTransformedBitmapEx(
 
     if(bAllowPreferDirectPaint && bTryDirectPaint)
     {
-        const basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * 
rTransformation);
+        // tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough 
here, it may
+        // be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned 
at
+        // ImplGetDeviceTransformation declaration
+        const basegfx::B2DHomMatrix 
aFullTransform(ImplGetDeviceTransformation() * rTransformation);
 
         if(DrawTransformBitmapExDirect(aFullTransform, rBitmapEx))
         {
@@ -1269,7 +1272,10 @@ void OutputDevice::DrawTransformedBitmapEx(
     // to specify order of executions, so give bTryDirectPaint a call
     if(bTryDirectPaint)
     {
-        const basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * 
rTransformation);
+        // tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough 
here, it may
+        // be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned 
at
+        // ImplGetDeviceTransformation declaration
+        const basegfx::B2DHomMatrix 
aFullTransform(ImplGetDeviceTransformation() * rTransformation);
 
         if(DrawTransformBitmapExDirect(aFullTransform, rBitmapEx))
         {
@@ -1308,7 +1314,10 @@ void OutputDevice::DrawTransformedBitmapEx(
     const double fOrigArea(rOriginalSizePixel.Width() * 
rOriginalSizePixel.Height() * 0.5);
     const double fOrigAreaScaled(fOrigArea * 1.44);
     double fMaximumArea(std::min(4500000.0, std::max(1000000.0, 
fOrigAreaScaled)));
-    basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * 
rTransformation);
+    // tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough 
here, it may
+    // be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned at
+    // ImplGetDeviceTransformation declaration
+    basegfx::B2DHomMatrix aFullTransform(ImplGetDeviceTransformation() * 
rTransformation);
 
     if(!bMetafile)
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to