diff options
author | Eike Rathke <erack@redhat.com> | 2011-11-22 14:29:35 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-11-22 14:52:41 +0100 |
commit | 3b5ee26d2c27b9fb8d3836c470832fc81cda721f (patch) | |
tree | fae2e2fce03aaf000a18ae253493d50b68f377de /unotools | |
parent | remove unused FOR_WIN_X define (diff) | |
download | core-3b5ee26d2c27b9fb8d3836c470832fc81cda721f.tar.gz core-3b5ee26d2c27b9fb8d3836c470832fc81cda721f.zip |
added partitive case month names
* Locale data:
* nominative (nouns) month names always given in <MonthsOfYear>
element
* optional genitive case month names in <GenitiveMonths> element,
following the <MonthsOfYear> element; if not given take nominative
names
* optional partitive case month names in <PartitiveMonths> element,
following the <GenitiveMonths> element, or following the
<MonthsOfYear> element if the <GenitiveMonths> element is not
present; if not given take genitive case names, or nominative if
genitive names aren't defined
* currently known partitive case matters in Finnish locales
* Rules for use of nominative / genitive / partitive case month names in
number formatter:
* no day of month (D or DD) present in format code => MMM or MMMM
display nominative month name (noun)
* day of month (D or DD) after MMM or MMMM => genitive name
* no genitive names defined => nominative names
* day of month (D or DD) before MMM or MMMM => partitive name
* no partitive names defined => genitive names
* no genitive names defined => nominative names
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/calendarwrapper.hxx | 1 | ||||
-rw-r--r-- | unotools/source/i18n/calendarwrapper.cxx | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/unotools/inc/unotools/calendarwrapper.hxx b/unotools/inc/unotools/calendarwrapper.hxx index cc67696d0439..bab43e9522e4 100644 --- a/unotools/inc/unotools/calendarwrapper.hxx +++ b/unotools/inc/unotools/calendarwrapper.hxx @@ -112,6 +112,7 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem2 > getDays() const; ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem2 > getMonths() const; ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem2 > getGenitiveMonths() const; + ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem2 > getPartitiveMonths() const; // convenience methods diff --git a/unotools/source/i18n/calendarwrapper.cxx b/unotools/source/i18n/calendarwrapper.cxx index 6d7aa4bea94e..a128c33e968f 100644 --- a/unotools/source/i18n/calendarwrapper.cxx +++ b/unotools/source/i18n/calendarwrapper.cxx @@ -632,4 +632,25 @@ String CalendarWrapper::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_In return ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem2 > (0); } + +::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem2 > CalendarWrapper::getPartitiveMonths() const +{ + try + { + if ( xC.is() ) + return xC->getPartitiveMonths2(); + } + catch ( Exception& e ) + { +#ifdef DBG_UTIL + ByteString aMsg( "getPartitiveMonths: Exception caught\n" ); + aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); + DBG_ERRORFILE( aMsg.GetBuffer() ); +#else + (void)e; +#endif + } + return ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem2 > (0); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |