summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-11-02 15:32:36 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2018-11-02 19:42:17 +0100
commit0b2d153f58c83fb289c96b348631e44e553b1a9a (patch)
treeece5760493ccf7a025ef32251cfa0a075c8c8e79 /cui
parent5929d8ea469a971aa77371ed4b841c90a36e7da5 (diff)
Sort list of icon styles by DisplayName
Change-Id: I9829341cb54e9a5964c9d018de89511a262069b7 Reviewed-on: https://gerrit.libreoffice.org/62784 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgdlg.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index d87f6dedc6ee..c6b01cd9754d 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -615,6 +615,11 @@ void CanvasSettings::EnabledHardwareAcceleration( bool _bEnabled ) const
// class OfaViewTabPage --------------------------------------------------
+static bool DisplayNameCompareLessThan(const vcl::IconThemeInfo& rInfo1, const vcl::IconThemeInfo& rInfo2)
+{
+ return rInfo1.GetDisplayName().compareTo(rInfo2.GetDisplayName()) < 0;
+}
+
OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "OptViewPage", "cui/ui/optviewpage.ui", &rSet)
, nSizeLB_InitialSelection(0)
@@ -671,6 +676,7 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_pIconStyleLB->Clear();
StyleSettings aStyleSettings = Application::GetSettings().GetStyleSettings();
mInstalledIconThemes = aStyleSettings.GetInstalledIconThemes();
+ std::sort(mInstalledIconThemes.begin(), mInstalledIconThemes.end(), DisplayNameCompareLessThan);
// Start with the automatically chosen icon theme
OUString autoThemeId = aStyleSettings.GetAutomaticallyChosenIconTheme();