Kaydet (Commit) e82eeca6 authored tarafından Muhammet Kara's avatar Muhammet Kara

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/53216Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMuhammet Kara <muhammet.kara@pardus.org.tr>
üst 94acabe8
......@@ -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) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment