summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-16 13:43:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-17 21:06:59 +0000
commitdb28a0cc2e11e1319509e13172fadf4b54d50ecf (patch)
treedaa51ceeb04b2a5f1d0ac8da996e88cfa4f435ae /include/svl
parentb5480ea6c55ff550390ac8d146a2996f7234712e (diff)
tdf#153006 ordering of date/time formats in report builder
regression from commit 17d2247a66b6a9e3105b0a8b8e6d6b5bea5e3ed4 Author: Noel Grandin <noelgrandin@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.grandin@collabora.co.uk>
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/zforlist.hxx6
1 files changed, 5 insertions, 1 deletions
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;