summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-11-21 11:41:38 +0300
committerMiklos Vajna <vmiklos@collabora.com>2020-11-30 11:01:03 +0100
commit81ecdd52ef2f3d390327a0bf6b6fa906805843f7 (patch)
tree3b4947a40f34e929c47311951a60b5721d891d61 /writerfilter/source/dmapper
parent7f477f8dd85c84c9c1a9e673b685dc0e03d1d45a (diff)
tdf#137683 writerfilter Char highlight: import "none"
Importing a charHighlight of NONE is critical, since charHighlight can be set on a higher para-style, and so there needs to be a way to cancel it with direct formatting. DOC already imports NONE. This adds it for RTF and DOCX. (None of the formats EXPORT it though. So that needs to be done, but try not to spam NONE settings where they are not necessary, please.) Change-Id: Ic5d03ceb81a3a079c827b81561deb9068ae8259e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106314 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter/source/dmapper')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index aac420a97500..91b68dd1db77 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3801,7 +3801,7 @@ void DomainMapper::handleParaJustification(const sal_Int32 nIntValue, const ::to
bool DomainMapper::getColorFromId(const Id nId, sal_Int32 &nColor)
{
nColor = 0;
- if ((nId < NS_ooxml::LN_Value_ST_HighlightColor_black) || (nId > NS_ooxml::LN_Value_ST_HighlightColor_lightGray))
+ if ((nId < NS_ooxml::LN_Value_ST_HighlightColor_black) || (nId > NS_ooxml::LN_Value_ST_HighlightColor_none))
return false;
switch (nId)
@@ -3822,6 +3822,7 @@ bool DomainMapper::getColorFromId(const Id nId, sal_Int32 &nColor)
case NS_ooxml::LN_Value_ST_HighlightColor_darkYellow: nColor=0x808000; break;
case NS_ooxml::LN_Value_ST_HighlightColor_darkGray: nColor=0x808080; break;
case NS_ooxml::LN_Value_ST_HighlightColor_lightGray: nColor=0xC0C0C0; break;
+ case NS_ooxml::LN_Value_ST_HighlightColor_none: nColor=0xFFFFFFFF; break; //COL_AUTO
default:
return false;
}