cppcanvas/source/mtfrenderer/emfplus.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit b3d47a1a2f4a5c5ad6c5eb9d34304cb8dac85622
Author: Aron Budea <[email protected]>
Date:   Sat Nov 4 14:36:02 2017 +0100

    EMF+: Restrict cropping to bitmap types
    
    Some EMF+ metafiles were incorrectly cropped.
    
    Regression from f115ec6ce1ff4bf6e68ceb441f716a4c70ecfdf6.
    
    Change-Id: I1bba0263cb999a0ed11feb25aaefc7b0416460be

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 76cdd7ee8a54..22bfee8183b2 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -2166,7 +2166,9 @@ namespace cppcanvas
 
                                 if (bValid) {
                                     BitmapEx aBmp( image.graphic.GetBitmapEx 
() );
-                                    aBmp.Crop( aSource );
+                                    if (image.type == 1) { // Bitmap
+                                      aBmp.Crop( aSource );
+                                    }
 
                                     Size aSize( aBmp.GetSizePixel() );
                                     SAL_INFO("cppcanvas.emf", "EMF+ bitmap 
size: " << aSize.Width() << "x" << aSize.Height());
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to