diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2021-09-02 10:38:14 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2021-09-03 11:59:17 +0200 |
commit | ef3dd0e04e734974ff9a6b7f30d0377ecd952842 (patch) | |
tree | df05031bd006061427f6d9217bdfd7061d3ef52f /cui/source | |
parent | e72a7368b368a822d2400ee7db60312226ad3195 (diff) |
Resolves tdf#120333 - Access to color palettes via tight extensions
Change-Id: I3311115854a29eaddf76b847642250626b7032ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121498
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 3f18d069f6e4..b5af2475a218 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -675,6 +675,7 @@ private: std::unique_ptr<weld::Button> m_xBtnAdd; std::unique_ptr<weld::Button> m_xBtnDelete; std::unique_ptr<weld::Button> m_xBtnWorkOn; + std::unique_ptr<weld::Button> m_xMoreColors; std::unique_ptr<weld::CustomWeld> m_xCtlPreviewOld; std::unique_ptr<weld::CustomWeld> m_xCtlPreviewNew; std::unique_ptr<weld::CustomWeld> m_xValSetColorListWin; @@ -692,6 +693,7 @@ private: DECL_LINK(ClickAddHdl_Impl, weld::Button&, void); DECL_LINK(ClickWorkOnHdl_Impl, weld::Button&, void); DECL_LINK(ClickDeleteHdl_Impl, weld::Button&, void); + DECL_STATIC_LINK(SvxColorTabPage, OnMoreColorsClick, weld::Button&, void); DECL_LINK(SelectPaletteLBHdl, weld::ComboBox&, void); DECL_LINK( SelectValSetHdl_Impl, ValueSet*, void ); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 7be82dca2676..a5f2e7b7aa98 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -35,6 +35,7 @@ #include <svx/strings.hrc> #include <officecfg/Office/Common.hxx> #include <osl/diagnose.h> +#include <comphelper/dispatchcommand.hxx> using namespace com::sun::star; @@ -75,6 +76,7 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController* , m_xBtnAdd(m_xBuilder->weld_button("add")) , m_xBtnDelete(m_xBuilder->weld_button("delete")) , m_xBtnWorkOn(m_xBuilder->weld_button("edit")) + , m_xMoreColors(m_xBuilder->weld_button("btnMoreColors")) , m_xCtlPreviewOld(new weld::CustomWeld(*m_xBuilder, "oldpreview", m_aCtlPreviewOld)) , m_xCtlPreviewNew(new weld::CustomWeld(*m_xBuilder, "newpreview", m_aCtlPreviewNew)) , m_xValSetColorListWin(new weld::CustomWeld(*m_xBuilder, "colorset", *m_xValSetColorList)) @@ -128,6 +130,9 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController* m_xBtnDelete->set_sensitive(false); m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) ); + m_xMoreColors->set_from_icon_name("cmd/sc_additionsdialog.png"); + m_xMoreColors->connect_clicked(LINK(this, SvxColorTabPage, OnMoreColorsClick)); + // disable preset color values m_xRGBpreset->set_sensitive(false); m_xCMYKpreset->set_sensitive(false); @@ -536,6 +541,15 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectColorModeHdl_Impl, weld::Toggleable&, voi UpdateColorValues(); } + +IMPL_STATIC_LINK_NOARG(SvxColorTabPage, OnMoreColorsClick, weld::Button&, void) +{ + css::uno::Sequence<css::beans::PropertyValue> aArgs(1); + aArgs[0].Name = "AdditionsTag"; + aArgs[0].Value <<= OUString("Color Palette"); + comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs); +} + void SvxColorTabPage::ChangeColor(const Color &rNewColor, bool bUpdatePreset ) { aPreviousColor = rNewColor; |