summaryrefslogtreecommitdiff
path: root/unotools/source/i18n
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-11-22 14:29:35 +0100
committerEike Rathke <erack@redhat.com>2011-11-22 14:52:41 +0100
commit3b5ee26d2c27b9fb8d3836c470832fc81cda721f (patch)
treefae2e2fce03aaf000a18ae253493d50b68f377de /unotools/source/i18n
parent734bfe16bdfe7c80fa8c0c71d680746353686961 (diff)
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/source/i18n')
-rw-r--r--unotools/source/i18n/calendarwrapper.cxx21
1 files changed, 21 insertions, 0 deletions
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: */