[Libreoffice-commits] .: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 19 15:26:58 PST 2012


 sw/source/core/doc/tblafmt.cxx    |    3 +--
 sw/source/core/layout/flowfrm.cxx |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit f3ea8bb8f69db2398a3858de0dc9c3b0d8cc9774
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu Dec 20 00:25:25 2012 +0100

    Some cppcheck cleaning
    
    Change-Id: I04a7a1b119cb6cca4bf0dd0d576e5e051f99cc6f

diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index ea1630c..9762733 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -912,10 +912,9 @@ void SwTableAutoFmt::StoreTableProperties(const SwTable &table)
 
 sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions )
 {
-    sal_Bool    bRet = sal_True;
     sal_uInt16  nVal = 0;
     rStream >> nVal;
-    bRet = 0 == rStream.GetError();
+    sal_Bool bRet = 0 == rStream.GetError();
 
     if( bRet && (nVal == AUTOFORMAT_DATA_ID_X ||
             (AUTOFORMAT_DATA_ID_504 <= nVal && nVal <= AUTOFORMAT_DATA_ID)) )
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 8e6c686..188a760 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1983,7 +1983,6 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b
         // If our NewUpper lies in a SectionFrm, we need to make sure
         // that it won't destroy itself in Calc.
         SwSectionFrm* pSect = pNewUpper->FindSctFrm();
-        bool bUnlock = false;
         if( pSect )
         {
             // If we only switch column within our SectionFrm, we better don't
@@ -1991,7 +1990,7 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b
             // call us again, etc.
             if( pSect != rThis.FindSctFrm() )
             {
-                bUnlock = !pSect->IsColLocked();
+                bool bUnlock = !pSect->IsColLocked();
                 pSect->ColLock();
                 pNewUpper->Calc();
                 if( bUnlock )


More information about the Libreoffice-commits mailing list