Kaydet (Commit) 8965f2b4 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Miklos Vajna

take the world scaling factor for fonts, but not the rotation

regression from

commit 8f705df1
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 1281c1f5
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
(cherry picked from commit 4eb70290)
Reviewed-on: https://gerrit.libreoffice.org/19559Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst d6a6261f
...@@ -408,8 +408,18 @@ Size WinMtfOutput::ImplMap(const Size& rSz, bool bDoWorldTransform) ...@@ -408,8 +408,18 @@ Size WinMtfOutput::ImplMap(const Size& rSz, bool bDoWorldTransform)
} }
else else
{ {
fWidth = rSz.Width(); //take the scale, but not the rotation
fHeight = rSz.Height(); 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 ) if ( mnGfxMode == GM_COMPATIBLE )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment