[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - tools/source vcl/source

Caolán McNamara caolanm at redhat.com
Wed Apr 2 01:59:49 PDT 2014


 tools/source/generic/poly.cxx |    2 +-
 vcl/source/gdi/metaact.cxx    |   39 +++++++++++++++++++++------------------
 2 files changed, 22 insertions(+), 19 deletions(-)

New commits:
commit 21212a65c5653bdc38cea426710e68ed40c66eb8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 2 09:33:03 2014 +0100

    init a few more stream-read svm elements
    
    (cherry picked from commit 67c6ea0c426c2796fc1b80cbe2cb0347686db90d)
    
    Conflicts:
    	vcl/source/gdi/metaact.cxx
    
    Change-Id: I3dfa2485afbe66131b86764374d53181b55c2346

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index b077e62..1caec37 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1567,7 +1567,7 @@ SvStream& operator>>( SvStream& rIStream, Polygon& rPoly )
     DBG_ASSERTWARNING( rIStream.GetVersion(), "Polygon::>> - Solar-Version not set on rIStream" );
 
     sal_uInt16          i;
-    sal_uInt16          nPoints;
+    sal_uInt16          nPoints(0);
 
     // read all points and create array
     rIStream >> nPoints;
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index e7aed0d..2bc51b4 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -984,7 +984,7 @@ void MetaPolyLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
         rIStm >> maLineInfo;
     if ( aCompat.GetVersion() >= 3 )
     {
-        sal_uInt8 bHasPolyFlags;
+        sal_uInt8 bHasPolyFlags(0);
         rIStm >> bHasPolyFlags;
         if ( bHasPolyFlags )
             maPoly.Read( rIStm );
@@ -1166,10 +1166,11 @@ void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
 
     if ( aCompat.GetVersion() >= 2 )    // Version 2
     {
-        sal_uInt16 i, nIndex, nNumberOfComplexPolygons;
+        sal_uInt16 nNumberOfComplexPolygons(0);
         rIStm >> nNumberOfComplexPolygons;
-        for ( i = 0; i < nNumberOfComplexPolygons; i++ )
+        for (sal_uInt16 i = 0; i < nNumberOfComplexPolygons; ++i)
         {
+            sal_uInt16 nIndex(0);
             rIStm >> nIndex;
             Polygon aPoly;
             aPoly.Read( rIStm );
@@ -1699,18 +1700,20 @@ void MetaTextLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
     COMPAT( rIStm );
 
     //#fdo39428 SvStream no longer supports operator>>(long&)
-    sal_uInt32 nTemp;
-    sal_Int32 nTemp2;
     rIStm >> maPos;
-    rIStm >> nTemp2;
-    mnWidth = nTemp2;
-    rIStm >> nTemp;
-    meStrikeout = (FontStrikeout)nTemp;
-    rIStm >> nTemp;
-    meUnderline = (FontUnderline)nTemp;
+    sal_Int32 nTempWidth(0);
+    rIStm >> nTempWidth;
+    mnWidth = nTempWidth;
+    sal_uInt32 nTempStrikeout(0);
+    rIStm >> nTempStrikeout;
+    meStrikeout = (FontStrikeout)nTempStrikeout;
+    sal_uInt32 nTempUnderline(0);
+    rIStm >> nTempUnderline;
+    meUnderline = (FontUnderline)nTempUnderline;
     if ( aCompat.GetVersion() >= 2 ) {
-        rIStm >> nTemp;
-        meUnderline = (FontUnderline)nTemp;
+        sal_uInt32 nTempUnderline2(0);
+        rIStm >> nTempUnderline2;
+        meUnderline = (FontUnderline)nTempUnderline2;
     }
 }
 
@@ -3375,7 +3378,7 @@ void MetaTextAlignAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
 
 void MetaTextAlignAction::Read( SvStream& rIStm, ImplMetaReadData* )
 {
-    sal_uInt16 nTmp16;
+    sal_uInt16 nTmp16(0);
 
     COMPAT( rIStm );
     rIStm >> nTmp16; maAlign = (TextAlign) nTmp16;
@@ -3650,7 +3653,7 @@ void MetaRasterOpAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
 
 void MetaRasterOpAction::Read( SvStream& rIStm, ImplMetaReadData* )
 {
-    sal_uInt16 nTmp16;
+    sal_uInt16 nTmp16(0);
 
     COMPAT( rIStm );
     rIStm >> nTmp16; meRasterOp = (RasterOp) nTmp16;
@@ -4117,9 +4120,9 @@ void MetaCommentAction::Scale( double fXScale, double fYScale )
                 SvMemoryStream  aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
                 SvMemoryStream  aDest;
 
-                sal_Int32 nLeft, nRight, nTop, nBottom;
-                sal_Int32 nPixX, nPixY, nMillX, nMillY;
-                float m11, m12, m21, m22, mdx, mdy;
+                sal_Int32 nLeft(0), nRight(0), nTop(0), nBottom(0);
+                sal_Int32 nPixX(0), nPixY(0), nMillX(0), nMillY(0);
+                float m11(0), m12(0), m21(0), m22(0), mdx(0), mdy(0);
 
                 // read data
                 aMemStm >> nLeft >> nTop >> nRight >> nBottom;


More information about the Libreoffice-commits mailing list