summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-23 12:21:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-23 13:56:36 +0000
commit23d66e25c0ede411d00404dcc7a36e880c22e67f (patch)
treeae3b74e0c906873a24f143fa66dd35aa8e05950c /sw
parent039cbb09351c133df81c4303ce30b327e07ff40a (diff)
aPosArr.Remove(0, n) shouldn't be aPosArr.clear(), but aPosArr.erase(...)
i.e. a0a1c3f4fb730ed3614593c3d8ddb50c23204c29 looks really dubious
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/docnode/ndtbl.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index cda90ba7a1e7..242f2859f809 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -2971,6 +2971,7 @@ sal_Bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth
if( aPosArr.size() )
{
for( n = 0; n < aPosArr.size(); ++n )
+ {
if( aPosArr[ n ] == nOffset )
break;
else if( aPosArr[ n ] > nOffset )
@@ -2979,8 +2980,9 @@ sal_Bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth
--n;
break;
}
+ }
- aPosArr.clear();
+ aPosArr.erase(aPosArr.begin(), aPosArr.begin()+n);
aBoxes.Remove( 0, n );
// dann die Positionen der neuen Size anpassen