diff options
author | Aron Budea <aron.budea@collabora.com> | 2017-11-04 14:36:02 +0100 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2017-11-04 14:36:02 +0100 |
commit | b3d47a1a2f4a5c5ad6c5eb9d34304cb8dac85622 (patch) | |
tree | cdb9e5cfa454982647df0a2ec7c8b9a411196100 /cppcanvas | |
parent | 72276f0248c8e09fad707c500e45c5d027e7efb1 (diff) |
EMF+: Restrict cropping to bitmap types
Some EMF+ metafiles were incorrectly cropped.
Regression from f115ec6ce1ff4bf6e68ceb441f716a4c70ecfdf6.
Change-Id: I1bba0263cb999a0ed11feb25aaefc7b0416460be
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfplus.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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()); |