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>
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx
index ef6f296..55240bf 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 02a2397..21d63fb 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;