summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-08-20 05:36:21 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-08-20 05:37:09 +0200
commit82c46f1877c65042ac976312267c14bf0e5847f4 (patch)
tree786111bbd417a050adcf0392c153d17e015f6f36
parenta8647dd0301c179b25aa819d3479e04ea672fd8f (diff)
fdo#53175: docx export, close hyperlinks before fields
Change-Id: Ic723149675c3fe2fca08c4ec095d14c5a39f4a8f
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index cbca1b64a400..c3143e123f31 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -575,17 +575,18 @@ void DocxAttributeOutput::EndRun()
WritePostponedMath();
- while ( m_Fields.begin() != m_Fields.end() )
- {
- EndField_Impl( m_Fields.front( ) );
- m_Fields.erase( m_Fields.begin( ) );
- }
+ // Close fields before any field end as we have started them after the field
if ( m_closeHyperlinkInThisRun )
{
m_pSerializer->endElementNS( XML_w, XML_hyperlink );
m_closeHyperlinkInThisRun = false;
}
+ while ( m_Fields.begin() != m_Fields.end() )
+ {
+ EndField_Impl( m_Fields.front( ) );
+ m_Fields.erase( m_Fields.begin( ) );
+ }
// if there is some redlining in the document, output it
EndRedline();
}