diff options
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.cxx')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 54b511c12701..022ee0bcda5c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2135,12 +2135,9 @@ void DocxAttributeOutput::RawText( const OUString& /*rText*/, bool /*bForceUnico void DocxAttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby ) { OSL_TRACE("TODO DocxAttributeOutput::StartRuby( const SwTextNode& rNode, const SwFormatRuby& rRuby )" ); - if (m_closeHyperlinkInThisRun) - { - EndRun(); // end hyperlink before starting ruby to avoid overlap - assert(!m_closeHyperlinkInThisRun); - assert(!m_closeHyperlinkInPreviousRun); - } + EndRun(); // end run before starting ruby to avoid nested runs, and overlap + assert(!m_closeHyperlinkInThisRun); // check that no hyperlink overlaps ruby + assert(!m_closeHyperlinkInPreviousRun); m_pSerializer->startElementNS( XML_w, XML_ruby, FSEND ); m_pSerializer->startElementNS( XML_w, XML_rubyPr, FSEND ); // hps @@ -2205,6 +2202,7 @@ void DocxAttributeOutput::EndRuby() EndRun( ); m_pSerializer->endElementNS( XML_w, XML_rubyBase ); m_pSerializer->endElementNS( XML_w, XML_ruby ); + StartRun(nullptr); // open Run again so OutputTextNode loop can close it } bool DocxAttributeOutput::AnalyzeURL( const OUString& rUrl, const OUString& rTarget, OUString* pLinkURL, OUString* pMark ) |