diff options
author | László Németh <nemeth@numbertext.org> | 2018-06-12 11:50:05 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-06-20 20:24:37 +0200 |
commit | 261ff0cdf0e89a80f5d2af7ba5a331bc237a0ceb (patch) | |
tree | 00aea88431dc91e8fcf9b5a966ef7ca140bd589a /i18npool/source/calendar | |
parent | ec36da3788ffc7007dadc568d00f019c0ea831b4 (diff) |
NatNum12: fix and add capitalization prefixes, tdf#115007 follow-up
Limit NatNum12 conversion only for the selected parts of the
date format (this bug – double calls of getNumberText – was hidden
by the space prefix " " and empty return values at the first calls,
resulting unchanged dates yet).
New prefixes: "capitalize", "upper" and "title" to handle optional
capitalization. (In Calc, it was not possible to format the result of
NatNum formatting, but some languages often need capitalization
or title case to format numbers and currencies.)
Thanks code clean up using enum WhichCasing to Eike Rathke.
Change-Id: I5fceb784930e6bc6d376116f5a42ad49cd248a54
Reviewed-on: https://gerrit.libreoffice.org/55681
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'i18npool/source/calendar')
-rw-r--r-- | i18npool/source/calendar/calendar_gregorian.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index 9d8a4c1442d3..a4ac0acfe53d 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -935,7 +935,8 @@ Calendar_gregorian::getDisplayStringImpl( sal_Int32 nCalendarDisplayCode, sal_In } aOUStr = OUString::createFromAscii(aStr); } - if (nNativeNumberMode > 0) { + // NatNum12 used only for selected parts + if (nNativeNumberMode > 0 && nNativeNumberMode != 12) { // For Japanese calendar, first year calls GAN, see bug 111668 for detail. if (eraArray == gengou_eraArray && value == 1 && (nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR || |