diff options
author | shivam-51 <shivamhere247@gmail.com> | 2021-02-05 18:21:50 +0530 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-07 09:33:49 +0100 |
commit | 8dfad592b4ab0497c140a921b8f56977a383f1d1 (patch) | |
tree | 2c650f7751a915af70c0f2c59d504723978ede83 /svx | |
parent | 3d008f3bcd19a74cff0781cbd9a3d173892553cf (diff) |
tdf#140051 SI property values like "Bold" are now localisable
This patch now allows "Bold", "Italic" and "Normal" to
be localisable.
Change-Id: Icd8102ce84db9a3c68ab69f5f9eadf0cf04755b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110475
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/inspectorvalues.hrc | 4 | ||||
-rw-r--r-- | svx/source/sidebar/inspector/InspectorTextPanel.cxx | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/svx/inc/inspectorvalues.hrc b/svx/inc/inspectorvalues.hrc index 2a6c0d8cb03c..863b13b899e8 100644 --- a/svx/inc/inspectorvalues.hrc +++ b/svx/inc/inspectorvalues.hrc @@ -18,6 +18,10 @@ --------------------------------------------------------------------*/ // Node names +#define RID_NORMAL NC_("RID_ATTRIBUTE_NAMES_MAP", "Normal") +#define RID_BOLD NC_("RID_ATTRIBUTE_NAMES_MAP", "Bold") +#define RID_ITALIC NC_("RID_ATTRIBUTE_NAMES_MAP", "Italic") + #define RID_FALSE NC_("RID_ATTRIBUTE_NAMES_MAP", "False") #define RID_TRUE NC_("RID_ATTRIBUTE_NAMES_MAP", "True") diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx b/svx/source/sidebar/inspector/InspectorTextPanel.cxx index 7b07be9997c4..493c4e37451f 100644 --- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx +++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx @@ -79,8 +79,7 @@ static bool GetPropertyValues(const OUString& rPropName, const uno::Any& rAny, O } else if (awt::FontSlant eValue; rAny >>= eValue) { - rString = (eValue == awt::FontSlant_ITALIC) ? OUStringLiteral(u"italic") - : OUStringLiteral(u"normal"); + rString = SvxResId(eValue == awt::FontSlant_ITALIC ? RID_ITALIC : RID_NORMAL); } else if (tools::Long nValueLong; rAny >>= nValueLong) { @@ -92,8 +91,7 @@ static bool GetPropertyValues(const OUString& rPropName, const uno::Any& rAny, O else if (double fValue; rAny >>= fValue) { if (rPropName.indexOf("Weight") != -1) - rString - = (fValue > 100) ? std::u16string_view(u"bold") : std::u16string_view(u"normal"); + rString = SvxResId(fValue > 100 ? RID_BOLD : RID_NORMAL); else rString = OUString::number((round(fValue * 100)) / 100.00); } |