merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0583-wmf-mm-text-1.diff
blobc0ca362f7a103cb65cfde6f6acfd50a42634bb5b
1 diff -rup svtools-orig/source/filter.vcl/wmf/winmtf.cxx svtools/source/filter.vcl/wmf/winmtf.cxx
2 --- svtools-orig/source/filter.vcl/wmf/winmtf.cxx 2009-08-28 12:49:41.000000000 +0200
3 +++ svtools/source/filter.vcl/wmf/winmtf.cxx 2009-08-31 17:52:27.000000000 +0200
4 @@ -422,10 +422,15 @@ Point WinMtfOutput::ImplMap( const Point
5 case MM_TEXT:
6 fX2 -= mnWinOrgX;
7 fY2 -= mnWinOrgY;
8 - fX2 *= 2540.0/mnUnitsPerInch;
9 - fY2 *= 2540.0/mnUnitsPerInch;
10 + if( mnDevWidth != 1 || mnDevHeight != 1 ) {
11 + fX2 *= 2540.0/mnUnitsPerInch;
12 + fY2 *= 2540.0/mnUnitsPerInch;
13 + }
14 fX2 += mnDevOrgX;
15 fY2 += mnDevOrgY;
16 + fX2 *= (double)mnMillX * 100.0 / (double)mnPixX;
17 + fY2 *= (double)mnMillY * 100.0 / (double)mnPixY;
19 break;
20 case MM_LOENGLISH :
22 @@ -503,8 +508,13 @@ Size WinMtfOutput::ImplMap( const Size&
23 switch( mnMapMode )
25 case MM_TEXT:
26 + if( mnDevWidth != 1 && mnDevHeight != 1 ) {
27 fWidth *= 2540.0/mnUnitsPerInch;
28 fHeight*= 2540.0/mnUnitsPerInch;
29 + } else {
30 + fWidth *= (double)mnMillX * 100 / (double)mnPixX;
31 + fHeight *= (double)mnMillY * 100 / (double)mnPixY;
32 + }
33 break;
34 case MM_LOENGLISH :