diff options
author | Jan Holesovsky <kendy@collabora.com> | 2013-11-20 21:11:24 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-11-25 14:10:45 +0100 |
commit | 198b17dc5e182dfb2e5c930458764c7b3e6c914f (patch) | |
tree | 4fba194c66615ba5be3babd51199e3d0bdb1f046 | |
parent | 5854f6c4e1fe0ddb64f74722222b2ddbceaad9d0 (diff) |
Related fdo#61272: Revert "wmf-mm-text-1.diff: Fix WMF rendering, n#417818"
This approach to WMF breaks EMF reading, need to revert it, and fix a
different way.
This reverts commit 16eaa5e7c1208034bb3244fea9e6d9491ccb5501.
Conflicts:
vcl/source/filter/wmf/winmtf.cxx
Change-Id: I59076d0a65d91ba3a1f3ebb48d8f7a542859d351
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 4a0d0273ae5a..e40809827a0e 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -343,15 +343,10 @@ Point WinMtfOutput::ImplMap( const Point& rPt ) case MM_TEXT: fX2 -= mnWinOrgX; fY2 -= mnWinOrgY; - if( mnDevWidth != 1 || mnDevHeight != 1 ) { - fX2 *= HUNDREDTH_MILLIMETERS_PER_MILLIINCH*1000/mnUnitsPerInch; - fY2 *= HUNDREDTH_MILLIMETERS_PER_MILLIINCH*1000/mnUnitsPerInch; - } + fX2 *= 2540.0/mnUnitsPerInch; + fY2 *= 2540.0/mnUnitsPerInch; fX2 += mnDevOrgX; fY2 += mnDevOrgY; - fX2 *= (double)mnMillX * 100.0 / (double)mnPixX; - fY2 *= (double)mnMillY * 100.0 / (double)mnPixY; - break; case MM_LOENGLISH : { @@ -439,13 +434,8 @@ Size WinMtfOutput::ImplMap( const Size& rSz ) switch( mnMapMode ) { case MM_TEXT: - if( mnDevWidth != 1 && mnDevHeight != 1 ) { - fWidth *= HUNDREDTH_MILLIMETERS_PER_MILLIINCH*1000/mnUnitsPerInch; - fHeight*= HUNDREDTH_MILLIMETERS_PER_MILLIINCH*1000/mnUnitsPerInch; - } else { - fWidth *= (double)mnMillX * 100 / (double)mnPixX; - fHeight *= (double)mnMillY * 100 / (double)mnPixY; - } + fWidth *= 2540.0/mnUnitsPerInch; + fHeight*= 2540.0/mnUnitsPerInch; break; case MM_LOENGLISH : { |