summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Le Grand (Collabora) <armin.le.grand@me.com>2020-02-22 16:38:50 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-02-24 14:39:38 +0100
commit1c62465ff27a5721fac7f60798e8d674fefdd2aa (patch)
tree98d87ab8346b77f172c47dcc03cad0e6cc4ac22c
parenteea0bc558fc1ac8d5c1537df2cf95f73720f3620 (diff)
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.Grand@me.com> (cherry picked from commit f1d6788fe1767f97e3ca2c67c7415f8c18c3d618) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89340 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--vcl/source/outdev/bitmap.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 7fe75ec21a14..4aba910cf599 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1230,7 +1230,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))
{
@@ -1277,7 +1280,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))
{
@@ -1316,7 +1322,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)
{