[Libreoffice-commits] .: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 21 07:49:17 PDT 2012


 sw/source/core/layout/ftnfrm.cxx  |    3 +--
 sw/source/core/layout/sectfrm.cxx |    4 ++--
 sw/source/core/layout/tabfrm.cxx  |    3 +--
 3 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 5e56827888797f80d35ed71536b81b9854bb5ce7
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Oct 21 16:47:37 2012 +0200

    Fix some Variable "X" is reassigned a value before the old one has been used
    
    Change-Id: I6df132f670c771f18b3aa7ae87b14adf266b64a4

diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index ad5ae9e..baa7be1 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -795,9 +795,8 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn )
 {
     //Der Vorgaenger fuer eine Fussnote ist falls moeglich der Master
     //in der Fussnoteneigenen Verkettung.
-    SwLayoutFrm *pRet = 0;
     SwFtnFrm *pFtn = FindFtnFrm();
-    pRet = pFtn->GetMaster();
+    SwLayoutFrm *pRet = pFtn->GetMaster();
 
     SwFtnBossFrm* pOldBoss = FindFtnBossFrm();
     SwPageFrm *pOldPage = pOldBoss->FindPageFrm();
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index a0f1413..e9df733 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -612,9 +612,9 @@ static SwCntntFrm* lcl_GetNextCntntFrm( const SwLayoutFrm* pLay, bool bFwd )
     sal_Bool bGoingUp = sal_True;
     do {
         const SwFrm *p = 0;
-        sal_Bool bGoingFwdOrBwd = sal_False, bGoingDown = sal_False;
+        sal_Bool bGoingFwdOrBwd = sal_False;
 
-        bGoingDown = !bGoingUp && ( 0 !=  ( p = pFrm->IsLayoutFrm() ? ((SwLayoutFrm*)pFrm)->Lower() : 0 ) );
+        sal_Bool bGoingDown = !bGoingUp && ( 0 !=  ( p = pFrm->IsLayoutFrm() ? ((SwLayoutFrm*)pFrm)->Lower() : 0 ) );
         if ( !bGoingDown )
         {
             bGoingFwdOrBwd = ( 0 != ( p = pFrm->IsFlyFrm() ?
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 57b8801..af3373a 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -5524,10 +5524,9 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
         return (Frm().*fnRect->fnGetHeight)();
     }
 
-    SwRowFrm* pFirstRow = 0;
     SwTwips nTmpHeight = 0;
 
-    pFirstRow = GetFirstNonHeadlineRow();
+    SwRowFrm* pFirstRow = GetFirstNonHeadlineRow();
     OSL_ENSURE( !IsFollow() || pFirstRow, "FollowTable without Lower" );
 
     // NEW TABLES


More information about the Libreoffice-commits mailing list