[Libreoffice-commits] .: Branch 'libreoffice-3-4' - svtools/source
Petr Mladek
pmladek at kemper.freedesktop.org
Thu Apr 28 05:50:27 PDT 2011
svtools/source/filter.vcl/wmf/winmtf.cxx | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 7839260b83da45a3fa997a2632e7ba3edfb75a3e
Author: Radek Doulik <rodo at novell.com>
Date: Thu Apr 28 14:49:33 2011 +0200
wmf-mm-text-1.diff: fix regression caused by wmf-mm-text.diff (bnc#417818)
make the fixed code run only when device size is set
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx
index cd3145d..91c0d2f 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 :
{
More information about the Libreoffice-commits
mailing list