include/svl/zforlist.hxx | 6 +++++- sc/qa/uitest/calc_tests/formatCells.py | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit 5c2a4be7de9b49b43dd7d4bd0d83d33922c425ae Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Jan 16 13:43:13 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Jan 18 15:46:02 2023 +0000 tdf#153006 ordering of date/time formats in report builder regression from commit 17d2247a66b6a9e3105b0a8b8e6d6b5bea5e3ed4 Author: Noel Grandin <noelgran...@gmail.com> Date: Fri Aug 13 19:03:23 2021 +0200 formatter maps can use unordered_map Change-Id: Ibc4bc71776a48c61fb9b651672404f9507c1f082 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit db28a0cc2e11e1319509e13172fadf4b54d50ecf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145715 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145738 diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index 0020d8fde6a3..4159ce0fbebc 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -28,6 +28,7 @@ #include <com/sun/star/util/NumberFormat.hpp> #include <unotools/localedatawrapper.hxx> +#include <map> #include <unordered_map> namespace com::sun::star::i18n { struct Currency; } @@ -279,7 +280,10 @@ enum NfEvalDateFormat }; -typedef std::unordered_map<sal_uInt32, SvNumberformat*> SvNumberFormatTable; +/// This table is std::map because it needs to preserve insertion order, +/// because the formats are roughly ordered from most to least common, and some +/// parts of the UI want to show them in that order. +typedef std::map<sal_uInt32, SvNumberformat*> SvNumberFormatTable; typedef std::unordered_map<sal_uInt16, sal_uInt32> SvNumberFormatterIndexTable; typedef std::unordered_map< sal_uInt32, sal_uInt32> SvNumberFormatterMergeMap; diff --git a/sc/qa/uitest/calc_tests/formatCells.py b/sc/qa/uitest/calc_tests/formatCells.py index 7397a9b9c76d..454b69638742 100644 --- a/sc/qa/uitest/calc_tests/formatCells.py +++ b/sc/qa/uitest/calc_tests/formatCells.py @@ -403,6 +403,4 @@ class formatCell(UITestCase): xspinDegrees.executeAction("UP", tuple()) self.assertEqual(get_state_as_dict(xspinDegrees)["Text"].replace('°', ''), "0") - - # vim: set shiftwidth=4 softtabstop=4 expandtab: