diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-08-21 07:02:46 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-08-21 09:23:35 +0200 |
commit | f672ba611a8cef83acad3233d27dc6414b463a42 (patch) | |
tree | b32249d10bc1f3f04a844ae8a2fed6dd3d3f8ada /sw/source/filter/ww8/docxattributeoutput.cxx | |
parent | 9b1f4aac63e0f1e5453485f8b4c36c9020bbea03 (diff) |
fdo#53175: Fixed the end of hyperlinks
This fixes the end of hyperlinks appearing after field ends (while the
start of hyperlink is after field start too).
Change-Id: If21b8973baaca183e0103e3a70ed98b99aa59392
(cherry picked from commit c1c2688912e769dfd7654e11e87dae380a8ce1eb)
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.cxx')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 71d39af70793..34e383cc2ae6 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -573,6 +573,7 @@ void DocxAttributeOutput::EndRun() m_pSerializer->startElementNS( XML_w, XML_hyperlink, xAttrList ); m_pHyperlinkAttrList = NULL; + m_startedHyperlink = true; } DoWriteBookmarks( ); @@ -588,16 +589,21 @@ void DocxAttributeOutput::EndRun() WritePostponedMath(); + if ( m_closeHyperlinkInThisRun ) + { + if ( m_startedHyperlink ) + { + m_pSerializer->endElementNS( XML_w, XML_hyperlink ); + m_startedHyperlink = false; + } + m_closeHyperlinkInThisRun = false; + } + while ( m_Fields.begin() != m_Fields.end() ) { EndField_Impl( m_Fields.front( ) ); m_Fields.erase( m_Fields.begin( ) ); } - if ( m_closeHyperlinkInThisRun ) - { - m_pSerializer->endElementNS( XML_w, XML_hyperlink ); - m_closeHyperlinkInThisRun = false; - } // if there is some redlining in the document, output it EndRedline(); @@ -4375,6 +4381,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri m_pParentFrame( NULL ), m_closeHyperlinkInThisRun( false ), m_closeHyperlinkInPreviousRun( false ), + m_startedHyperlink( false ), m_postponedGraphic( NULL ), m_postponedMath( NULL ), m_postitFieldsMaxId( 0 ), |