summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-12-13 08:41:10 +0100
committerMiklos Vajna <vmiklos@collabora.com>2022-06-29 09:04:59 +0200
commit8259a1ac609aaed4cea9c1d4e77c99d50037d287 (patch)
treee3c35f5f47ac328cad81443bf757c82a84d611d5 /editeng
parentae2b901849bbc6a1a75ea3c9b855676617e0958e (diff)
ODP import/export: refer to theme from shape text color with effects
Handle luminance modulation and offset (i.e. lighter and darker colors). (cherry picked from commit 7d1e4d12baa85d47f5945872a3bc186dd6ce1889) Conflicts: xmloff/source/token/tokens.txt Change-Id: I536bbca1ed994e991c7ceac153d6a47cb6ef35f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136528 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/uno/unotext.cxx27
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;
}
}