summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i18npool/source/nativenumber/nativenumbersupplier.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index 8c3698216b81..459d4bc97637 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -674,7 +674,8 @@ OUString NativeNumberSupplierService::getNativeNumberString(const OUString& aNum
switch (Casings[nCasing].eCasing)
{
case CAPITALIZE:
- return xCharClass->toTitle(aStr, 0, 1, aLocale) + aStr.copy(1);
+ return xCharClass->toTitle(aStr, 0, 1, aLocale) +
+ (aStr.getLength() > 1 ? aStr.copy(1) : OUString());
case UPPER:
return xCharClass->toUpper(aStr, 0, aStr.getLength(), aLocale);
case TITLE: