summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-11-19 22:13:04 +0300
committerMiklos Vajna <vmiklos@collabora.com>2020-12-02 12:13:48 +0100
commit20574b4023952c8fbfa728590f3bdcf603633cca (patch)
tree8a4e6ab12320a327f265668537b35d9b30f43777 /writerfilter
parente32cebc36be252d9a72c700d31b9dbbb11b58b91 (diff)
tdf#138345 ms formats Char highlight: no import into char-style
MS Word ignores w:highlight in character styles, so don't import it. RES_CHRATR_HIGHLIGHT only exists in LO in order to support Microsoft's terrible idea of allowing two different attributes to define char background colour. So it should be safe to remove it from UNO. Change-Id: Ia2ee0bd61ee59dfa864e946024c8184747aa2b40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106183 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 91b68dd1db77..aff86268b215 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1602,6 +1602,14 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
break;
case NS_ooxml::LN_EG_RPrBase_highlight:
{
+ // MS Word completely ignores character highlighting in character styles.
+ if ( IsStyleSheetImport() )
+ {
+ const StyleSheetEntryPtr pCurrStyle = GetStyleSheetTable()->GetCurrentEntry();
+ if ( pCurrStyle && pCurrStyle->nStyleTypeCode == STYLE_TYPE_CHAR )
+ break;
+ }
+
// OOXML import uses an ID
if( IsOOXMLImport() )
{