cppcanvas/source/mtfrenderer/emfplus.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
New commits: commit 508fc36db06172388b205053f41a3a1d3326920b Author: Patrick Jaap <patrick.j...@tu-dresden.de> AuthorDate: Fri Oct 13 11:31:28 2017 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Mar 13 16:49:30 2020 +0100 tdf#31814 Fix for EMF+ DrawString and DrawImage DrawString: The value 'fontAttribute' is optional and may be null, results in missing characters. DrawImage: The case of 'metafile' was missing and leads to low resolution rendering. (cherry picked from commit 52a2a0101f71b21876f17d5419132ffa27f6e35d) Conflicts: drawinglayer/source/tools/emfphelperdata.cxx Change-Id: I81566d884975fda832f4a5af6663c837f355c383 diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 00ca97a2d10c..710376b5d9e4 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1236,7 +1236,16 @@ namespace cppcanvas } if (bValid) { - BitmapEx aBmp( image.graphic.GetBitmapEx () ); + BitmapEx aBmp; + if (image.type == 1) // Bitmap + { + aBmp = image.graphic.GetBitmapEx(); + } + else if (image.type == 2) // Metafile + { + GraphicConversionParameters aParameters(Size(aDstSize.getX(), aDstSize.getY())); + aBmp = image.graphic.GetBitmapEx(aParameters); + } aBmp.Crop( aSource ); Size aSize( aBmp.GetSizePixel() ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits