summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2025-07-07 11:48:06 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2025-07-07 16:46:17 +0200
commitce27c8f9d0bf900edb6c84d129c7ac0fbb7a765d (patch)
tree77af201b6ee28eea1800f628130c84b730818482
parentd7bf3a17cb27da1a58163e9db657f0a8d8344901 (diff)
move some data into rodataHEADmaster
Change-Id: Iaa77f8a430740c112f1c13943ff6d97890a33bc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187473 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--sax/source/tools/converter.cxx24
1 files changed, 12 insertions, 12 deletions
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 },