openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1521441 - in /openoffice/trunk/main/svtools/source/filter/wmf: enhwmf.cxx winmtf.cxx winmtf.hxx wmf.cxx
Date Tue, 10 Sep 2013 11:48:34 GMT
Author: alg
Date: Tue Sep 10 11:48:33 2013
New Revision: 1521441

URL: http://svn.apache.org/r1521441
Log:
i123216 No FontScaling by WorldTransform on WMF import

Modified:
    openoffice/trunk/main/svtools/source/filter/wmf/enhwmf.cxx
    openoffice/trunk/main/svtools/source/filter/wmf/winmtf.cxx
    openoffice/trunk/main/svtools/source/filter/wmf/winmtf.hxx
    openoffice/trunk/main/svtools/source/filter/wmf/wmf.cxx

Modified: openoffice/trunk/main/svtools/source/filter/wmf/enhwmf.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/filter/wmf/enhwmf.cxx?rev=1521441&r1=1521440&r2=1521441&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/filter/wmf/enhwmf.cxx (original)
+++ openoffice/trunk/main/svtools/source/filter/wmf/enhwmf.cxx Tue Sep 10 11:48:33 2013
@@ -1023,14 +1023,18 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 					}
 					aLogFont.alfFaceName = UniString( lfFaceName );
 
-                    // #121382# Need to apply WorldTransform to FontHeight/Width; this should
be completely
-                    // chnaged to basegfx::B2DHomMatrix instead of 'struct XForm', but not
now due to time
-                    // constraints and dangers
-                    const XForm& rXF = pOut->GetWorldTransform();
-                    const basegfx::B2DHomMatrix aWT(rXF.eM11, rXF.eM21, rXF.eDx, rXF.eM12,
rXF.eM22, rXF.eDy);
-                    const basegfx::B2DVector aTransVec(aWT * basegfx::B2DVector(aLogFont.lfWidth,
aLogFont.lfHeight));
-                    aLogFont.lfWidth = aTransVec.getX();
-                    aLogFont.lfHeight = aTransVec.getY();
+                    // #123216# Not used in the test case of #121382# (always identity in
XForm), also
+                    // no hints in ms docu if FontSize should be scaled with WT. Using with
the example 
+                    // from #123216# creates errors, so removing.
+                    //
+                    // // #121382# Need to apply WorldTransform to FontHeight/Width; this
should be completely
+                    // // chnaged to basegfx::B2DHomMatrix instead of 'struct XForm', but
not now due to time
+                    // // constraints and dangers
+                    // const XForm& rXF = pOut->GetWorldTransform();
+                    // const basegfx::B2DHomMatrix aWT(rXF.eM11, rXF.eM21, rXF.eDx, rXF.eM12,
rXF.eM22, rXF.eDy);
+                    // const basegfx::B2DVector aTransVec(aWT * basegfx::B2DVector(aLogFont.lfWidth,
aLogFont.lfHeight));
+                    // aLogFont.lfWidth = aTransVec.getX();
+                    // aLogFont.lfHeight = aTransVec.getY();
 
 					pOut->CreateObject( nIndex, GDI_FONT, new WinMtfFontStyle( aLogFont ) );
 				}

Modified: openoffice/trunk/main/svtools/source/filter/wmf/winmtf.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/filter/wmf/winmtf.cxx?rev=1521441&r1=1521440&r2=1521441&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/filter/wmf/winmtf.cxx (original)
+++ openoffice/trunk/main/svtools/source/filter/wmf/winmtf.cxx Tue Sep 10 11:48:33 2013
@@ -2055,10 +2055,10 @@ void WinMtfOutput::ModifyWorldTransform(
 	{
 		case MWT_IDENTITY :
 		{
-			maXForm.eM11 = maXForm.eM12 = maXForm.eM21 = maXForm.eM22 = 1.0f;
-			maXForm.eDx = maXForm.eDy = 0.0f;
+            maXForm.eM11 = maXForm.eM22 = 1.0f;
+            maXForm.eM12 = maXForm.eM21 = maXForm.eDx = maXForm.eDy = 0.0f;
+            break;
 		}
-		break;
 
 		case MWT_RIGHTMULTIPLY :
 		case MWT_LEFTMULTIPLY :
@@ -2117,8 +2117,13 @@ void WinMtfOutput::ModifyWorldTransform(
             maXForm.eM22 = cF[1][1];
             maXForm.eDx = cF[2][0];
             maXForm.eDy = cF[2][1];
+            break;
+        }
+        case MWT_SET:
+        {
+            SetWorldTransform(rXForm);
+            break;
         }
-        break;
 	}
  }
 

Modified: openoffice/trunk/main/svtools/source/filter/wmf/winmtf.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/filter/wmf/winmtf.hxx?rev=1521441&r1=1521440&r2=1521441&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/filter/wmf/winmtf.hxx (original)
+++ openoffice/trunk/main/svtools/source/filter/wmf/winmtf.hxx Tue Sep 10 11:48:33 2013
@@ -68,6 +68,7 @@
 #define MWT_IDENTITY			1
 #define MWT_LEFTMULTIPLY		2
 #define MWT_RIGHTMULTIPLY		3
+#define MWT_SET                 4
 
 #define ENHMETA_STOCK_OBJECT    0x80000000
 

Modified: openoffice/trunk/main/svtools/source/filter/wmf/wmf.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/filter/wmf/wmf.cxx?rev=1521441&r1=1521440&r2=1521441&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/filter/wmf/wmf.cxx (original)
+++ openoffice/trunk/main/svtools/source/filter/wmf/wmf.cxx Tue Sep 10 11:48:33 2013
@@ -50,6 +50,13 @@ sal_Bool ConvertWMFToGDIMetaFile( SvStre
 	{
 		WMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadWMF();
 	}
+
+#ifdef DBG_UTIL
+    // #123216# allow a look at CheckSum and ByteSize for debugging
+    const sal_uLong aC(rGDIMetaFile.GetChecksum());
+    const sal_uLong aB(rGDIMetaFile.GetSizeBytes());
+#endif
+
 	rStreamWMF.SetNumberFormatInt( nOrigNumberFormat );
 	return !rStreamWMF.GetError();
 }



Mime
View raw message