[Libreoffice-commits] core.git: 3 commits - sc/inc sc/source sd/source

Norbert Thiebaud nthiebaud at gmail.com
Sun Jan 26 22:16:22 PST 2014


 sc/inc/validat.hxx                        |    5 -
 sc/source/core/data/simpleformulacalc.cxx |   10 +--
 sc/source/core/data/validat.cxx           |   94 +++++++++++++++---------------
 sd/source/filter/eppt/pptx-epptooxml.cxx  |    7 +-
 4 files changed, 60 insertions(+), 56 deletions(-)

New commits:
commit 9bdf5e9d107a09bad5d03189e76f20cb0bbcd15c
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 27 00:14:01 2014 -0600

    coverity#1038497 : Uninitialized scalar field
    
    Change-Id: I814eb68a74812b83dd98e80cf286fc11e6f57fab

diff --git a/sc/source/core/data/simpleformulacalc.cxx b/sc/source/core/data/simpleformulacalc.cxx
index 8702c3b..b1d56f3 100644
--- a/sc/source/core/data/simpleformulacalc.cxx
+++ b/sc/source/core/data/simpleformulacalc.cxx
@@ -15,10 +15,12 @@
 
 
 ScSimpleFormulaCalculator::ScSimpleFormulaCalculator( ScDocument* pDoc, const ScAddress& rAddr,
-        const OUString& rFormula, formula::FormulaGrammar::Grammar eGram ):
-    mbCalculated(false),
-    maAddr(rAddr),
-    mpDoc(pDoc)
+        const OUString& rFormula, formula::FormulaGrammar::Grammar eGram )
+    : mnFormatType(0)
+    , mnFormatIndex(0)
+    , mbCalculated(false)
+    , maAddr(rAddr)
+    , mpDoc(pDoc)
 {
     // compile already here
     ScCompiler aComp(pDoc, rAddr);
commit 61ca90050badefdfbd9d5282317d03deb3339870
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 27 00:06:40 2014 -0600

    coverity#1038498 : Uninitialized scalar field
    
    Change-Id: I11f3056e96436fbb305316ef5c6505629e6418a3

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 234f87c..ce47590 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -206,9 +206,12 @@ int PowerPointExport::GetPPTXLayoutId( int nOffset )
     return nId;
 }
 
-PowerPointShapeExport::PowerPointShapeExport( FSHelperPtr pFS, ShapeHashMap* pShapeMap, PowerPointExport* pFB )
-        : ShapeExport( XML_p, pFS, pShapeMap, pFB )
+PowerPointShapeExport::PowerPointShapeExport( FSHelperPtr pFS, ShapeHashMap* pShapeMap,
+                                              PowerPointExport* pFB )
+    : ShapeExport( XML_p, pFS, pShapeMap, pFB )
     , mrExport( *pFB )
+    , mePageType(UNDEFINED)
+    , mbMaster(sal_False)
 {
 }
 
commit 2a339a2ffc7f9923648d83bf287228a9008a54b9
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sun Jan 26 23:45:06 2014 -0600

    coverity#1103748 coverity#708009 coverity#708011-12
    
    Change-Id: I8855114b3cd6cf073af182b5730c3fc9e08a56df

diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx
index c66c929..ccf50a6c 100644
--- a/sc/inc/validat.hxx
+++ b/sc/inc/validat.hxx
@@ -75,8 +75,6 @@ private:
     OUString aErrorTitle;
     OUString aErrorMessage;
 
-    bool bIsUsed;            // temporary during saving
-
     bool DoMacro( const ScAddress& rPos, const OUString& rInput,
                                 ScFormulaCell* pCell, Window* pParent ) const;
 
@@ -145,9 +143,6 @@ public:
     sal_uInt32      GetKey() const          { return nKey; }
     void            SetKey(sal_uInt32 nNew) { nKey = nNew; }    // only if not inserted!
 
-    void            SetUsed(bool bSet)      { bIsUsed = bSet; }
-    bool            IsUsed() const          { return bIsUsed; }
-
     bool            EqualEntries( const ScValidationData& r ) const;    // for undo
 
     //  sort (using std::set) by index
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 878dc0a..7ca9589 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -57,59 +57,63 @@ using namespace formula;
 //
 
 ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOper,
-                            const OUString& rExpr1, const OUString& rExpr2,
-                            ScDocument* pDocument, const ScAddress& rPos,
-                            const OUString& rExprNmsp1, const OUString& rExprNmsp2,
-                            FormulaGrammar::Grammar eGrammar1, FormulaGrammar::Grammar eGrammar2 ) :
-    ScConditionEntry( eOper, rExpr1, rExpr2, pDocument, rPos, rExprNmsp1, rExprNmsp2, eGrammar1, eGrammar2 ),
-    nKey( 0 ),
-    eDataMode( eMode ),
-    eErrorStyle( SC_VALERR_STOP ),
-    mnListType( ValidListType::UNSORTED )
+                                    const OUString& rExpr1, const OUString& rExpr2,
+                                    ScDocument* pDocument, const ScAddress& rPos,
+                                    const OUString& rExprNmsp1, const OUString& rExprNmsp2,
+                                    FormulaGrammar::Grammar eGrammar1,
+                                    FormulaGrammar::Grammar eGrammar2 )
+    : ScConditionEntry( eOper, rExpr1, rExpr2, pDocument, rPos, rExprNmsp1,
+                        rExprNmsp2, eGrammar1, eGrammar2 )
+    , nKey( 0 )
+    , eDataMode( eMode )
+    , bShowInput(false)
+    , bShowError(false)
+    , eErrorStyle( SC_VALERR_STOP )
+    , mnListType( ValidListType::UNSORTED )
 {
-    bShowInput = bShowError = false;
 }
 
 ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOper,
-                            const ScTokenArray* pArr1, const ScTokenArray* pArr2,
-                            ScDocument* pDocument, const ScAddress& rPos ) :
-    ScConditionEntry( eOper, pArr1, pArr2, pDocument, rPos ),
-    nKey( 0 ),
-    eDataMode( eMode ),
-    eErrorStyle( SC_VALERR_STOP ),
-    mnListType( ValidListType::UNSORTED )
-{
-    bShowInput = bShowError = false;
-}
-
-ScValidationData::ScValidationData( const ScValidationData& r ) :
-    ScConditionEntry( r ),
-    nKey( r.nKey ),
-    eDataMode( r.eDataMode ),
-    bShowInput( r.bShowInput ),
-    bShowError( r.bShowError ),
-    eErrorStyle( r.eErrorStyle ),
-    mnListType( r.mnListType ),
-    aInputTitle( r.aInputTitle ),
-    aInputMessage( r.aInputMessage ),
-    aErrorTitle( r.aErrorTitle ),
-    aErrorMessage( r.aErrorMessage )
+                                    const ScTokenArray* pArr1, const ScTokenArray* pArr2,
+                                    ScDocument* pDocument, const ScAddress& rPos )
+    : ScConditionEntry( eOper, pArr1, pArr2, pDocument, rPos )
+    , nKey( 0 )
+    , eDataMode( eMode )
+    , bShowInput(false)
+    , bShowError(false)
+    , eErrorStyle( SC_VALERR_STOP )
+    , mnListType( ValidListType::UNSORTED )
+{
+}
+
+ScValidationData::ScValidationData( const ScValidationData& r )
+    : ScConditionEntry( r )
+    , nKey( r.nKey )
+    , eDataMode( r.eDataMode )
+    , bShowInput( r.bShowInput )
+    , bShowError( r.bShowError )
+    , eErrorStyle( r.eErrorStyle )
+    , mnListType( r.mnListType )
+    , aInputTitle( r.aInputTitle )
+    , aInputMessage( r.aInputMessage )
+    , aErrorTitle( r.aErrorTitle )
+    , aErrorMessage( r.aErrorMessage )
 {
     //  Formeln per RefCount kopiert
 }
 
-ScValidationData::ScValidationData( ScDocument* pDocument, const ScValidationData& r ) :
-    ScConditionEntry( pDocument, r ),
-    nKey( r.nKey ),
-    eDataMode( r.eDataMode ),
-    bShowInput( r.bShowInput ),
-    bShowError( r.bShowError ),
-    eErrorStyle( r.eErrorStyle ),
-    mnListType( r.mnListType ),
-    aInputTitle( r.aInputTitle ),
-    aInputMessage( r.aInputMessage ),
-    aErrorTitle( r.aErrorTitle ),
-    aErrorMessage( r.aErrorMessage )
+ScValidationData::ScValidationData( ScDocument* pDocument, const ScValidationData& r )
+    : ScConditionEntry( pDocument, r )
+    , nKey( r.nKey )
+    , eDataMode( r.eDataMode )
+    , bShowInput( r.bShowInput )
+    , bShowError( r.bShowError )
+    , eErrorStyle( r.eErrorStyle )
+    , mnListType( r.mnListType )
+    , aInputTitle( r.aInputTitle )
+    , aInputMessage( r.aInputMessage )
+    , aErrorTitle( r.aErrorTitle )
+    , aErrorMessage( r.aErrorMessage )
 {
     //  Formeln wirklich kopiert
 }


More information about the Libreoffice-commits mailing list