[Libreoffice-commits] core.git: i18npool/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 14 23:31:18 UTC 2021
i18npool/source/nativenumber/nativenumbersupplier.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit e8c373d1da87256933ece80b896ecd0f03c8cb43
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Sat May 15 00:48:32 2021 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Sat May 15 01:30:34 2021 +0200
Related: tdf#128314 Add NatNum12 modifier 'lower' attribute
Similar to capitalize, upper and title.
Change-Id: I5933362e69ebbc3cf31de4258aceec5677b76653
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115640
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index b437edcd198e..8541c9739e84 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -637,12 +637,13 @@ OUString NativeNumberSupplierService::getNativeNumberString(const OUString& aNum
if (nNativeNumberMode == NativeNumberMode::NATNUM12)
{
- // handle capitalization prefixes "capitalize", "upper" and "title"
+ // handle capitalization prefixes "capitalize", "upper", "lower" and "title"
enum WhichCasing
{
CAPITALIZE,
UPPER,
+ LOWER,
TITLE
};
@@ -656,6 +657,7 @@ OUString NativeNumberSupplierService::getNativeNumberString(const OUString& aNum
{
{ std::u16string_view(u"capitalize"), CAPITALIZE },
{ std::u16string_view(u"upper"), UPPER },
+ { std::u16string_view(u"lower"), LOWER },
{ std::u16string_view(u"title"), TITLE }
};
@@ -685,6 +687,8 @@ OUString NativeNumberSupplierService::getNativeNumberString(const OUString& aNum
(aStr.getLength() > 1 ? aStr.copy(1) : OUString());
case UPPER:
return xCharClass->toUpper(aStr, 0, aStr.getLength(), aLocale);
+ case LOWER:
+ return xCharClass->toLower(aStr, 0, aStr.getLength(), aLocale);
case TITLE:
return xCharClass->toTitle(aStr, 0, aStr.getLength(), aLocale);
}
More information about the Libreoffice-commits
mailing list