diff options
-rw-r--r-- | cui/source/customize/CommandCategoryListBox.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cui/source/customize/CommandCategoryListBox.cxx b/cui/source/customize/CommandCategoryListBox.cxx index 4d83f1147215..e68ad9ec0211 100644 --- a/cui/source/customize/CommandCategoryListBox.cxx +++ b/cui/source/customize/CommandCategoryListBox.cxx @@ -46,7 +46,7 @@ #include <cfg.hxx> //for SaveInData CommandCategoryListBox::CommandCategoryListBox(vcl::Window* pParent) - : ListBox( pParent, WB_BORDER | WB_DROPDOWN) + : ListBox( pParent, WB_BORDER | WB_DROPDOWN | WB_SORT ) , pStylesInfo( nullptr ) { SetDropDownLineCount(25); @@ -144,6 +144,9 @@ void CommandCategoryListBox::Init( SetEntryData( nEntryPos, m_aGroupInfo.back().get() ); } + // Separate the "All commands"category from the actual categories + AddSeparator( 0 ); + // Add the actual categories for (sal_Int32 i = 0; i < nGroupsLength; ++i) { @@ -169,8 +172,10 @@ void CommandCategoryListBox::Init( } // Separate regular commands from styles and macros - if (nEntryPos) - SetSeparatorPos(nEntryPos); + AddSeparator( GetEntryCount() - 1 ); + + // Stop sorting, and add Macros and Styles to the end of the list + SetStyle(GetStyle() & ~WB_SORT); // Add macros category OUString sMacros( CuiResId(RID_SVXSTR_MACROS) ); |