sw/source/filter/ww8/docxattributeoutput.cxx |    6 +++++-
 sw/source/filter/ww8/styles.cxx              |    2 +-
 sw/source/filter/ww8/wrtw8sty.cxx            |    8 --------
 3 files changed, 6 insertions(+), 10 deletions(-)

New commits:
commit 0ad5d133bd75ccd3a04505aaac7ad3f2f9105f76
Author:     Tünde Tóth <toth.tu...@nisz.hu>
AuthorDate: Fri Jun 17 10:56:27 2022 +0200
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Fri Jun 24 12:43:21 2022 +0200

    tdf#132781 DOCX: export interoperable hyperlink style names
    
    Similar to the paragraph styles, export default character
    style names instead of the localized ones to avoid e.g. not
    interoperable hyperlinks in MSO.
    
    Change-Id: I65678a564ae4e73a1d8319df364defd698381256
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136139
    Reviewed-by: László Németh <nem...@numbertext.org>
    Tested-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 769f120e97a8..3923f0ac7b63 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6977,7 +6977,11 @@ void DocxAttributeOutput::StartStyle( const OUString& 
rName, StyleType eType,
             if ( nWwId < ww::stiMax)
                 pEnglishName = ww::GetEnglishNameFromSti( 
static_cast<ww::sti>(nWwId ) );
             break;
-        case STYLE_TYPE_CHAR: pType = "character"; break;
+        case STYLE_TYPE_CHAR:
+            pType = "character";
+            if (nWwId < ww::stiMax)
+                pEnglishName = 
ww::GetEnglishNameFromSti(static_cast<ww::sti>(nWwId));
+            break;
         case STYLE_TYPE_LIST: pType = "numbering"; break;
     }
     pStyleAttributeList->add(FSNS( XML_w, XML_type ), pType);
diff --git a/sw/source/filter/ww8/styles.cxx b/sw/source/filter/ww8/styles.cxx
index 6f613b40fad6..86ec89a37798 100644
--- a/sw/source/filter/ww8/styles.cxx
+++ b/sw/source/filter/ww8/styles.cxx
@@ -113,7 +113,7 @@ namespace
             "Body Text Indent 3",
             "Block Text",
             "Hyperlink",
-            "Followed Hyperlink",
+            "FollowedHyperlink",
             "Strong",
             "Emphasis",
             "Document Map",
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx 
b/sw/source/filter/ww8/wrtw8sty.cxx
index 54a8a23f61e5..3175894c26a6 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -646,14 +646,6 @@ void MSWordStyles::OutputStyle( SwFormat* pFormat, 
sal_uInt16 nPos )
             // tdf#92335 don't export redundant DOCX import style "ListLabel"
             return;
         }
-        else if (aName.equalsIgnoreAsciiCase("Internet Link"))
-        {
-            aName = "Hyperlink";
-        }
-        else if (aName.equalsIgnoreAsciiCase("Visited Internet Link"))
-        {
-            aName = "FollowedHyperlink";
-        }
 
         m_rExport.AttrOutput().StartStyle( aName, (bFormatColl ? 
STYLE_TYPE_PARA : STYLE_TYPE_CHAR),
                 nBase, nWwNext, nWwLink, GetWWId( *pFormat ), nPos,

Reply via email to