summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2022-06-17 10:56:27 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-07-01 11:45:08 +0200
commit0538861f641578149c4de84862b4acd574737908 (patch)
tree0e9437743dfc572b1ee34853c3054fadcc669491
parentUpdate git submodules (diff)
downloadcore-0538861f641578149c4de84862b4acd574737908.tar.gz
core-0538861f641578149c4de84862b4acd574737908.zip
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 <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit e53984f798dc4730a5fb348d2b44ab85812c7fc0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136385 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
-rw-r--r--sw/source/filter/ww8/styles.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx8
3 files changed, 6 insertions, 10 deletions
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,