https://bugs.documentfoundation.org/show_bug.cgi?id=142941
--- Comment #16 from Bartosz <[email protected]> --- After fixes the EmfPlusRecordTypeDrawImage record with Bitmap embedded, is displaying fine. The EmfPlusRecordTypeDrawImage record with EMF MetaFile embedded is not displaying correctly. The scale and width/heigh ratio is wrong. Here is the place where is the EmfPlusRecordTypeDrawImage implementation: https://github.com/LibreOffice/core/blob/libreoffice-7-2/drawinglayer/source/tools/emfphelperdata.cxx#L1432 It seems that the EMF MetaFile was not displayed correctly due to an issue in GDIMetaFile creation: GDIMetaFile aGDI(image.graphic.GetGDIMetaFile()); Source code: https://github.com/LibreOffice/core/blob/libreoffice-7-2/drawinglayer/source/tools/emfphelperdata.cxx#L1559-L1566 The ratio (eg. where square becomes rectangle) could be corrected with: aSize = image.graphic.GetGDIMetaFile().GetPrefSize(); double ratio = double(aSize.Width()) / double(aSize.Height()); // ratio 0.63 but unfortunately it doesn't fix the scale (the image could be too small or too large). I think the issue should be resolved in during invocation of image.graphic.GetGDIMetaFile() method itself. -- You are receiving this mail because: You are the assignee for the bug.
