sw/source/filter/ww8/docxattributeoutput.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 2dfd9e3e00f6e57ab1b307cf57c01a0830da4b17
Author:     Tünde Tóth <toth.tu...@nisz.hu>
AuthorDate: Mon Oct 24 13:52:27 2022 +0200
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Thu Oct 27 18:09:33 2022 +0200

    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 <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@numbertext.org>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index f6c8ff6902b9..dd6210566bfa 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 )

Reply via email to