[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/dev300

Radek Doulík rodo at kemper.freedesktop.org
Mon Aug 31 09:57:39 PDT 2009


 patches/dev300/apply              |    1 +
 patches/dev300/wmf-mm-text-1.diff |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)

New commits:
commit 50053ba621b7e93b9f08938826e8ad5439c7d1bc
Author: Radek Doulik <rodo at rychlik.lounovice>
Date:   Mon Aug 31 18:55:45 2009 +0200

    fix regression of wmf-mm-text-1.diff, n#417818
    
    * patches/dev300/apply:
    * patches/dev300/wmf-mm-text-1.diff:
    
    make the fixed code run only when device size is set

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 47fef64..d96a4eb 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3247,6 +3247,7 @@ oox-calc-export-row-limit.diff, n#504623, janneke.
 
 [ Fixes ]
 wmf-mm-text.diff, n#417818, rodo
+wmf-mm-text-1.diff, n#417818, rodo
 sd-pptx-crash-fix.diff, i#101563, sj
 sd-create-table-height-fix.diff, i#100275, thorsten
 svx-pptin-global-child-bounds-fix.diff, n#485637, thorsten
diff --git a/patches/dev300/wmf-mm-text-1.diff b/patches/dev300/wmf-mm-text-1.diff
new file mode 100644
index 0000000..c0ca362
--- /dev/null
+++ b/patches/dev300/wmf-mm-text-1.diff
@@ -0,0 +1,35 @@
+diff -rup svtools-orig/source/filter.vcl/wmf/winmtf.cxx svtools/source/filter.vcl/wmf/winmtf.cxx
+--- svtools-orig/source/filter.vcl/wmf/winmtf.cxx	2009-08-28 12:49:41.000000000 +0200
++++ svtools/source/filter.vcl/wmf/winmtf.cxx	2009-08-31 17:52:27.000000000 +0200
+@@ -422,10 +422,15 @@ Point WinMtfOutput::ImplMap( const Point
+ 			        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 :
+                 {
+@@ -503,8 +508,13 @@ Size WinMtfOutput::ImplMap( const Size&
+             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 ooo-build-commit mailing list