summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2013-11-20 21:11:24 +0100
committerJan Holesovsky <kendy@collabora.com>2013-11-25 16:04:27 +0100
commit8614fbc8e68aae5790b7ee06021393ea95e92ed7 (patch)
treee667c4cf03a4ecceaf8099d6d950b737a17dd1a5 /vcl
parentae0d2d2eccacc298c0967feb0b434993aae70c05 (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
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 9986da940437..2ffde8930c46 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -377,15 +377,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 :
{
@@ -473,13 +468,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 :
{