summaryrefslogtreecommitdiff
path: root/svtools/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-19 13:18:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-05 09:39:11 +0200
commit14cfff500e93f0d6cbf8412065feea85c01ea81d (patch)
tree76e3fb8fbf2b0d8a12c8406d8cf994ea6a37aaff /svtools/inc
parentd924ce30e0ca260682bd2aed192b8b1b2ca3e7c0 (diff)
Pass context and resource string down to boost::locale separately
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/inc')
-rw-r--r--svtools/inc/borderline.hrc4
-rw-r--r--svtools/inc/errtxt.hrc14
-rw-r--r--svtools/inc/langtab.hrc4
3 files changed, 11 insertions, 11 deletions
diff --git a/svtools/inc/borderline.hrc b/svtools/inc/borderline.hrc
index 05bb3c78f729..84ab7cc98fda 100644
--- a/svtools/inc/borderline.hrc
+++ b/svtools/inc/borderline.hrc
@@ -10,9 +10,9 @@
#include <editeng/borderline.hxx>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, SvxBorderLineStyle> RID_SVXSTR_BORDERLINE[] =
+const std::pair<TranslateId, SvxBorderLineStyle> RID_SVXSTR_BORDERLINE[] =
{
{ NC_("RID_SVXSTR_BORDERLINE", "None"), SvxBorderLineStyle::NONE },
{ NC_("RID_SVXSTR_BORDERLINE", "Solid"), SvxBorderLineStyle::SOLID },
diff --git a/svtools/inc/errtxt.hrc b/svtools/inc/errtxt.hrc
index 009badd70b54..a5dce85f3092 100644
--- a/svtools/inc/errtxt.hrc
+++ b/svtools/inc/errtxt.hrc
@@ -22,7 +22,7 @@
#include <svtools/sfxecode.hxx>
#include <svtools/soerr.hxx>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
const ErrMsgCode RID_ERRCTX[] =
{
@@ -41,10 +41,10 @@ const ErrMsgCode RID_ERRCTX[] =
{ NC_("RID_ERRCTX", "$(ERR) expanding entry") , ErrCode(ERRCTX_SFX_CREATEOBJSH) },
{ NC_("RID_ERRCTX", "$(ERR) loading BASIC of document $(ARG1)") , ErrCode(ERRCTX_SFX_LOADBASIC) },
{ NC_("RID_ERRCTX", "$(ERR) searching for an address"), ErrCode(ERRCTX_SFX_SEARCHADDRESS) },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
-const std::pair<const char*, ErrCodeClass> RID_ERRHDL_CLASS[] =
+const std::pair<TranslateId, ErrCodeClass> RID_ERRHDL_CLASS[] =
{
{ NC_("RID_ERRHDL", "Abort") , ErrCodeClass::Abort },
{ NC_("RID_ERRHDL", "Nonexistent object") , ErrCodeClass::NotExists },
@@ -65,7 +65,7 @@ const std::pair<const char*, ErrCodeClass> RID_ERRHDL_CLASS[] =
{ NC_("RID_ERRHDL", "Inadmissible value or data type") , ErrCodeClass::Sbx },
{ NC_("RID_ERRHDL", "BASIC runtime error") , ErrCodeClass::Runtime },
{ NC_("RID_ERRHDL", "BASIC syntax error") , ErrCodeClass::Compiler },
- { nullptr, ErrCodeClass::NONE }
+ { {}, ErrCodeClass::NONE }
};
const ErrMsgCode RID_ERRHDL[] =
@@ -132,7 +132,7 @@ const ErrMsgCode RID_ERRHDL[] =
{ NC_("RID_ERRHDL", "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first."), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE },
{ NC_("RID_ERRHDL", "File format error found at $(ARG1)(row,col)."), ERRCODE_SFX_FORMAT_ROWCOL },
{ NC_("RID_ERRHDL", "The filter for this file format is disabled in configuration. Please contact your systems administrator."), ERRCODE_IO_FILTERDISABLED },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
const ErrMsgCode RID_SO_ERROR_HANDLER[] =
@@ -145,13 +145,13 @@ const ErrMsgCode RID_SO_ERROR_HANDLER[] =
ERRCODE_SO_NOVERBS },
{ NC_("RID_ERRHDL", "Object does not support this action."),
ERRCODE_SO_NOTIMPL },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
const ErrMsgCode RID_SO_ERRCTX[] =
{
{ NC_("RID_ERRHDL", "$(ERR) activating object") , ErrCode(ERRCTX_SO_DOVERB) },
- { nullptr, ERRCODE_NONE }
+ { {}, ERRCODE_NONE }
};
diff --git a/svtools/inc/langtab.hrc b/svtools/inc/langtab.hrc
index e66375e115ac..d44b38294f5a 100644
--- a/svtools/inc/langtab.hrc
+++ b/svtools/inc/langtab.hrc
@@ -21,9 +21,9 @@
#include <i18nlangtag/lang.h>
-#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
-const std::pair<const char*, LanguageType> STR_ARR_SVT_LANGUAGE_TABLE[] =
+const std::pair<TranslateId, LanguageType> STR_ARR_SVT_LANGUAGE_TABLE[] =
{
{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "[None]") , LANGUAGE_NONE },
{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Unknown") , LANGUAGE_DONTKNOW },