diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-12-10 09:44:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-12-10 21:28:13 +0100 |
commit | 137c9e826cdce429a004f05bde40d274437d7554 (patch) | |
tree | 77c1fef9226f7166031507a6ad424ed2ccd10954 /svx/inc/spacing.hrc | |
parent | ca19ae6e0595f8b69fc4929072636bf10ca3027e (diff) |
Related: tdf#129267 format numbers with the UI locale
Change-Id: Ib7712f56140e5ef9a67700c8ea86383adbf2a4fc
Reviewed-on: https://gerrit.libreoffice.org/84800
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/inc/spacing.hrc')
-rw-r--r-- | svx/inc/spacing.hrc | 101 |
1 files changed, 61 insertions, 40 deletions
diff --git a/svx/inc/spacing.hrc b/svx/inc/spacing.hrc index 82f107fc67db..b8ca2661c528 100644 --- a/svx/inc/spacing.hrc +++ b/svx/inc/spacing.hrc @@ -13,60 +13,81 @@ #define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) +struct measurement +{ + const char* key; + int twips; + int human; +}; + // To translators: this is a listbox labelled by "Spacing:", inch units -const std::pair<const char*, int> RID_SVXSTRARY_SPACING_INCH[] = +const measurement RID_SVXSTRARY_SPACING_INCH[] = { - { NC_("RID_SVXSTRARY_SPACING_INCH", "None"), 0 }, - { NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Small (1/16″)"), 91 }, - { NC_("RID_SVXSTRARY_SPACING_INCH", "Small (1/8″)"), 181 }, - { NC_("RID_SVXSTRARY_SPACING_INCH", "Small Medium (1/4″)"), 363 }, - { NC_("RID_SVXSTRARY_SPACING_INCH", "Medium (3/8″)"), 539 }, - { NC_("RID_SVXSTRARY_SPACING_INCH", "Medium Large (1/2″)"), 720 }, - { NC_("RID_SVXSTRARY_SPACING_INCH", "Large (3/4″)"), 1077 }, - { NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Large (1″)"), 1440 }, - { nullptr, 0 } + { NC_("RID_SVXSTRARY_SPACING_INCH", "None"), 0, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Small (1/16″)"), 91, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Small (1/8″)"), 181, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Small Medium (1/4″)"), 363, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Medium (3/8″)"), 539, 0 }, + { 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 } }; // To translators: this is a listbox labelled by "Spacing:", cm units -const std::pair<const char*, int> RID_SVXSTRARY_SPACING_CM[] = +const measurement RID_SVXSTRARY_SPACING_CM[] = { - { NC_("RID_SVXSTRARY_SPACING_CM", "None"), 0 }, - { NC_("RID_SVXSTRARY_SPACING_CM", "Extra Small (0.16 cm)"), 91 }, - { NC_("RID_SVXSTRARY_SPACING_CM", "Small (0.32 cm)"), 181 }, - { NC_("RID_SVXSTRARY_SPACING_CM", "Small Medium (0.64 cm)"), 363 }, - { NC_("RID_SVXSTRARY_SPACING_CM", "Medium (0.95 cm)"), 539 }, - { NC_("RID_SVXSTRARY_SPACING_CM", "Medium Large (1.27 cm)"), 720 }, - { NC_("RID_SVXSTRARY_SPACING_CM", "Large (1.9 cm)"), 1077 }, - { NC_("RID_SVXSTRARY_SPACING_CM", "Extra Large (2.54 cm)"), 1440 }, - { nullptr, 0 } + { NC_("RID_SVXSTRARY_SPACING_CM", "None"), 0, 0 }, + // Extra Small (0.16 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Extra Small (%1)"), 91, 16 }, + // Small (0.32 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Small (%1)"), 181, 32 }, + // Small Medium (0.64 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Small Medium (%1)"), 363, 64 }, + // Medium (0.95 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Medium (%1)"), 539, 95 }, + // Medium Large (1.27 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Medium Large (%1)"), 720, 127 }, + // Large (1.9 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 } }; // To translators: this is a listbox labelled by "Margins:", inch units -const std::pair<const char*, int> RID_SVXSTRARY_MARGINS_INCH[] = +const measurement RID_SVXSTRARY_MARGINS_INCH[] = { - { NC_("RID_SVXSTRARY_MARGINS_INCH", "None"), 0 }, - { NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Small (1/16″)"), 91 }, - { NC_("RID_SVXSTRARY_MARGINS_INCH", "Small (1/8″)"), 181 }, - { NC_("RID_SVXSTRARY_MARGINS_INCH", "Small Medium (1/4″)"), 363 }, - { NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium (3/8″)"), 539 }, - { NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium Large (1/2″)"), 720 }, - { NC_("RID_SVXSTRARY_MARGINS_INCH", "Large (3/4″)"), 1077 }, - { NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Large (1″)"), 1440 }, - { nullptr, 0 } + { NC_("RID_SVXSTRARY_MARGINS_INCH", "None"), 0, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Small (1/16″)"), 91, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Small (1/8″)"), 181, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Small Medium (1/4″)"), 363, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium (3/8″)"), 539, 0 }, + { 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 } }; // To translators: this is a listbox labelled by "Margins:", cm units -const std::pair<const char*, int> RID_SVXSTRARY_MARGINS_CM[] = +const measurement RID_SVXSTRARY_MARGINS_CM[] = { - { NC_("RID_SVXSTRARY_MARGINS_CM", "None"), 0 }, - { NC_("RID_SVXSTRARY_MARGINS_CM", "Extra Small (0.16 cm)"), 91 }, - { NC_("RID_SVXSTRARY_MARGINS_CM", "Small (0.32 cm)"), 181 }, - { NC_("RID_SVXSTRARY_MARGINS_CM", "Small Medium (0.64 cm)"), 363 }, - { NC_("RID_SVXSTRARY_MARGINS_CM", "Medium (0.95 cm)"), 539 }, - { NC_("RID_SVXSTRARY_MARGINS_CM", "Medium Large (1.27 cm)"), 720 }, - { NC_("RID_SVXSTRARY_MARGINS_CM", "Large (1.9 cm)"), 1077 }, - { NC_("RID_SVXSTRARY_MARGINS_CM", "Extra Large (2.54 cm)"), 1440 }, - { nullptr, 0 } + { NC_("RID_SVXSTRARY_MARGINS_CM", "None"), 0, 0 }, + // Extra Small (0.16 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Extra Small (%1)"), 91, 16 }, + // Small (0.32 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Small (%1)"), 181, 32 }, + // Small Medium (0.64 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Small Medium (%1)"), 363, 64 }, + // Medium (0.95 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Medium (%1)"), 539, 95 }, + // Medium Large (1.27 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Medium Large (%1)"), 720, 127 }, + // Large (1.9 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 } }; #endif |