summaryrefslogtreecommitdiffstats
path: root/unotools/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-11-18 21:26:39 +0100
committerEike Rathke <erack@redhat.com>2011-11-19 16:15:21 +0100
commit29e4c61d9dbcb75a608e090e0703ed996cfa060a (patch)
tree072543589ded25e2ce7edda1368adbd74acbd296 /unotools/inc
parentimplement possessive genitive case month names locale data API (diff)
downloadcore-29e4c61d9dbcb75a608e090e0703ed996cfa060a.tar.gz
core-29e4c61d9dbcb75a608e090e0703ed996cfa060a.zip
use new possessive genitive case month names locale data API
Diffstat (limited to 'unotools/inc')
-rw-r--r--unotools/inc/unotools/calendarwrapper.hxx15
-rw-r--r--unotools/inc/unotools/localedatawrapper.hxx11
2 files changed, 17 insertions, 9 deletions
diff --git a/unotools/inc/unotools/calendarwrapper.hxx b/unotools/inc/unotools/calendarwrapper.hxx
index 7d0ffd32acf7..e2785399e3cb 100644
--- a/unotools/inc/unotools/calendarwrapper.hxx
+++ b/unotools/inc/unotools/calendarwrapper.hxx
@@ -33,7 +33,7 @@
#include <tools/string.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/i18n/Calendar.hpp>
+#include <com/sun/star/i18n/Calendar2.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include "unotools/unotoolsdllapi.h"
@@ -45,7 +45,7 @@ namespace com { namespace sun { namespace star {
namespace com { namespace sun { namespace star {
namespace i18n {
- class XExtendedCalendar;
+ class XCalendar3;
}
}}}
@@ -53,7 +53,7 @@ namespace com { namespace sun { namespace star {
class UNOTOOLS_DLLPUBLIC CalendarWrapper
{
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr;
- ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XExtendedCalendar > xC;
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCalendar3 > xC;
DateTime aEpochStart; // 1Jan1970
@@ -68,7 +68,6 @@ public:
void loadDefaultCalendar( const ::com::sun::star::lang::Locale& rLocale );
void loadCalendar( const ::rtl::OUString& rUniqueID, const ::com::sun::star::lang::Locale& rLocale );
- ::com::sun::star::i18n::Calendar getLoadedCalendar() const;
::com::sun::star::uno::Sequence< ::rtl::OUString > getAllCalendars( const ::com::sun::star::lang::Locale& rLocale ) const;
::rtl::OUString getUniqueID() const;
/// set UTC date/time
@@ -80,6 +79,7 @@ public:
/// convenience method to get local date/time
double getLocalDateTime() const;
+
// wrapper implementations of XCalendar
void setValue( sal_Int16 nFieldIndex, sal_Int16 nValue );
@@ -102,11 +102,18 @@ public:
fields DST_OFFSET and DST_OFFSET_SECOND_MILLIS into account. */
sal_Int32 getDSTOffsetInMillis() const;
+
// wrapper implementations of XExtendedCalendar
String getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const;
+ // wrapper implementations of XCalendar3
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem > getGenitiveMonths() const;
+ ::com::sun::star::i18n::Calendar2 getLoadedCalendar() const;
+
+
// convenience methods
/// get epoch start (should be 01Jan1970)
diff --git a/unotools/inc/unotools/localedatawrapper.hxx b/unotools/inc/unotools/localedatawrapper.hxx
index 8ff4e46da058..8564bfacfac4 100644
--- a/unotools/inc/unotools/localedatawrapper.hxx
+++ b/unotools/inc/unotools/localedatawrapper.hxx
@@ -30,7 +30,7 @@
#define _UNOTOOLS_LOCALEDATAWRAPPER_HXX
#include <tools/string.hxx>
-#include <com/sun/star/i18n/XLocaleData2.hpp>
+#include <com/sun/star/i18n/XLocaleData3.hpp>
#include <com/sun/star/i18n/LocaleItem.hpp>
#include <com/sun/star/i18n/reservedWords.hpp>
#include <unotools/readwritemutexguard.hxx>
@@ -67,9 +67,9 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
static sal_uInt8 nLocaleDataChecking; // 0:=dontknow, 1:=yes, 2:=no
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr;
- ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XLocaleData2 > xLD;
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XLocaleData3 > xLD;
::com::sun::star::lang::Locale aLocale;
- ::boost::shared_ptr< ::com::sun::star::i18n::Calendar > xDefaultCalendar;
+ ::boost::shared_ptr< ::com::sun::star::i18n::Calendar2 > xDefaultCalendar;
::com::sun::star::i18n::LocaleDataItem aLocaleDataItem;
::com::sun::star::uno::Sequence< ::rtl::OUString > aReservedWordSeq;
::com::sun::star::uno::Sequence< sal_Int32 > aGrouping;
@@ -153,7 +153,8 @@ public:
::com::sun::star::i18n::LanguageCountryInfo getLanguageCountryInfo() const;
::com::sun::star::i18n::LocaleDataItem getLocaleItem() const;
- ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::Calendar > getAllCalendars() const;
+ /// NOTE: this wraps XLocaleData3::getAllCalendars2() in fact.
+ ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::Calendar2 > getAllCalendars() const;
/// NOTE: this wraps XLocaleData2::getAllCurrencies2() in fact.
::com::sun::star::uno::Sequence< ::com::sun::star::i18n::Currency2 > getAllCurrencies() const;
::com::sun::star::uno::Sequence< ::com::sun::star::i18n::FormatElement > getAllFormats() const;
@@ -179,7 +180,7 @@ public:
MeasurementSystem mapMeasurementStringToEnum( const String& rMS ) const;
/// Convenience method to obtain the default calendar.
- const ::boost::shared_ptr< ::com::sun::star::i18n::Calendar > getDefaultCalendar() const;
+ const ::boost::shared_ptr< ::com::sun::star::i18n::Calendar2 > getDefaultCalendar() const;
/// Convenience method to obtain the day names of the default calendar.
const ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem > getDefaultCalendarDays() const;