diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-25 16:51:00 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-25 20:28:50 +0000 |
commit | 3d92c34d0a4db27435458e0f3dd50709622388a9 (patch) | |
tree | d32e8488c4cce44f5c3867ffd54f62f470f91faf /vcl | |
parent | 88a3b62194d07bb64bfd2fc186097441dc93dfa3 (diff) |
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/33548
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/wmf/emfwr.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 947d1392e30f..7eb9c63103bb 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(); |