summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-25 16:51:00 +0000
committerMichael Stahl <mstahl@redhat.com>2017-01-26 14:02:56 +0000
commitc9f5d8e189fec339d6c3d1a476fc42ef078bf273 (patch)
treed4af73d8a2acbe8e86dbf29ee919017dd15cd041
parentb97abc651d22c0657c54713fa21b98604d7a74ea (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/33559 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index dda3d56f7db8..6bcd461842b2 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();