diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2024-01-07 18:31:22 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2024-01-15 21:07:27 +0100 |
commit | 035cd913e0361cce9d799eb3b331b6d7bcf7910e (patch) | |
tree | 8d3b81d3ec7e5c1258e150b75b598a2cea4e7373 /include | |
parent | deec43b36446ac3ac5c77b88bf47e4e0a4ba2057 (diff) |
sc: announce theme colors with lok callback
As it is done already for Writer. Unfortunately cannot
move the code from afterCallbackRegistered to base class
in sfx2 as it is not linked to svx which is needed to
generate JSON. So at least share generation and sending
part in ThemeColorChangerCommon.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Icbf681230bd4c49698c47d852a0862620d93bcec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161771
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161927
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/theme/IThemeColorChanger.hxx | 10 | ||||
-rw-r--r-- | include/svx/theme/ThemeColorChangerCommon.hxx | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/svx/theme/IThemeColorChanger.hxx b/include/svx/theme/IThemeColorChanger.hxx index d9273238c712..0b3b88d60afa 100644 --- a/include/svx/theme/IThemeColorChanger.hxx +++ b/include/svx/theme/IThemeColorChanger.hxx @@ -11,6 +11,7 @@ #include <svx/svxdllapi.h> #include <docmodel/theme/ColorSet.hxx> +#include "ThemeColorChangerCommon.hxx" namespace svx { @@ -18,7 +19,14 @@ class SVXCORE_DLLPUBLIC IThemeColorChanger { public: virtual ~IThemeColorChanger() = default; - virtual void apply(std::shared_ptr<model::ColorSet> const& pColorSet) = 0; + void apply(std::shared_ptr<model::ColorSet> const& pColorSet) + { + doApply(pColorSet); + svx::theme::notifyLOK(pColorSet); + } + +private: + virtual void doApply(std::shared_ptr<model::ColorSet> const& pColorSet) = 0; }; } // end svx namespace diff --git a/include/svx/theme/ThemeColorChangerCommon.hxx b/include/svx/theme/ThemeColorChangerCommon.hxx index febc34ae3873..3a585236fbf8 100644 --- a/include/svx/theme/ThemeColorChangerCommon.hxx +++ b/include/svx/theme/ThemeColorChangerCommon.hxx @@ -21,6 +21,8 @@ namespace theme { SVXCORE_DLLPUBLIC void updateSdrObject(model::ColorSet const& rColorSet, SdrObject* pObject, SdrView* pView, SfxUndoManager* pUndoManager = nullptr); + +SVXCORE_DLLPUBLIC void notifyLOK(std::shared_ptr<model::ColorSet> const& pColorSet); } } // end svx namespace |