[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Fri May 13 07:02:35 PDT 2011


 sw/source/core/frmedt/feshview.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit ca1d46a4dff0e83245abe09cf87764147a8125d9
Author: Oliver-Rainer Wittmann <od at openoffice.org>
Date:   Fri May 13 16:00:26 2011 +0200

    sw34bf06: #i117863# SwFEShell::GetSectionWidth(): correct for-loop conditions
    
    Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>

diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 8a8a1c6..ef9becd 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2804,9 +2804,13 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const
         while( pSect );
     }
     SwIterator<SwSectionFrm,SwFmt> aIter( rFmt );
-    for ( SwSectionFrm* pSct = aIter.First(); pFrm; pFrm = aIter.Next() )
-            if( !pSct->IsFollow() )
-                return pSct->Frm().Width();
+    for ( SwSectionFrm* pSct = aIter.First(); pSct; pSct = aIter.Next() )
+    {
+        if( !pSct->IsFollow() )
+        {
+            return pSct->Frm().Width();
+        }
+    }
     return 0;
 }
 


More information about the Libreoffice-commits mailing list