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.versini@pm.me>
This commit is contained in:
Arnaud VERSINI
2025-08-25 14:57:20 +02:00
committed by Arnaud Versini
parent 9540041bdd
commit 4b8371bffd
2 changed files with 7 additions and 2 deletions
+1
View File
@@ -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 \
))
+6 -2
View File
@@ -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)
{