sax/Library_sax.mk             |    1 +
 sax/source/tools/converter.cxx |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 4b8371bffd3855141b4154e850bf7f6adeb7d97d
Author:     Arnaud VERSINI <arnaud.vers...@pm.me>
AuthorDate: Sun Aug 24 18:05:38 2025 +0200
Commit:     Arnaud Versini <arnaud.vers...@pm.me>
CommitDate: Mon Aug 25 14:57:20 2025 +0200

    sax : use frozen::unordered_map instaed std::map
    
    Change-Id: I845a71b22debf8b786048a8b4132e5ef87434600
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190136
    Tested-by: Jenkins
    Reviewed-by: Arnaud Versini <arnaud.vers...@pm.me>

diff --git a/sax/Library_sax.mk b/sax/Library_sax.mk
index 7188041f1bf4..115f1f704218 100644
--- a/sax/Library_sax.mk
+++ b/sax/Library_sax.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_Library_use_common_precompiled_header,sax))
 $(eval $(call gb_Library_use_sdk_api,sax))
 
 $(eval $(call gb_Library_use_externals,sax,\
+       frozen \
        libxml2 \
        expat \
 ))
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index f1521ef1141c..162b9427ad30 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -43,6 +43,10 @@
 #include <map>
 #include <string_view>
 
+#include <frozen/bits/defines.h>
+#include <frozen/bits/elsa_std.h>
+#include <frozen/unordered_map.h>
+
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::util;
@@ -73,13 +77,13 @@ constexpr std::string_view gpsFONT_IC = "ic";
 
 const sal_Int8 XML_MAXDIGITSCOUNT_TIME = 14;
 
-const std::map<sal_Int16, std::string_view> stConvertMeasureUnitStrMap{
+constexpr auto stConvertMeasureUnitStrMap = 
frozen::make_unordered_map<sal_Int16, std::string_view>({
     { MeasureUnit::MM, gpsMM },          { MeasureUnit::CM, gpsCM },
     { MeasureUnit::INCH, gpsINCH },      { MeasureUnit::POINT, gpsPT },
     { MeasureUnit::PICA, gpsPC },        { MeasureUnit::PERCENT, gpsPERCENT },
     { MeasureUnit::PIXEL, gpsPX },       { MeasureUnit::FONT_EM, gpsFONT_EM },
     { MeasureUnit::FONT_CJK_ADVANCE, gpsFONT_IC }
-};
+});
 
 o3tl::Length Measure2O3tlUnit(sal_Int16 nUnit)
 {

Reply via email to