[Libreoffice-commits] core.git: 2 commits - sax/source sw/source

Caolán McNamara caolanm at redhat.com
Thu Jan 23 08:12:54 PST 2014


 sax/source/expatwrap/sax_expat.cxx |    3 ++
 sw/source/core/text/pormulti.hxx   |   41 +++++++++++++++++++++++--------------
 2 files changed, 29 insertions(+), 15 deletions(-)

New commits:
commit d9d28895f7fcf1b05b77507e32f6aba1d5ef4305
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 23 16:11:55 2014 +0000

    coverity#1158445 Uninitialized pointer field
    
    Change-Id: I14dc2197543bf98763190b5aea3a366e823312b4

diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index a5edfc5..6608a4d 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -228,6 +228,9 @@ public:
     SaxExpatParser_Impl()
         : sCDATA("CDATA")
         , m_bEnableDoS(false)
+        , pAttrList(NULL)
+        , bExceptionWasThrown(false)
+        , bRTExceptionWasThrown(false)
     {
     }
 
commit 303c62e297b338c93edfc52a9697263da7cf0315
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 23 16:10:14 2014 +0000

    coverity#1158446 Uninitialized scalar field
    
    Change-Id: I66135f813adbf25c69e667f9ac0198edf7bbc12d

diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index fda3fbb..4590e79 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -86,7 +86,7 @@ class SwMultiPortion : public SwLinePortion
     sal_Bool bTab1      :1; // First line tabulator
     sal_Bool bTab2      :1; // Second line includes tabulator
     sal_Bool bDouble    :1; // Double line
-    bool bRuby      :1; // Phonetics
+    bool bRuby          :1; // Phonetics
     sal_Bool bBidi      :1;
     sal_Bool bTop       :1; // Phonetic position
     sal_Bool bFormatted :1; // Already formatted
@@ -94,20 +94,31 @@ class SwMultiPortion : public SwLinePortion
     sal_uInt8 nDirection:2; // Direction (0/90/180/270 degrees)
     sal_Bool bFlyInCntnt:1; // Fly as character inside
 protected:
-    SwMultiPortion( sal_Int32 nEnd ) : pFldRest( 0 ), bTab1( sal_False ),
-        bTab2( sal_False ), bDouble( sal_False ), bRuby( false ),
-        bBidi( sal_False ), bFormatted( sal_False ), bFollowFld( sal_False ),
-        nDirection( 0 ), bFlyInCntnt( sal_False )
-        { SetWhichPor( POR_MULTI ); SetLen( nEnd ); }
-    inline void SetDouble() { bDouble = sal_True; }
-    inline void SetRuby() { bRuby = true; }
-    inline void SetBidi() { bBidi = sal_True; }
-    inline void SetTop( sal_Bool bNew ) { bTop = bNew; }
-    inline void SetTab1( sal_Bool bNew ) { bTab1 = bNew; }
-    inline void SetTab2( sal_Bool bNew ) { bTab2 = bNew; }
-    inline void SetDirection( sal_uInt8 nNew ) { nDirection = nNew; }
-    inline sal_Bool GetTab1() const { return bTab1; }
-    inline sal_Bool GetTab2() const { return bTab2; }
+    SwMultiPortion(sal_Int32 nEnd)
+        : pFldRest(0)
+        , bTab1(false)
+        , bTab2(false)
+        , bDouble(false)
+        , bRuby(false)
+        , bBidi(false)
+        , bTop(false)
+        , bFormatted(false)
+        , bFollowFld(false)
+        , nDirection(0)
+        , bFlyInCntnt(false)
+    {
+        SetWhichPor(POR_MULTI);
+        SetLen(nEnd);
+    }
+    void SetDouble() { bDouble = sal_True; }
+    void SetRuby() { bRuby = true; }
+    void SetBidi() { bBidi = sal_True; }
+    void SetTop( sal_Bool bNew ) { bTop = bNew; }
+    void SetTab1( sal_Bool bNew ) { bTab1 = bNew; }
+    void SetTab2( sal_Bool bNew ) { bTab2 = bNew; }
+    void SetDirection( sal_uInt8 nNew ) { nDirection = nNew; }
+    sal_Bool GetTab1() const { return bTab1; }
+    sal_Bool GetTab2() const { return bTab2; }
 public:
     ~SwMultiPortion();
     const SwLineLayout& GetRoot() const { return aRoot; }


More information about the Libreoffice-commits mailing list