summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-05-11 17:51:49 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-05-17 11:14:57 +0200
commitc25f8f0468a830cfd855389261a7b7250ef712b1 (patch)
treee47f75eaaf59a8c3502ac954c5da988912e8536b /include
parenta13264fc7578cbd3267065f4992ded9f7558ec7a (diff)
sc: change (char, background) style colors when changing the theme
This adds a Calc specific ThemeColorChanger, which changes the character and background colors in styles. In addition add the changes that make this possible - support in SvxBrushItem for the ComplexColor, making sure that ComplexColor is properly passed to other items (mainly from color picker),... Change-Id: Id2e98c42bbe195a0f75cc8951ff69f6d7eea6be0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151667 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/editeng/brushitem.hxx22
-rw-r--r--include/editeng/colritem.hxx14
-rw-r--r--include/editeng/memberids.h1
3 files changed, 29 insertions, 8 deletions
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index 522bf92e1bfa..b995c7fa0637 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -16,15 +16,13 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_EDITENG_BRUSHITEM_HXX
-#define INCLUDED_EDITENG_BRUSHITEM_HXX
+#pragma once
#include <tools/color.hxx>
#include <svl/poolitem.hxx>
#include <editeng/editengdllapi.h>
#include <memory>
-
-// class SvxBrushItem ----------------------------------------------------
+#include <docmodel/color/ComplexColor.hxx>
class Graphic;
class GraphicObject;
@@ -43,6 +41,7 @@ enum SvxGraphicPosition
class EDITENG_DLLPUBLIC SvxBrushItem final : public SfxPoolItem
{
Color aColor;
+ model::ComplexColor maComplexColor;
Color aFilterColor;
sal_Int32 nShadingValue;
mutable std::unique_ptr<GraphicObject> xGraphicObject;
@@ -59,7 +58,8 @@ public:
static SfxPoolItem* CreateDefault();
explicit SvxBrushItem( sal_uInt16 nWhich );
- SvxBrushItem( const Color& rColor, sal_uInt16 nWhich );
+ SvxBrushItem(Color const& rColor, sal_uInt16 nWhich);
+ SvxBrushItem(Color const& rColor, model::ComplexColor const& rComplexColor, sal_uInt16 nWhich);
SvxBrushItem( const Graphic& rGraphic,
SvxGraphicPosition ePos, sal_uInt16 nWhich );
@@ -91,6 +91,16 @@ public:
Color& GetColor() { return aColor; }
void SetColor( const Color& rCol) { aColor = rCol; }
+ model::ComplexColor getComplexColor() const
+ {
+ return maComplexColor;
+ }
+
+ void setComplexColor(model::ComplexColor const& rComplexColor)
+ {
+ maComplexColor = rComplexColor;
+ }
+
const Color& GetFiltColor() const { return aFilterColor; }
void SetFiltColor( const Color& rCol) { aFilterColor = rCol; }
@@ -117,6 +127,4 @@ public:
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
-#endif // INCLUDED_EDITENG_BRUSHITEM_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index dca36a5b9fda..e70b27b577e5 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -58,7 +58,19 @@ public:
{
return mColor;
}
- void SetValue(const Color& rNewColor);
+ void SetValue(const Color& rNewColor)
+ {
+ mColor = rNewColor;
+ }
+
+ const Color& getColor() const
+ {
+ return mColor;
+ }
+ void setColor(const Color& rNewColor)
+ {
+ mColor = rNewColor;
+ }
model::ComplexColor const& getComplexColor() const { return maComplexColor; }
void setComplexColor(model::ComplexColor const& rComplexColor) { maComplexColor = rComplexColor; }
diff --git a/include/editeng/memberids.h b/include/editeng/memberids.h
index e5f1f075290a..5787f70ae1e8 100644
--- a/include/editeng/memberids.h
+++ b/include/editeng/memberids.h
@@ -169,6 +169,7 @@
#define MID_BACK_COLOR_R_G_B 8
#define MID_BACK_COLOR_TRANSPARENCY 9
#define MID_SHADING_VALUE 10
+#define MID_BACKGROUND_COMPLEX_COLOR 11
//SvxFormatBreakItem
#define MID_BREAK_BEFORE 0