sw/source/filter/ww8/docxattributeoutput.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit bcc1b51cfe3bdd8289ac8f2b9803428d052d6d2a Author: LuboÅ¡ LuÅák <l.lu...@suse.cz> Date: Mon Jan 9 15:51:10 2012 +0100 fdo#46337: don't use an invalidated iterator (cherry picked from commit 2df1c40b4b7cb3107a68984db644f10097f04c3c) Signed-off-by: Michael Stahl <mst...@redhat.com> Signed-off-by: Petr Mladek <pmla...@suse.cz> Signed-off-by: Norbert Thiebaud <nthieb...@gmail.com> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 5dfb281..a8d29cb 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -515,7 +515,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 ) @@ -526,10 +526,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
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits