[Libreoffice-commits] core.git: 8 commits - rsc/source sw/source

Norbert Thiebaud nthiebaud at gmail.com
Sat Jan 25 19:07:53 PST 2014


 rsc/source/parser/rscyacc.y       |    1 
 sw/source/core/inc/flyfrms.hxx    |    2 -
 sw/source/core/inc/frame.hxx      |    1 
 sw/source/core/inc/ftnboss.hxx    |    5 +++
 sw/source/core/layout/layhelp.hxx |    2 -
 sw/source/core/text/inftxt.hxx    |   48 +++++++++++++++++++++++++++++++++-----
 6 files changed, 48 insertions(+), 11 deletions(-)

New commits:
commit b76a8689277a8d51af448268852cd872ba424de4
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Jan 25 20:24:04 2014 -0600

    coverity#708444 Unitialized scalar field
    
    Change-Id: I6057dc839cebf0b16621f5989129f0c1cbe535ff

diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 4c05a60..48ced12 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -134,7 +134,10 @@ class SwTxtInfo
     sal_Int32 nTxtStart;                 // TxtOfst for Follows
 
 protected:
-    SwTxtInfo() : pPara(0) {}
+    SwTxtInfo()
+        : pPara(0)
+        , nTxtStart(0)
+        {}
 public:
     void CtorInitTxtInfo( SwTxtFrm *pFrm );
     SwTxtInfo( const SwTxtInfo &rInf );
commit b03cb2015f1a19b269cafffdece14159062afddb
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Jan 25 20:21:24 2014 -0600

    coverity#708443 Unitialized scalar field
    
    Change-Id: I7c8782adba8618bb6dbdcec8972de3696803a524

diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index a7aa930..4c05a60 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -420,13 +420,19 @@ class SwTxtPaintInfo : public SwTxtSizeInfo
     void _NotifyURL( const SwLinePortion &rPor ) const;
 
 protected:
+    SwTxtPaintInfo()
+        : pWrongList(0)
+        , pGrammarCheckList(0)
+        , pSmartTags(0)
+        , pSpaceAdd(0)
 #ifdef DBG_UTIL
-    SwTxtPaintInfo() { m_pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pSmartTags = 0; pSpaceAdd = 0;
-                       pBrushItem = ((SvxBrushItem*)-1);}
+        , pBrushItem((SvxBrushItem*)-1)
 #else
-    SwTxtPaintInfo() { m_pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pSmartTags = 0; pSpaceAdd = 0;
-                       pBrushItem = 0;}
+        , pBrushItem(0)
 #endif
+        , nSpaceIdx(0)
+        {}
+
 public:
     SwTxtPaintInfo( const SwTxtPaintInfo &rInf );
     SwTxtPaintInfo( const SwTxtPaintInfo &rInf, const OUString* pTxt );
commit d033a5c89317fd8d38f4bec4ba5ae5e0706f18ad
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Jan 25 20:08:59 2014 -0600

    coverity#708442 Unitialized scalar field
    
    Change-Id: Ica7177c9a6d16a3c4d5486f2d8e127c5a995803d

diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 3ce3972..a7aa930 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -198,7 +198,34 @@ protected:
     void CtorInitTxtSizeInfo( SwTxtFrm *pFrm, SwFont *pFnt = 0,
                    const sal_Int32 nIdx = 0,
                    const sal_Int32 nLen = COMPLETE_STRING );
-    SwTxtSizeInfo() : m_pKanaComp(0), m_pVsh(0), m_pOut(0), m_pRef(0), m_pFnt(0), m_pUnderFnt(0), m_pFrm(0), m_pOpt(0), m_pTxt(0) {}
+    SwTxtSizeInfo()
+        : m_pKanaComp(0)
+        , m_pVsh(0)
+        , m_pOut(0)
+        , m_pRef(0)
+        , m_pFnt(0)
+        , m_pUnderFnt(0)
+        , m_pFrm(0)
+        , m_pOpt(0)
+        , m_pTxt(0)
+        , m_nIdx(0)
+        , m_nLen(0)
+        , m_nKanaIdx(0)
+        , m_bOnWin    (0)
+        , m_bNotEOL   (0)
+        , m_bURLNotify(0)
+        , m_bStopUnderFlow(0)
+        , m_bFtnInside(0)
+        , m_bOtherThanFtnInside(0)
+        , m_bMulti(0)
+        , m_bFirstMulti(0)
+        , m_bRuby(0)
+        , m_bHanging(0)
+        , m_bScriptSpace(0)
+        , m_bForbiddenChars(0)
+        , m_bSnapToGrid(0)
+        , m_nDirection(0)
+        {}
 public:
     SwTxtSizeInfo( const SwTxtSizeInfo &rInf );
     SwTxtSizeInfo( const SwTxtSizeInfo &rInf, const OUString* pTxt,
commit b76b20b48e87d738ce1cfae404c9b76c887b22cf
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Jan 25 19:58:59 2014 -0600

    coverity#708427 Unitialized scalar field
    
    Change-Id: I97d87e4fb981bfed6a6a1058913d1fd651b177bc

diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index ac7e7c17..38a03e5 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -59,7 +59,7 @@ class SwLayCacheImpl : public std::vector<sal_uLong>
     void Insert( sal_uInt16 nType, sal_uLong nIndex, sal_Int32 nOffset );
 
 public:
-    SwLayCacheImpl() {}
+    SwLayCacheImpl() : bUseFlyCache(false) {}
     bool Read( SvStream& rStream );
 
     sal_uLong GetBreakIndex( sal_uInt16 nIdx ) const { return std::vector<sal_uLong>::operator[]( nIdx ); }
commit d3e90b2c5b56613930cc3da706399418d9705cf2
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Jan 25 19:54:26 2014 -0600

    coverity#708430 Unitialized scalar field
    
    Change-Id: I37ed503ae02f2b577f0e360cdce1ccd78e31e5cc

diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 77fe0cf..b53459e 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -357,7 +357,6 @@ protected:
     sal_Bool mbValidSize     : 1;
     sal_Bool mbValidLineNum  : 1;
     sal_Bool mbFixSize       : 1;
-    sal_Bool mbUnUsed1       : 1;
     // if sal_True, frame will be painted completely even content was changed
     // only partially. For CntntFrms a border (from Action) will exclusively
     // painted if <mbCompletePaint> is sal_True.
commit 399ea5e9a312fe6278beff95d6ec96ead7abfc52
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Jan 25 19:35:53 2014 -0600

    coverity#708423 Unitialized scalar field
    
    Change-Id: I0fde656116f1fbb54894a74fed8f0387cb37c665

diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 2fb9c0e..fb21146 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -173,7 +173,6 @@ public:
 class SwFlyInCntFrm : public SwFlyFrm
 {
     Point aRef;  //Relativ zu diesem Point wird die AbsPos berechnet.
-    long  nLine; //Zeilenhoehe, Ref.Y() - nLine == Zeilenanfang.
 
     sal_Bool bInvalidLayout :1;
     sal_Bool bInvalidCntnt  :1;
@@ -197,7 +196,6 @@ public:
         const Point &rRelPos );
     const Point &GetRefPoint() const { return aRef; }
     const Point GetRelPos() const;
-          long   GetLineHeight() const { return nLine; }
 
     inline void InvalidateLayout() const;
     inline void InvalidateCntnt() const;
commit d1c0ff14261474143fe73c8f1583e3eb3ef96b9e
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Jan 25 19:20:36 2014 -0600

    coverity#708421 : Uninitialized scalar field
    
    Change-Id: I16a76da86a961b182d97afcd20bfda8aa10a62eb

diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx
index 1822a35..0df137d 100644
--- a/sw/source/core/inc/ftnboss.hxx
+++ b/sw/source/core/inc/ftnboss.hxx
@@ -65,7 +65,10 @@ protected:
     static void   ResetFtn( const SwFtnFrm *pAssumed );
 
 public:
-    inline SwFtnBossFrm( SwFrmFmt* pFmt, SwFrm* pSib ) : SwLayoutFrm( pFmt, pSib ) {}
+    inline SwFtnBossFrm( SwFrmFmt* pFmt, SwFrm* pSib )
+        : SwLayoutFrm( pFmt, pSib )
+        , nMaxFtnHeight(0)
+        {}
 
                  SwLayoutFrm *FindBodyCont();
     inline const SwLayoutFrm *FindBodyCont() const;
commit 8c06444d0e7b6183505d221ec4fcda7950b77a77
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Jan 25 18:56:09 2014 -0600

    coverity#983075 : ressource leak
    
    Change-Id: I70c0be6be1e880dacbf56aa6b040d6a514ce0f5c

diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y
index b2efde5..96d8e8e 100644
--- a/rsc/source/parser/rscyacc.y
+++ b/rsc/source/parser/rscyacc.y
@@ -366,6 +366,7 @@ resource_definitions
       {
           pTC->pEH->Error( ERR_ZERODIVISION, NULL, RscId() );
       }
+      delete pExp;
   }
 ;
 


More information about the Libreoffice-commits mailing list