diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-11-17 18:20:24 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-11-17 23:43:26 +0100 |
commit | de1ac1c349435a229aec8682f8f8a796c3ca4dc5 (patch) | |
tree | 9b22061cb7ba8dfbd3ddf856d75529f7bf358427 /include | |
parent | 93b1adf7442839dcfbf16660b1fbe1139f14a4d0 (diff) |
Reuse ColorSelectFunction from colorwindow.hxx in PaletteManager.hxx
Change-Id: I86b9bf57cbb5ee7e2b0d189d6ff78a3fbc9145fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106021
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/Palette.hxx | 6 | ||||
-rw-r--r-- | include/svx/PaletteManager.hxx | 4 | ||||
-rw-r--r-- | include/svx/colorwindow.hxx | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx index 96417c7d3257..0ccc644a8b01 100644 --- a/include/svx/Palette.hxx +++ b/include/svx/Palette.hxx @@ -19,6 +19,10 @@ #ifndef INCLUDED_SVX_PALETTE_HXX #define INCLUDED_SVX_PALETTE_HXX +#include <sal/config.h> + +#include <functional> + #include <rtl/ustring.hxx> class Color; @@ -26,6 +30,8 @@ class SvxColorValueSet; typedef std::pair<Color, OUString> NamedColor; +typedef std::function<void(const OUString&, const NamedColor&)> ColorSelectFunction; + class Palette { public: diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx index dbcf789f5cfd..5d22e1d1f42d 100644 --- a/include/svx/PaletteManager.hxx +++ b/include/svx/PaletteManager.hxx @@ -45,7 +45,7 @@ class SVXCORE_DLLPUBLIC PaletteManager std::deque<NamedColor> maRecentColors; std::vector<std::unique_ptr<Palette>> m_Palettes; - std::function<void(const OUString&, const NamedColor&)> maColorSelectFunction; + ColorSelectFunction maColorSelectFunction; css::uno::Reference < css::uno::XComponentContext > m_context; public: PaletteManager(); @@ -69,7 +69,7 @@ public: void SetBtnUpdater(svx::ToolboxButtonColorUpdaterBase* pBtnUpdater); void PopupColorPicker(weld::Window* pParent, const OUString& aCommand, const Color& rInitialColor); - void SetColorSelectFunction(const std::function<void(const OUString&, const NamedColor&)>& aColorSelectFunction); + void SetColorSelectFunction(const ColorSelectFunction& aColorSelectFunction); static void DispatchColorCommand(const OUString& aCommand, const NamedColor& rColor); }; diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx index ac141611d103..05917b2dfcfc 100644 --- a/include/svx/colorwindow.hxx +++ b/include/svx/colorwindow.hxx @@ -26,8 +26,6 @@ #include <svx/Palette.hxx> #include <vcl/toolbox.hxx> -#include <functional> - namespace com::sun::star::frame { class XFrame; } class PaletteManager; @@ -45,7 +43,6 @@ public: }; class Button; -typedef std::function<void(const OUString&, const NamedColor&)> ColorSelectFunction; #define COL_NONE_COLOR ::Color(0x80, 0xFF, 0xFF, 0xFF) |