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>
(cherry picked from commit 2dfd9e3e00f6e57ab1b307cf57c01a0830da4b17)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142134
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8020576..f62fb44 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8527,9 +8527,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 )