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 #include +#include +#include +#include + 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 stConvertMeasureUnitStrMap{ +constexpr auto stConvertMeasureUnitStrMap = frozen::make_unordered_map({ { 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) {