sw/source/core/txtnode/ndtxt.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 09a015e64e0433652beaca2d5294162c20d97a8b
Author: Matteo Casalin <matteo.casa...@yahoo.com>
Date:   Sat Feb 23 22:55:15 2013 +0100

    Slight simplification of loop
    
    Change-Id: I8eccb85962c07933d0bc5771067d3c533933e90b

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 9c271c2..421d09e 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2946,15 +2946,13 @@ XubString SwTxtNode::GetExpandTxt( const xub_StrLen 
nIdx,
         }
     }
 
-    if ( bWithSpacesForLevel && GetActualListLevel() > 0 )
+    if (bWithSpacesForLevel)
     {
-        int nLevel( GetActualListLevel() );
-        while ( nLevel > 0 )
+        const sal_Unicode aSpace = ' ';
+        for (int nLevel = GetActualListLevel(); nLevel > 0; --nLevel)
         {
-            const sal_Unicode aSpace = ' ';
             aTxt.Insert( aSpace , 0 );
             aTxt.Insert( aSpace , 0 );
-            --nLevel;
         }
     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to