From db28a0cc2e11e1319509e13172fadf4b54d50ecf Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 16 Jan 2023 13:43:13 +0200 Subject: tdf#153006 ordering of date/time formats in report builder regression from commit 17d2247a66b6a9e3105b0a8b8e6d6b5bea5e3ed4 Author: Noel Grandin 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 --- include/svl/zforlist.hxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/svl') 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 #include +#include #include namespace com::sun::star::i18n { struct Currency; } @@ -279,7 +280,10 @@ enum NfEvalDateFormat }; -typedef std::unordered_map 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 SvNumberFormatTable; typedef std::unordered_map SvNumberFormatterIndexTable; typedef std::unordered_map< sal_uInt32, sal_uInt32> SvNumberFormatterMergeMap; -- cgit v1.2.3