summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2011-05-04 17:38:19 +0200
committerC├ędric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-05-04 17:49:15 +0200
commit72ea8cc3087a48f5bee75becb161ee8219e2871a (patch)
treef643ff97f19096f25774b92ccabf58fbc0fe27f3
parent0920878d5f7965b8ea072f51d21bb9d21de5ba5c (diff)
wmf-mm-text-1.diff: Fix WMF rendering, n#417818
-rw-r--r--svtools/source/filter.vcl/wmf/winmtf.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx
index cd3145d480..91c0d2fc73 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.cxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.cxx
@@ -380,10 +380,15 @@ Point WinMtfOutput::ImplMap( const Point& rPt )
case MM_TEXT:
fX2 -= mnWinOrgX;
fY2 -= mnWinOrgY;
- fX2 *= 2540.0/mnUnitsPerInch;
- fY2 *= 2540.0/mnUnitsPerInch;
+ if( mnDevWidth != 1 || mnDevHeight != 1 ) {
+ 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 :
{
@@ -461,8 +466,13 @@ Size WinMtfOutput::ImplMap( const Size& rSz )
switch( mnMapMode )
{
case MM_TEXT:
+ if( mnDevWidth != 1 && mnDevHeight != 1 ) {
fWidth *= 2540.0/mnUnitsPerInch;
fHeight*= 2540.0/mnUnitsPerInch;
+ } else {
+ fWidth *= (double)mnMillX * 100 / (double)mnPixX;
+ fHeight *= (double)mnMillY * 100 / (double)mnPixY;
+ }
break;
case MM_LOENGLISH :
{