[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 27 06:15:43 PDT 2015
vcl/source/filter/wmf/winmtf.cxx | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 8965f2b4d9f9436d2353b041c84b67165d729f34
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 23 16:40:25 2015 +0100
take the world scaling factor for fonts, but not the rotation
regression from
commit 8f705df1221c3f92d8cde68bdf726a7c3ce8fe1b
Author: Tomaž Vajngerl <tomaz.vajngerl at 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 at 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 4eb70290210022860294644d67ba50d55806621c)
Reviewed-on: https://gerrit.libreoffice.org/19559
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index c5d1cf9..3f54ae8 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 )
More information about the Libreoffice-commits
mailing list