diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-23 16:40:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-23 16:44:56 +0100 |
commit | 4eb70290210022860294644d67ba50d55806621c (patch) | |
tree | 2c9b43626d2838ca5d0dc4a71e9092c28d45378d /vcl/source | |
parent | a68951d8653c97b90f2652306fbcc0076016ac51 (diff) |
take the world scaling factor for fonts, but not the rotation
regression from
commit 8f705df1221c3f92d8cde68bdf726a7c3ce8fe1b
Author: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Date: Fri Jul 18 13:36:13 2014 +0200
bnc#881024 Don't world transform font size in WMF/EMF import
which seems to be a regression from
commit 1281c1f52b77c4c4fb08e129542c2c4912b38555
Author: Armin Le Grand <alg@apache.org>
Date: Mon Dec 10 16:08:58 2012 +0000
Resolves: #i121382# Corrected size handling including font size handling...
for EMF/WMF imports
Change-Id: I87307c9993d3343b4db636257e2567b10a73b79d
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index a768b329c92b..c9f87508dd59 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -408,8 +408,18 @@ Size WinMtfOutput::ImplMap(const Size& rSz, bool bDoWorldTransform) } else { - fWidth = rSz.Width(); - fHeight = rSz.Height(); + //take the scale, but not the rotation + basegfx::B2DHomMatrix aMatrix(maXForm.eM11, maXForm.eM12, 0, + maXForm.eM21, maXForm.eM22, 0); + basegfx::B2DTuple aScale, aTranslate; + double fRotate, fShearX; + if (!aMatrix.decompose(aScale, aTranslate, fRotate, fShearX)) + { + aScale.setX(1.0); + aScale.setY(1.0); + } + fWidth = rSz.Width() * aScale.getX(); + fHeight = rSz.Height() * aScale.getY(); } if ( mnGfxMode == GM_COMPATIBLE ) |