summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2022-10-24 13:52:27 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2022-11-02 03:02:18 +0100
commita04ed691ea3f4891c98e7dde0344d461cb9def18 (patch)
tree0cc5025c6aa79c70f652a904085dc328e99ebce5
parenttdf#151462 - Search for outline node containing the current node (diff)
downloadcore-a04ed691ea3f4891c98e7dde0344d461cb9def18.tar.gz
core-a04ed691ea3f4891c98e7dde0344d461cb9def18.zip
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>
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8020576cfcab..f62fb4440929 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 )