diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-08-19 23:43:39 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-08-20 00:14:51 +0200 |
commit | cf7db8226240ca7f425cf649e164767988c80001 (patch) | |
tree | 69b6b2c983ea7f417d58c862636c9d510ff8d9b1 /include | |
parent | o3tl: cow_wrapper add move constructor/assignment (diff) | |
download | core-cf7db8226240ca7f425cf649e164767988c80001.tar.gz core-cf7db8226240ca7f425cf649e164767988c80001.zip |
handle new color picker correctly in chart sidebar
This implements the basics for that and implements it in the AreaPanel.
Change-Id: I6d9e5012bbcc2c953d478a09a839f35f2ef64c5b
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/sidebar/SidebarToolBox.hxx | 2 | ||||
-rw-r--r-- | include/svx/PaletteManager.hxx | 5 | ||||
-rw-r--r-- | include/svx/sidebar/AreaPropertyPanelBase.hxx | 3 | ||||
-rw-r--r-- | include/svx/tbcontrl.hxx | 4 |
4 files changed, 13 insertions, 1 deletions
diff --git a/include/sfx2/sidebar/SidebarToolBox.hxx b/include/sfx2/sidebar/SidebarToolBox.hxx index a3959698278e..574603b22e6d 100644 --- a/include/sfx2/sidebar/SidebarToolBox.hxx +++ b/include/sfx2/sidebar/SidebarToolBox.hxx @@ -61,6 +61,8 @@ public: const css::uno::Reference<css::frame::XToolbarController>& rxController, const OUString& rsCommandName); + css::uno::Reference<css::frame::XToolbarController> GetFirstController(); + private: Image maItemSeparator; diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx index 7ad0cdb8ee86..561dcac43d93 100644 --- a/include/svx/PaletteManager.hxx +++ b/include/svx/PaletteManager.hxx @@ -50,6 +50,8 @@ class PaletteManager std::deque<Color> maRecentColors; std::vector<std::unique_ptr<Palette>> m_Palettes; + std::function<void(const OUString&, const Color&)> maColorSelectFunction; + public: PaletteManager(); ~PaletteManager(); @@ -69,6 +71,9 @@ public: void SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater); void PopupColorPicker(const OUString& aCommand); + + void SetColorSelectFunction(std::function<void(const OUString&, const Color&)> aColorSelectFunction); + static void DispatchColorCommand(const OUString& aCommand, const Color& rColor); }; diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx index 9fdbba114366..24ebcedc07ba 100644 --- a/include/svx/sidebar/AreaPropertyPanelBase.hxx +++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx @@ -23,6 +23,7 @@ #include <vcl/ctrl.hxx> #include <sfx2/sidebar/SidebarPanelBase.hxx> #include <sfx2/sidebar/ControllerItem.hxx> +#include <sfx2/sidebar/SidebarToolBox.hxx> #include <svx/xgrad.hxx> #include <svx/itemwin.hxx> #include <svx/xfillit0.hxx> @@ -124,7 +125,7 @@ protected: VclPtr<FixedText> mpColorTextFT; VclPtr<SvxFillTypeBox> mpLbFillType; VclPtr<SvxFillAttrBox> mpLbFillAttr; - VclPtr<ToolBox> mpToolBoxColor; // for new color picker + VclPtr<sfx2::sidebar::SidebarToolBox> mpToolBoxColor; // for new color picker VclPtr<FixedText> mpTrspTextFT; VclPtr<ListBox> mpLBTransType; VclPtr<MetricField> mpMTRTransparent; diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx index 9e589ac44f59..584b99ed64eb 100644 --- a/include/svx/tbcontrl.hxx +++ b/include/svx/tbcontrl.hxx @@ -225,6 +225,7 @@ public: Color GetColor(); }; +typedef std::function<void(const OUString&, const Color&)> ColorSelectFunction; class SVX_DLLPUBLIC SvxColorToolBoxControl : public SfxToolBoxControl { using SfxToolBoxControl::StateChanged; @@ -233,6 +234,7 @@ class SVX_DLLPUBLIC SvxColorToolBoxControl : public SfxToolBoxControl PaletteManager mPaletteManager; BorderColorStatus maBorderColorStatus; bool bSidebarType; + ColorSelectFunction maColorSelectFunction; DECL_LINK(SelectedHdl, Color*); public: SFX_DECL_TOOLBOX_CONTROL(); @@ -247,6 +249,8 @@ public: // XSubToolbarController virtual sal_Bool SAL_CALL opensSubToolbar() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL updateImage() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + void setColorSelectFunction(ColorSelectFunction aColorSelectFunction); }; class SVX_DLLPUBLIC SvxFrameToolBoxControl : public SfxToolBoxControl |