tdf#151384 DOCX export: lost hyperlink format in localized UI
Fix losing color and underline of hyperlinks in localized
builds, at least with Russian UI.
Regression from commit d57b4480903f700ad7c95e885b9dd0ace5883cfc
"tdf#127579 DOCX export: fix losing color and underline of ODT hyperlinks".
Change-Id: I1eebcf58a7071226e80df3f84ed1264c5a8baf31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141761
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index f6c8ff6..dd62105 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8589,9 +8589,13 @@ void DocxAttributeOutput::CharHighlight( const SvxBrushItem& rHighlight )
void DocxAttributeOutput::TextINetFormat( const SwFormatINetFormat& rLink )
{
OString aStyleId = MSWordStyles::CreateStyleId(rLink.GetINetFormat());
if (!aStyleId.isEmpty() && !aStyleId.equalsIgnoreAsciiCase("DefaultStyle"))
m_pSerializer->singleElementNS(XML_w, XML_rStyle, FSNS(XML_w, XML_val), aStyleId);
const SwCharFormat* pFormat = m_rExport.m_rDoc.FindCharFormatByName(rLink.GetINetFormat());
if (pFormat)
{
OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(pFormat)));
if (!aStyleId.equalsIgnoreAsciiCase("DefaultStyle"))
m_pSerializer->singleElementNS(XML_w, XML_rStyle, FSNS(XML_w, XML_val), aStyleId);
}
}
void DocxAttributeOutput::TextCharFormat( const SwFormatCharFormat& rCharFormat )