diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-09-20 19:20:59 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-11-16 14:19:40 +0100 |
commit | 5006dfcbc370e80bd159a9e957254b0ce09a6cdd (patch) | |
tree | cf00f2f3b8eed3eb7bdba5ce9e00aee9949c3929 /include/editeng | |
parent | Update git submodules (diff) | |
download | core-5006dfcbc370e80bd159a9e957254b0ce09a6cdd.tar.gz core-5006dfcbc370e80bd159a9e957254b0ce09a6cdd.zip |
Theme color and tint/shade attribute for SvxColorItem
To support theme colors the SvxColorItem must be extended with
an optional attribute theme index to define the index to which
theme color current color belongs and an optional tint/shade
attribute define how much the color ha been additionally tinted
or shaded.
[ Miklos: left out the potentially breaking svx/sdi/svxitems.sdi
changes. ]
(cherry picked from commit ccdbf815e00dbe2ba21f7e86b6743df100b7401f,
from the feature/themesupport2 branch)
Change-Id: Ifb0481770be675181dafa94cd2778f374fcf3c7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125296
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/colritem.hxx | 22 | ||||
-rw-r--r-- | include/editeng/memberids.h | 8 |
2 files changed, 28 insertions, 2 deletions
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx index afb1d9d15c18..ce51be7f3e30 100644 --- a/include/editeng/colritem.hxx +++ b/include/editeng/colritem.hxx @@ -31,6 +31,8 @@ class EDITENG_DLLPUBLIC SvxColorItem final : public SfxPoolItem { private: Color mColor; + sal_Int16 maThemeIndex; + sal_Int16 maTintShade; public: static SfxPoolItem* CreateDefault(); @@ -57,6 +59,26 @@ public: } void SetValue(const Color& rNewColor); + sal_Int16 GetThemeIndex() const + { + return maThemeIndex; + } + + void SetThemeIndex(sal_Int16 nIndex) + { + maThemeIndex = nIndex; + } + + sal_Int16 GetTintOrShade() const + { + return maTintShade; + } + + void SetTintOrShade(sal_Int16 nTintOrShade) + { + maTintShade = nTintOrShade; + } + void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; diff --git a/include/editeng/memberids.h b/include/editeng/memberids.h index 8a6c9d0e7769..c6d781da568a 100644 --- a/include/editeng/memberids.h +++ b/include/editeng/memberids.h @@ -178,8 +178,12 @@ #define MID_SHADOW_TRANSPARENCE 1 // SvxColorItem -#define MID_COLOR_RGB 0 -#define MID_COLOR_ALPHA 1 +#define MID_COLOR_RGB 0 +#define MID_COLOR_ALPHA 1 +//#define MID_GRAPHIC_TRANSPARENT 3 // used, but already defined above +#define MID_COLOR_THEME_INDEX 4 +#define MID_COLOR_TINT_OR_SHADE 5 + #endif |