diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-10 20:59:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-10 21:13:04 +0100 |
commit | cbde35dd94d26cf6c2423eda448c04efbafaaf4b (patch) | |
tree | 0db32d9091664f2a2834b817bdb1ccdf3fe3ec1f | |
parent | 634fcdfef2dd8d1bb2dc119fa170db282fabeab8 (diff) |
coverity#707812 Uninitialized scalar field
Change-Id: I738ed7b2a5c311a71f8dd7a638808acc98b31b7f
-rw-r--r-- | filter/source/graphicfilter/icgm/chart.cxx | 28 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/chart.hxx | 47 |
2 files changed, 47 insertions, 28 deletions
diff --git a/filter/source/graphicfilter/icgm/chart.cxx b/filter/source/graphicfilter/icgm/chart.cxx index 5421af809146..f5e179afd4de 100644 --- a/filter/source/graphicfilter/icgm/chart.cxx +++ b/filter/source/graphicfilter/icgm/chart.cxx @@ -17,14 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <main.hxx> #include <chart.hxx> - -CGMChart::CGMChart( CGM& rCGM ) : - mpCGM ( &rCGM ) +CGMChart::CGMChart(CGM& rCGM) + : mpCGM(&rCGM) + , mnCurrentFileType(0) { for ( sal_Int8 i = 0; i < 7; i++ ) { @@ -33,9 +32,7 @@ CGMChart::CGMChart( CGM& rCGM ) : mDataNode[ i ].nZoneEnum = i; } -}; - - +} CGMChart::~CGMChart() { @@ -45,9 +42,7 @@ CGMChart::~CGMChart() { DeleteTextEntry( maTextEntryList[ 0 ] ); } -}; - - +} void CGMChart::DeleteTextEntry( TextEntry* pTextEntry ) { @@ -71,28 +66,21 @@ void CGMChart::DeleteTextEntry( TextEntry* pTextEntry ) } delete pTextEntry; } -}; - - +} void CGMChart::InsertTextEntry( TextEntry* pTextEntry ) { maTextEntryList.push_back( pTextEntry ); -}; - - - +} void CGMChart::ResetAnnotation() { mDataNode[ 0 ].nZoneEnum = 0; } - - bool CGMChart::IsAnnotation() { return ( mDataNode[ 0 ].nZoneEnum == 0 ); -}; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/graphicfilter/icgm/chart.hxx b/filter/source/graphicfilter/icgm/chart.hxx index 6d16dc3a9d0f..3fced99be909 100644 --- a/filter/source/graphicfilter/icgm/chart.hxx +++ b/filter/source/graphicfilter/icgm/chart.hxx @@ -143,13 +143,20 @@ struct BulletOption } }; -typedef struct BulDef +struct BulDef { char btype; char bsize; char bcolor; char bnumber; -} BulDef; + BulDef() + : btype(0) + , bsize(0) + , bcolor(0) + , bnumber(0) + { + } +}; typedef struct BulletLines { @@ -179,24 +186,39 @@ struct IntSettings } }; -typedef struct PageOrientDim +struct PageOrientDim { char nOrientation; char nDimension; float nPageX; float nPageY; -} PageOrientDim; + PageOrientDim() + : nOrientation(0) + , nDimension(0) + , nPageX(0.0) + , nPageY(0.0) + { + } +}; -typedef struct DataNode +struct DataNode { sal_Int16 nBoxX1; sal_Int16 nBoxY1; sal_Int16 nBoxX2; sal_Int16 nBoxY2; sal_Int8 nZoneEnum; -} DataNode; + DataNode() + : nBoxX1(0) + , nBoxY1(0) + , nBoxX2(0) + , nBoxY2(0) + , nZoneEnum(0) + { + } +}; -typedef struct ChartZone +struct ChartZone { sal_Int16 nMinX; sal_Int16 nMinY; @@ -204,7 +226,16 @@ typedef struct ChartZone sal_Int16 nMaxY; char nUserDef; char nPad1; -} ChartZone; + ChartZone() + : nMinX(0) + , nMinY(0) + , nMaxX(0) + , nMaxY(0) + , nUserDef(0) + , nPad1(0) + { + } +}; class CGM; class CGMImpressOutAct; |