[Libreoffice-commits] core.git: filter/source

Caolán McNamara caolanm at redhat.com
Fri Apr 18 02:42:27 PDT 2014


 filter/source/graphicfilter/icgm/cgm.cxx |   61 +++++++++++++++++++------------
 filter/source/graphicfilter/icgm/cgm.hxx |    1 
 2 files changed, 38 insertions(+), 24 deletions(-)

New commits:
commit f38ccdcc5bf5792a242bf20b282748007160d6e5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 18 10:39:22 2014 +0100

    coverity#1202962 Uninitialized pointer field
    
    Change-Id: If400eda10e0b6367c58431c528b84a95a35b76f9

diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index a89fd3b..003b725 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -32,32 +32,47 @@
 
 using namespace ::com::sun::star;
 
-void CGM::ImplCGMInit()
-{
-    mbIsFinished = mbPicture = mbMetaFile = mbPictureBody = sal_False;
-
-    mnActCount = 0;
-    mnOutdx = 28000;
-    mnOutdy = 21000;
-
-    mpBuf = NULL;
-    mpChart = NULL;
-    mpBitmapInUse = NULL;
-
-    pCopyOfE = new CGMElements( *this );
-    pElement = new CGMElements( *this );
-}
-
 #ifdef CGM_EXPORT_IMPRESS
 
-CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > & rModel )  :
-    mpGraphic               ( NULL ),
-    mbStatus                ( sal_True ),
-    mpOutAct                ( new CGMImpressOutAct( *this, rModel ) ),
-    mnMode                  ( nMode )
+CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > & rModel )
+    : mnOutdx(28000)
+    , mnOutdy(21000)
+    , mnVDCXadd(0)
+    , mnVDCXmul(0)
+    , mnVDCYmul(0)
+    , mnVDCdx(0)
+    , mnVDCdy(0)
+    , mnXFraction(0)
+    , mnYFraction(0)
+    , mbAngReverse(false)
+    , mpGraphic(NULL)
+    , mbStatus(true)
+    , mbMetaFile(false)
+    , mbIsFinished(false)
+    , mbPicture(false)
+    , mbPictureBody(false)
+    , mbFigure(false)
+    , mbFirstOutPut(false)
+    , mnAct4PostReset(0)
+    , mpBitmapInUse(NULL)
+    , mpChart(NULL)
+    , mpOutAct(new CGMImpressOutAct(*this, rModel))
+    , mpSource(NULL)
+    , mnParaSize(0)
+    , mnActCount(0)
+    , mpBuf(NULL)
+    , mnMode(nMode | CGM_EXPORT_IMPRESS)
+    , mnEscape(0)
+    , mnElementClass(0)
+    , mnElementID(0)
+    , mnElementSize(0)
+#ifdef CGM_EXPORT_META
+    , mpVirDev(NULL)
+    , mpGDIMetaFile(NULL)
+#endif
 {
-    mnMode |= CGM_EXPORT_IMPRESS;
-    ImplCGMInit();
+    pElement = new CGMElements( *this );
+    pCopyOfE = new CGMElements( *this );
 }
 #endif
 
diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx
index 033e790..ab7076d1 100644
--- a/filter/source/graphicfilter/icgm/cgm.hxx
+++ b/filter/source/graphicfilter/icgm/cgm.hxx
@@ -94,7 +94,6 @@ class CGM
         sal_uInt32              mnElementID;
         sal_uInt32              mnElementSize;  // full parameter size for the latest action
 
-        void                ImplCGMInit();
         sal_uInt32          ImplGetUI16( sal_uInt32 nAlign = 0 );
         sal_uInt8           ImplGetByte( sal_uInt32 nSource, sal_uInt32 nPrecision );
         long                ImplGetI( sal_uInt32 nPrecision );


More information about the Libreoffice-commits mailing list