[Libreoffice-commits] core.git: 2 commits - vcl/README vcl/source

Jan Holesovsky kendy at collabora.com
Wed Nov 30 14:47:16 UTC 2016


 vcl/README                   |    4 ++++
 vcl/source/outdev/bitmap.cxx |    6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit be5369e7aa426be8b88776f58aaaba1ae926229c
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Nov 30 15:38:38 2016 +0100

    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

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index ca736ed..e536b22 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 );
commit 91233ba8c67579987719bbfc96972eccc52c04bc
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Nov 30 14:15:29 2016 +0100

    vcl: Mention VCL_DEBUG_DISABLE_PDFCOMPRESSION in the README.
    
    Change-Id: I53dfebf6dc481beb02fa52b1fa6434b56f37f8ae

diff --git a/vcl/README b/vcl/README
index d995cdc..c7c1f9e 100644
--- a/vcl/README
+++ b/vcl/README
@@ -196,6 +196,10 @@ generated the following PDF content.
 
 touch vcl/source/gdi/pdfwriter* && make vcl dbglevel=3
 
+The compression can be disabled even using a env. var:
+
+export VCL_DEBUG_DISABLE_PDFCOMPRESSION=1
+
 To de-compress the contents of a PDF file written by a release build or
 other programs, use the "pdfunzip" tool:
 


More information about the Libreoffice-commits mailing list