Kaydet (Commit) b5e98cef authored tarafından Michael Stahl's avatar Michael Stahl

sw: DOCX export fix non-well-formed XML if hyperlink followed by ruby

If a hyperlink ends on the same position as a ruby starts, the hyperlink is
not closed before the ruby so its end tag is written inside the ruby
element.  Example: fdo82849-1.odt

Change-Id: I4531327ee23a99e366c2de5d9b08ddabb1be69c7
(cherry picked from commit 84ea33ef)
üst 7d848348
......@@ -2125,6 +2125,12 @@ 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);
}
m_pSerializer->startElementNS( XML_w, XML_ruby, FSEND );
m_pSerializer->startElementNS( XML_w, XML_rubyPr, FSEND );
// hps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment