summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/docxattributeoutput.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.cxx')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index b23bcc075e0f..df37cf0f1c14 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -518,7 +518,7 @@ void DocxAttributeOutput::StartRun( const SwRedlineData* pRedlineData )
void DocxAttributeOutput::EndRun()
{
// Write field starts
- for ( std::vector<FieldInfos>::iterator pIt = m_Fields.begin(); pIt != m_Fields.end(); ++pIt )
+ for ( std::vector<FieldInfos>::iterator pIt = m_Fields.begin(); pIt != m_Fields.end(); )
{
// Add the fields starts for all but hyperlinks and TOCs
if ( pIt->bOpen && pIt->pField )
@@ -529,10 +529,11 @@ void DocxAttributeOutput::EndRun()
// Unknown fields sould be removed too
if ( !pIt->bClose || ( pIt->eType == ww::eUNKNOWN ) )
{
- m_Fields.erase( pIt );
- --pIt;
+ pIt = m_Fields.erase( pIt );
+ continue;
}
}
+ ++pIt;
}
// write the run properties + the text, already in the correct order