diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-19 13:18:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-05 09:39:11 +0200 |
commit | 14cfff500e93f0d6cbf8412065feea85c01ea81d (patch) | |
tree | 76e3fb8fbf2b0d8a12c8406d8cf994ea6a37aaff /svx/inc/spacing.hrc | |
parent | d924ce30e0ca260682bd2aed192b8b1b2ca3e7c0 (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 'svx/inc/spacing.hrc')
-rw-r--r-- | svx/inc/spacing.hrc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/inc/spacing.hrc b/svx/inc/spacing.hrc index 8c9ba6da29a2..280e534b4896 100644 --- a/svx/inc/spacing.hrc +++ b/svx/inc/spacing.hrc @@ -9,11 +9,11 @@ #ifndef INCLUDED_SVX_INC_SPACING_HRC #define INCLUDED_SVX_INC_SPACING_HRC -#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) +#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String)) struct measurement { - const char* key; + TranslateId key; int twips; int human; }; @@ -29,7 +29,7 @@ const measurement RID_SVXSTRARY_SPACING_INCH[] = { NC_("RID_SVXSTRARY_SPACING_INCH", "Medium Large (1/2″)"), 720, 0 }, { NC_("RID_SVXSTRARY_SPACING_INCH", "Large (3/4″)"), 1077, 0 }, { NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Large (1″)"), 1440, 0 }, - { nullptr, 0, 0 } + { {}, 0, 0 } }; // To translators: this is a listbox labelled by "Spacing:", cm units @@ -50,7 +50,7 @@ const measurement RID_SVXSTRARY_SPACING_CM[] = { NC_("RID_SVXSTRARY_SPACING_CM", "Large (%1)"), 1077, 190 }, // Extra Large (2.54 cm) { NC_("RID_SVXSTRARY_SPACING_CM", "Extra Large (%1)"), 1440, 254 }, - { nullptr, 0, 0 } + { {}, 0, 0 } }; // To translators: this is a listbox labelled by "Margins:", inch units @@ -64,7 +64,7 @@ const measurement RID_SVXSTRARY_MARGINS_INCH[] = { NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium Large (1/2″)"), 720, 0 }, { NC_("RID_SVXSTRARY_MARGINS_INCH", "Large (3/4″)"), 1077, 0 }, { NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Large (1″)"), 1440, 0 }, - { nullptr, 0, 0 } + { {}, 0, 0 } }; // To translators: this is a listbox labelled by "Margins:", cm units @@ -85,7 +85,7 @@ const measurement RID_SVXSTRARY_MARGINS_CM[] = { NC_("RID_SVXSTRARY_MARGINS_CM", "Large (%1)"), 1077, 190 }, // Extra Large (2.54 cm) { NC_("RID_SVXSTRARY_MARGINS_CM", "Extra Large (%1)"), 1440, 254 }, - { nullptr, 0, 0 } + { {}, 0, 0 } }; #endif |