sax/source/tools/converter.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
New commits: commit ce27c8f9d0bf900edb6c84d129c7ac0fbb7a765d Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Jul 7 11:48:06 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Jul 7 16:46:17 2025 +0200 move some data into rodata Change-Id: Iaa77f8a430740c112f1c13943ff6d97890a33bc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187473 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index f27fc325e26d..3b390e80a60c 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -50,18 +50,6 @@ using namespace com::sun::star::util; namespace sax { -const std::string_view gpsMM = "mm"; -const std::string_view gpsCM = "cm"; -const std::string_view gpsPT = "pt"; -const std::string_view gpsINCH = "in"; -const std::string_view gpsPC = "pc"; -const std::string_view gpsPX = "px"; -const std::string_view gpsPERCENT = "%"; -const std::string_view gpsFONT_EM = "em"; -const std::string_view gpsFONT_IC = "ic"; - -const sal_Int8 XML_MAXDIGITSCOUNT_TIME = 14; - static sal_Int64 toInt64_WithLength(const sal_Unicode * str, sal_Int16 radix, sal_Int32 nStrLength ) { return rtl_ustr_toInt64_WithLength(str, radix, nStrLength); @@ -73,6 +61,18 @@ static sal_Int64 toInt64_WithLength(const char * str, sal_Int16 radix, sal_Int32 namespace { +constexpr std::string_view gpsMM = "mm"; +constexpr std::string_view gpsCM = "cm"; +constexpr std::string_view gpsPT = "pt"; +constexpr std::string_view gpsINCH = "in"; +constexpr std::string_view gpsPC = "pc"; +constexpr std::string_view gpsPX = "px"; +constexpr std::string_view gpsPERCENT = "%"; +constexpr std::string_view gpsFONT_EM = "em"; +constexpr std::string_view gpsFONT_IC = "ic"; + +const sal_Int8 XML_MAXDIGITSCOUNT_TIME = 14; + const std::map<sal_Int16, std::string_view> stConvertMeasureUnitStrMap{ { MeasureUnit::MM, gpsMM }, { MeasureUnit::CM, gpsCM }, { MeasureUnit::INCH, gpsINCH }, { MeasureUnit::POINT, gpsPT },