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>
(cherry picked from commit db28a0cc2e11e1319509e13172fadf4b54d50ecf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145715
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145738
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 0020d8f..4159ce0 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 7397a9b..454b696 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: