sw/source/uibase/ribbar/workctrl.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit 9936f3ed49e2aaf06e30b733b26d9d7f427746ed Author: Jim Raykowski <rayk...@gmail..com> AuthorDate: Tue Mar 24 21:05:01 2020 -0800 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Mar 26 07:34:38 2020 +0100 Use make_sorted to alphabetize the Navigate By combobox instead of the std::map approach Change-Id: I2d983f4a38a534f0a98453bb8aa54298e09c62f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index feb999de7fc4..16ee3c8e00a5 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -51,7 +51,6 @@ #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/util/XURLTransformer.hpp> -#include <map> // Size check #define NAVI_ENTRIES 18 @@ -684,12 +683,12 @@ NavElementBox_Base::NavElementBox_Base( { m_xWidget->set_size_request(150, -1); - std::map<OUString, std::pair<sal_uInt16, rtl::OUString> > aStoreSortedNavigationIds; + m_xWidget->make_sorted(); + m_xWidget->freeze(); for (sal_uInt16 i = 0; i < NID_COUNT; i++) - aStoreSortedNavigationIds[SwResId(aNavigationStrIds[i])] = std::make_pair(aNavigationInsertIds[i], aNavigationImgIds[i]);// for ordering of Navigation Pane + m_xWidget->append(OUString::number(aNavigationInsertIds[i]), SwResId(aNavigationStrIds[i]), aNavigationImgIds[i]); + m_xWidget->thaw(); - for (auto const &itr : aStoreSortedNavigationIds) - m_xWidget->append(OUString::number(itr.second.first), itr.first, itr.second.second); m_xWidget->connect_changed(LINK(this, NavElementBox_Base, SelectHdl)); m_xWidget->connect_key_press(LINK(this, NavElementBox_Base, KeyInputHdl)); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits