[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - vcl/source
Caolán McNamara
caolanm at redhat.com
Thu Jan 26 14:03:39 UTC 2017
vcl/source/filter/wmf/emfwr.cxx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit c9f5d8e189fec339d6c3d1a476fc42ef078bf273
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 25 16:51:00 2017 +0000
Resolves: tdf#94457 our EmfPlusSetPageTransform is malformed
we write a single short, resulting in a record of 0x000C in length MS-EMFPLUS
spec has EmfPlusSetPageTransform as 0x0010 in length because we're not writing
the 4 byte PageScale value.
the previous pageunit unit we are writing is of value 1, which is
UnitTypeDisplay, the same spec says...
"The unit of measure for page space coordinates, from the UnitType enumeration.
This value SHOULD NOT be UnitTypeDisplay or UnitTypeWorld"
and footnotes that with...
"Windows never writes those values to the PageUnit field, but they are accepted
with undefined results."
Change-Id: Ic8b5ec463b59aab28ae9897947dfcdbd35b22048
Reviewed-on: https://gerrit.libreoffice.org/33559
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index dda3d56..6bcd461 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -102,8 +102,7 @@ enum class EmfPlusRecordType
SetAntiAliasMode = 0x401E,
SetInterpolationMode = 0x4021,
SetPixelOffsetMode = 0x4022,
- SetCompositingQuality = 0x4024,
- SetPageTransform = 0x4030,
+ SetCompositingQuality = 0x4024
};
void EMFWriter::ImplBeginCommentRecord( sal_Int32 nCommentType )
@@ -190,7 +189,6 @@ void EMFWriter::WriteEMFPlusHeader( const Size &rMtfSizePix, const Size &rMtfSiz
ImplPlusRecord( EmfPlusRecordType::SetPixelOffsetMode, 0x0 );
ImplPlusRecord( EmfPlusRecordType::SetAntiAliasMode, 0x09 ); // TODO: Check actual values for AntiAlias
ImplPlusRecord( EmfPlusRecordType::SetCompositingQuality, 0x0100 ); // Default Quality
- ImplPlusRecord( EmfPlusRecordType::SetPageTransform, 1 );
ImplPlusRecord( EmfPlusRecordType::SetInterpolationMode, 0x00 ); // Default
ImplPlusRecord( EmfPlusRecordType::GetDC, 0x00 );
ImplEndCommentRecord();
More information about the Libreoffice-commits
mailing list