diff options
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index ab2dbdc242a6..c3abc3d1b0e3 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1197,14 +1197,17 @@ SwFltStackEntry* SwWW8FltControlStack::SetAttr(const SwPosition& rPos, sal_uInt1 if (m_rReader.m_xPlcxMan && m_rReader.m_xPlcxMan->GetDoingDrawTextBox()) { size_t nCnt = size(); - for (size_t i=0; i < nCnt; ++i) + size_t i = 0; + while (i < nCnt) { SwFltStackEntry& rEntry = (*this)[i]; if (nAttrId == rEntry.m_pAttr->Which()) { - DeleteAndDestroy(i--); + DeleteAndDestroy(i); --nCnt; + break; } + ++i; } } else // Normal case, set the attribute into the document |