[Libreoffice-commits] .: sw/source

Julien Nabet serval2412 at kemper.freedesktop.org
Fri Feb 3 13:00:06 PST 2012


 sw/source/core/fields/cellfml.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 9d0136679e441413b6945d2a40aa892b50ee19a8
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Fri Feb 3 21:58:38 2012 +0100

    Fix iterator erase management (thank you Stephan)

diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 33b953e..99e48df 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -959,7 +959,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
                 break;
 
             // dann mal die Tabellenkoepfe raus:
-            for( SwSelBoxes::iterator it = rBoxes.begin(); it != rBoxes.end(); ++it )
+            for( SwSelBoxes::iterator it = rBoxes.begin(); it != rBoxes.end(); )
             {
                 pLine = it->second->GetUpper();
                 while( pLine->GetUpper() )
@@ -968,7 +968,10 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
                 if( pTbl->IsHeadline( *pLine ) )
                 {
                     rBoxes.erase( it++ );
-                    --it;
+                }
+                else
+                {
+                    ++it;
                 }
             }
         } while( sal_False );


More information about the Libreoffice-commits mailing list