diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-12-13 08:41:10 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-12-13 10:10:10 +0100 |
commit | 7d1e4d12baa85d47f5945872a3bc186dd6ce1889 (patch) | |
tree | 8a93e32e5bf381addea2aefac964b2b0a48b1869 /editeng | |
parent | 416e38c589635b6817a550cb9272e68ddc9bc9e9 (diff) |
ODP import/export: refer to theme from shape text color with effects
Handle luminance modulation and offset (i.e. lighter and darker colors).
Change-Id: I536bbca1ed994e991c7ceac153d6a47cb6ef35f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126722
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/uno/unotext.cxx | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 50aa8a9d632d..16ffaaa8bbfa 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -1133,14 +1133,31 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf if(bItemStateSet) { - if (pMap->nWID == EE_CHAR_COLOR && pMap->nMemberId == MID_COLOR_THEME_INDEX) + if (pMap->nWID == EE_CHAR_COLOR) { - // Theme can be DEFAULT_VALUE, even if the same pool item has a color which is a - // DIRECT_VALUE. + // Theme & effects can be DEFAULT_VALUE, even if the same pool item has a color + // which is a DIRECT_VALUE. const SvxColorItem* pColor = pSet->GetItem<SvxColorItem>(EE_CHAR_COLOR); - if (pColor->GetThemeIndex() == -1) + switch (pMap->nMemberId) { - eItemState = SfxItemState::DEFAULT; + case MID_COLOR_THEME_INDEX: + if (pColor->GetThemeIndex() == -1) + { + eItemState = SfxItemState::DEFAULT; + } + break; + case MID_COLOR_LUM_MOD: + if (pColor->GetLumMod() == 10000) + { + eItemState = SfxItemState::DEFAULT; + } + break; + case MID_COLOR_LUM_OFF: + if (pColor->GetLumOff() == 0) + { + eItemState = SfxItemState::DEFAULT; + } + break; } } |