include/svx/Palette.hxx | 6 ++++++ include/svx/PaletteManager.hxx | 4 ++-- include/svx/colorwindow.hxx | 3 --- svx/source/tbxctrls/PaletteManager.cxx | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-)
New commits: commit de1ac1c349435a229aec8682f8f8a796c3ca4dc5 Author: Stephan Bergmann <[email protected]> AuthorDate: Tue Nov 17 18:20:24 2020 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Tue Nov 17 23:43:26 2020 +0100 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 <[email protected]> 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) diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 1e19ecd10b56..f3630cc492aa 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -292,7 +292,7 @@ void PaletteManager::SetBtnUpdater(svx::ToolboxButtonColorUpdaterBase* pBtnUpdat mpBtnUpdater = pBtnUpdater; } -void PaletteManager::SetColorSelectFunction(const std::function<void(const OUString&, const NamedColor&)>& aColorSelectFunction) +void PaletteManager::SetColorSelectFunction(const ColorSelectFunction& aColorSelectFunction) { maColorSelectFunction = aColorSelectFunction; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
