[Libreoffice-commits] .: sw/source

Julien Nabet serval2412 at kemper.freedesktop.org
Fri Jun 17 13:21:04 PDT 2011


 sw/source/core/layout/tabfrm.cxx  |    4 ++--
 sw/source/core/layout/trvlfrm.cxx |    2 +-
 sw/source/core/text/txtfly.cxx    |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 99bd32dd82bb5133f6e2b17cb24c307d81eb25fa
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Fri Jun 17 22:20:49 2011 +0200

    Some cppcheck cleaning

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index c6699c2..343dce3 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -376,7 +376,7 @@ void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow )
             while ( pTmp )
             {
                 // the frames have to be shrunk
-                if ( pTmp && pTmp->IsTabFrm() )
+                if ( pTmp->IsTabFrm() )
                 {
                     SwRowFrm* pTmpRow = (SwRowFrm*)((SwTabFrm*)pTmp)->Lower();
                     while ( pTmpRow )
@@ -3454,7 +3454,7 @@ sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &r
             if( Abs( nNewWidth - nOldWidth ) < 2 )
             {
                 if( sal_False ==
-                    ( bMoveAnyway = BwdMoveNecessary( pOldPage, Frm() ) > 1 ) )
+                    ( bMoveAnyway = (BwdMoveNecessary( pOldPage, Frm() ) > 1) ) )
                 {
                     SwRect aRect( pNewUpper->Prt() );
                     aRect.Pos() += pNewUpper->Frm().Pos();
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 49b85bc..b70d11c 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1731,7 +1731,7 @@ sal_Bool SwFrm::WannaRightPage() const
     OSL_ENSURE( pDesc, "No pagedescriptor" );
     sal_Bool bOdd;
     if( nPgNum )
-        bOdd = nPgNum % 2 ? sal_True : sal_False;
+        bOdd = (nPgNum % 2) ? sal_True : sal_False;
     else
     {
         bOdd = pPage->OnRightPage();
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 0eeecf3..7d7068a 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -1779,7 +1779,7 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
         MSHORT nIdx = 0;
         while( nIdx < nCount && (*pTmp)[ nIdx ] < nXPos )
             ++nIdx;
-        sal_Bool bOdd = nIdx % 2 ? sal_True : sal_False;
+        sal_Bool bOdd = (nIdx % 2) ? sal_True : sal_False;
         sal_Bool bSet = sal_True;
         if( bOdd )
             --nIdx; // innerhalb eines Intervalls


More information about the Libreoffice-commits mailing list