diff options
author | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2018-04-20 17:48:54 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2018-04-21 07:40:04 +0200 |
commit | e82eeca67688a809317a0edeecf7d7b3fdf3a216 (patch) | |
tree | f7978de0fdf29f62f90af24850b2921cccb8f0aa | |
parent | 94acabe8d0cb555e76635c4bceeb48a14bd16a2b (diff) |
tdf#112323: Sort the category list alphabetically in the Customize dialog
And add multiple separators as per the Design Team's request
Change-Id: I8dd692207fc85d75d585dc486d2c8723444f8a5e
Reviewed-on: https://gerrit.libreoffice.org/53216
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
-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) ); |