diff options
author | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2017-08-13 07:36:46 +0300 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-09-04 22:39:46 +0200 |
commit | 3e4de4d63c897fdaa885909f7abb1b3f111458d2 (patch) | |
tree | b40954161bb2eadd1ec62a3e3ccb9d5ff17cec6b /cui | |
parent | 3652f6624528abcb5bcba3b637232d1422242eb3 (diff) |
Initialize and update command categories and functions for the Toolbar tab
Change-Id: I27a12fc9e337796fc153e1d243eeba37564ef5c1
Reviewed-on: https://gerrit.libreoffice.org/41104
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/SvxToolbarConfigPage.cxx | 14 | ||||
-rw-r--r-- | cui/source/inc/SvxToolbarConfigPage.hxx | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index ef6f2969f9c7..55240bf1a0d5 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -125,6 +125,8 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe LINK( this, SvxToolbarConfigPage, SelectToolbar ) ); m_pContentsListBox->SetSelectHdl( LINK( this, SvxToolbarConfigPage, SelectToolbarEntry ) ); + m_pCommandCategoryListBox->SetSelectHdl( + LINK( this, SvxToolbarConfigPage, SelectCategory ) ); m_pMoveUpButton->SetClickHdl ( LINK( this, SvxToolbarConfigPage, MoveHdl) ); m_pMoveDownButton->SetClickHdl ( LINK( this, SvxToolbarConfigPage, MoveHdl) ); @@ -291,6 +293,12 @@ void SvxToolbarConfigPage::Init() m_pTopLevelListBox->SelectEntryPos(nPos); m_pTopLevelListBox->GetSelectHdl().Call(*m_pTopLevelListBox); + + m_pCommandCategoryListBox->Init( + comphelper::getProcessComponentContext(), + m_xFrame, + vcl::CommandInfoProvider::GetModuleIdentifier(m_xFrame)); + m_pCommandCategoryListBox->categorySelected( m_pFunctions ); } SaveInData* SvxToolbarConfigPage::CreateSaveInData( @@ -308,6 +316,12 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, SelectToolbarEntry, SvTreeListBox *, void UpdateButtonStates(); } +IMPL_LINK_NOARG( SvxToolbarConfigPage, SelectCategory, ListBox&, void ) +{ + m_pCommandCategoryListBox->categorySelected( m_pFunctions ); +} + + void SvxToolbarConfigPage::UpdateButtonStates() { m_pDescriptionField->SetText(""); diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx b/cui/source/inc/SvxToolbarConfigPage.hxx index 02a23979865e..21d63fbe81ff 100644 --- a/cui/source/inc/SvxToolbarConfigPage.hxx +++ b/cui/source/inc/SvxToolbarConfigPage.hxx @@ -56,6 +56,8 @@ private: DECL_LINK( AddFunctionHdl, SvxScriptSelectorDialog&, void ); DECL_LINK( MoveHdl, Button *, void ); + DECL_LINK( SelectCategory, ListBox&, void ); + void UpdateButtonStates() override; short QueryReset() override; void Init() override; |