summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-11-30 15:38:38 +0100
committerJan Holesovsky <kendy@collabora.com>2016-11-30 16:03:40 +0100
commit9ab5f1bf616080c49829e58f1390b9f0c65965f9 (patch)
tree200a0271a376ffaf53b71fd309c98cb44f668c35 /vcl/source/outdev
parent8266787540b64396d6f0864a9d2bced0e40a8f1b (diff)
tdf#103747: Don't re-position images when re-playing a metafile.
I am not sure it's a good idea to re-position them at all; but for the moment don't do that only with the metafiles, as I am not sure what the other consequences could be. Change-Id: I50e50663149f7879ddc86149d92d44cf2d5df40d (cherry picked from commit be5369e7aa426be8b88776f58aaaba1ae926229c)
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/bitmap.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index ca736ed3db4a..e536b22ec5b3 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1188,6 +1188,7 @@ void OutputDevice::DrawTransformedBitmapEx(
const bool bMirroredY(basegfx::fTools::less(aScale.getY(), 0.0));
static bool bForceToOwnTransformer(false);
+ const bool bMetafile = mpMetaFile != nullptr;
if(!bForceToOwnTransformer && !bRotated && !bSheared && !bMirroredX && !bMirroredY)
{
@@ -1199,14 +1200,14 @@ void OutputDevice::DrawTransformedBitmapEx(
basegfx::fround(aScale.getX() + aTranslate.getX()) - aDestPt.X(),
basegfx::fround(aScale.getY() + aTranslate.getY()) - aDestPt.Y());
const Point aOrigin = GetMapMode().GetOrigin();
- if (comphelper::LibreOfficeKit::isActive() && GetMapMode().GetMapUnit() != MapUnit::MapPixel)
+ if (!bMetafile && comphelper::LibreOfficeKit::isActive() && GetMapMode().GetMapUnit() != MapUnit::MapPixel)
{
aDestPt.Move(aOrigin.getX(), aOrigin.getY());
EnableMapMode(false);
}
DrawBitmapEx(aDestPt, aDestSize, rBitmapEx);
- if (comphelper::LibreOfficeKit::isActive() && GetMapMode().GetMapUnit() != MapUnit::MapPixel)
+ if (!bMetafile && comphelper::LibreOfficeKit::isActive() && GetMapMode().GetMapUnit() != MapUnit::MapPixel)
{
EnableMapMode();
aDestPt.Move(-aOrigin.getX(), -aOrigin.getY());
@@ -1218,7 +1219,6 @@ void OutputDevice::DrawTransformedBitmapEx(
// created transformed bitmap
const bool bInvert(RasterOp::Invert == meRasterOp);
const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap | DrawModeFlags::GhostedBitmap));
- const bool bMetafile(mpMetaFile);
bool bDone(false);
const basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * rTransformation);
const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile );