summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--basic/source/runtime/methods1.cxx20
-rw-r--r--i18npool/inc/calendarImpl.hxx14
-rw-r--r--i18npool/inc/calendar_gregorian.hxx4
-rw-r--r--i18npool/source/calendar/calendarImpl.cxx23
-rw-r--r--i18npool/source/calendar/calendar_gregorian.cxx34
-rw-r--r--i18npool/source/registerservices/registerservices.cxx3
-rw-r--r--i18npool/util/i18npool.component1
-rw-r--r--include/unotools/calendarwrapper.hxx18
-rw-r--r--offapi/UnoApi_offapi.mk2
-rw-r--r--offapi/com/sun/star/i18n/LocaleCalendar2.idl27
-rw-r--r--offapi/com/sun/star/i18n/XCalendar.idl12
-rw-r--r--offapi/com/sun/star/i18n/XCalendar4.idl57
-rw-r--r--svl/source/numbers/zforfind.cxx6
-rw-r--r--unotools/source/i18n/calendarwrapper.cxx4
14 files changed, 191 insertions, 34 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 3877ca6fc754..11c8bd6d0b7e 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -57,7 +57,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/i18n/LocaleCalendar.hpp>
+#include <com/sun/star/i18n/LocaleCalendar2.hpp>
#include <com/sun/star/sheet/XFunctionAccess.hpp>
#include <boost/scoped_array.hpp>
@@ -67,13 +67,13 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::sheet;
using namespace com::sun::star::uno;
-static Reference< XCalendar3 > getLocaleCalendar( void )
+static Reference< XCalendar4 > getLocaleCalendar( void )
{
- static Reference< XCalendar3 > xCalendar;
+ static Reference< XCalendar4 > xCalendar;
if( !xCalendar.is() )
{
Reference< XComponentContext > xContext = getProcessComponentContext();
- xCalendar = LocaleCalendar::create(xContext);
+ xCalendar = LocaleCalendar2::create(xContext);
}
static com::sun::star::lang::Locale aLastLocale;
@@ -1857,7 +1857,7 @@ RTLFUNC(MonthName)
return;
}
- Reference< XCalendar3 > xCalendar = getLocaleCalendar();
+ Reference< XCalendar4 > xCalendar = getLocaleCalendar();
if( !xCalendar.is() )
{
StarBASIC::Error( SbERR_INTERNAL_ERROR );
@@ -1897,7 +1897,7 @@ RTLFUNC(WeekdayName)
return;
}
- Reference< XCalendar3 > xCalendar = getLocaleCalendar();
+ Reference< XCalendar4 > xCalendar = getLocaleCalendar();
if( !xCalendar.is() )
{
StarBASIC::Error( SbERR_INTERNAL_ERROR );
@@ -2246,7 +2246,7 @@ RTLFUNC(DateDiff)
}
if( nFirstDay == 0 )
{
- Reference< XCalendar3 > xCalendar = getLocaleCalendar();
+ Reference< XCalendar4 > xCalendar = getLocaleCalendar();
if( !xCalendar.is() )
{
StarBASIC::Error( SbERR_INTERNAL_ERROR );
@@ -2304,7 +2304,7 @@ double implGetDateOfFirstDayInFirstWeek
if( nFirstWeek < 0 || nFirstWeek > 3 )
nError = SbERR_BAD_ARGUMENT;
- Reference< XCalendar3 > xCalendar;
+ Reference< XCalendar4 > xCalendar;
if( nFirstDay == 0 || nFirstWeek == 0 )
{
xCalendar = getLocaleCalendar();
@@ -2505,7 +2505,7 @@ RTLFUNC(FormatDateTime)
}
}
- Reference< XCalendar3 > xCalendar = getLocaleCalendar();
+ Reference< XCalendar4 > xCalendar = getLocaleCalendar();
if( !xCalendar.is() )
{
StarBASIC::Error( SbERR_INTERNAL_ERROR );
@@ -3329,7 +3329,7 @@ sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam, sal_Int16 nFirstDay
}
if( nFirstDay == 0 )
{
- Reference< XCalendar3 > xCalendar = getLocaleCalendar();
+ Reference< XCalendar4 > xCalendar = getLocaleCalendar();
if( !xCalendar.is() )
{
#if HAVE_FEATURE_SCRIPTING
diff --git a/i18npool/inc/calendarImpl.hxx b/i18npool/inc/calendarImpl.hxx
index 7ec10debd5ad..0f67c1eb4eea 100644
--- a/i18npool/inc/calendarImpl.hxx
+++ b/i18npool/inc/calendarImpl.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_I18NPOOL_INC_CALENDARIMPL_HXX
#define INCLUDED_I18NPOOL_INC_CALENDARIMPL_HXX
-#include <com/sun/star/i18n/XCalendar3.hpp>
+#include <com/sun/star/i18n/XCalendar4.hpp>
#include <com/sun/star/i18n/CalendarDisplayCode.hpp>
#include <com/sun/star/i18n/CalendarFieldIndex.hpp>
#include <com/sun/star/i18n/CalendarDisplayIndex.hpp>
@@ -36,7 +36,7 @@ namespace com { namespace sun { namespace star { namespace i18n {
class CalendarImpl : public cppu::WeakImplHelper2
<
- com::sun::star::i18n::XCalendar3,
+ com::sun::star::i18n::XCalendar4,
com::sun::star::lang::XServiceInfo
>
{
@@ -84,6 +84,10 @@ public:
virtual com::sun::star::uno::Sequence < CalendarItem2 > SAL_CALL getGenitiveMonths2() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual com::sun::star::uno::Sequence < CalendarItem2 > SAL_CALL getPartitiveMonths2() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ // XCalendar4
+ virtual void SAL_CALL setLocalDateTime(double TimeInDays) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual double SAL_CALL getLocalDateTime() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
//XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
@@ -91,14 +95,14 @@ public:
private:
struct lookupTableItem {
- lookupTableItem(const OUString& _uniqueID, com::sun::star::uno::Reference < com::sun::star::i18n::XCalendar3 >& _xCalendar) :
+ lookupTableItem(const OUString& _uniqueID, com::sun::star::uno::Reference < com::sun::star::i18n::XCalendar4 >& _xCalendar) :
uniqueID(_uniqueID), xCalendar(_xCalendar) {}
OUString uniqueID;
- com::sun::star::uno::Reference < com::sun::star::i18n::XCalendar3 > xCalendar;
+ com::sun::star::uno::Reference < com::sun::star::i18n::XCalendar4 > xCalendar;
};
std::vector<lookupTableItem*> lookupTable;
com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_xContext;
- com::sun::star::uno::Reference < com::sun::star::i18n::XCalendar3 > xCalendar;
+ com::sun::star::uno::Reference < com::sun::star::i18n::XCalendar4 > xCalendar;
};
} } } }
diff --git a/i18npool/inc/calendar_gregorian.hxx b/i18npool/inc/calendar_gregorian.hxx
index ea06b007bc4f..f270779f7b87 100644
--- a/i18npool/inc/calendar_gregorian.hxx
+++ b/i18npool/inc/calendar_gregorian.hxx
@@ -85,6 +85,10 @@ public:
virtual com::sun::star::uno::Sequence < CalendarItem2 > SAL_CALL getGenitiveMonths2() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual com::sun::star::uno::Sequence < CalendarItem2 > SAL_CALL getPartitiveMonths2() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ // XCalendar4
+ virtual void SAL_CALL setLocalDateTime(double TimeInDays) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual double SAL_CALL getLocalDateTime() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
//XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx
index 4780ce6ad598..68cf9c2116b3 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -57,7 +57,7 @@ CalendarImpl::loadDefaultCalendar( const Locale& rLocale ) throw(RuntimeExceptio
void SAL_CALL
CalendarImpl::loadCalendar(const OUString& uniqueID, const Locale& rLocale ) throw (RuntimeException, std::exception)
{
- Reference < XCalendar3 > xOldCalendar( xCalendar ); // backup
+ Reference < XCalendar4 > xOldCalendar( xCalendar ); // backup
sal_Int32 i;
for (i = 0; i < sal::static_int_cast<sal_Int32>(lookupTable.size()); i++) {
@@ -155,6 +155,24 @@ CalendarImpl::getDateTime() throw(RuntimeException, std::exception)
throw ERROR ;
}
+void SAL_CALL
+CalendarImpl::setLocalDateTime( double fTimeInDays ) throw(RuntimeException, std::exception)
+{
+ if (xCalendar.is())
+ xCalendar->setLocalDateTime( fTimeInDays );
+ else
+ throw ERROR ;
+}
+
+double SAL_CALL
+CalendarImpl::getLocalDateTime() throw(RuntimeException, std::exception)
+{
+ if (xCalendar.is())
+ return xCalendar->getLocalDateTime();
+ else
+ throw ERROR ;
+}
+
OUString SAL_CALL
CalendarImpl::getUniqueID() throw(RuntimeException, std::exception)
{
@@ -352,8 +370,9 @@ CalendarImpl::supportsService(const OUString& rServiceName) throw( RuntimeExcept
Sequence< OUString > SAL_CALL
CalendarImpl::getSupportedServiceNames(void) throw( RuntimeException, std::exception )
{
- Sequence< OUString > aRet(1);
+ Sequence< OUString > aRet(2);
aRet[0] = "com.sun.star.i18n.LocaleCalendar";
+ aRet[1] = "com.sun.star.i18n.LocaleCalendar2";
return aRet;
}
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index a634c5225f89..d2f513c2afff 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -317,6 +317,40 @@ Calendar_gregorian::getDateTime() throw(RuntimeException, std::exception)
return fR / U_MILLIS_PER_DAY;
}
+void SAL_CALL
+Calendar_gregorian::setLocalDateTime( double fTimeInDays ) throw(RuntimeException, std::exception)
+{
+ // See setDateTime() for why the rounding.
+ double fM = fTimeInDays * U_MILLIS_PER_DAY;
+ double fR = rtl::math::round( fM );
+ SAL_INFO_IF( fM != fR, "i18npool",
+ "Calendar_gregorian::setLocalDateTime: " << std::fixed << fM << " rounded to " << fR);
+ int32_t nZoneOffset, nDSTOffset;
+ UErrorCode status;
+ body->getTimeZone().getOffset( fR, TRUE, nZoneOffset, nDSTOffset, status = U_ZERO_ERROR );
+ if ( !U_SUCCESS(status) ) throw ERROR;
+ body->setTime( fR - (nZoneOffset + nDSTOffset), status = U_ZERO_ERROR );
+ if ( !U_SUCCESS(status) ) throw ERROR;
+ getValue();
+}
+
+double SAL_CALL
+Calendar_gregorian::getLocalDateTime() throw(RuntimeException, std::exception)
+{
+ if (fieldSet) {
+ setValue();
+ getValue();
+ }
+ UErrorCode status;
+ double fTime = body->getTime( status = U_ZERO_ERROR );
+ if ( !U_SUCCESS(status) ) throw ERROR;
+ int32_t nZoneOffset = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR );
+ if ( !U_SUCCESS(status) ) throw ERROR;
+ int32_t nDSTOffset = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR );
+ if ( !U_SUCCESS(status) ) throw ERROR;
+ return (fTime + (nZoneOffset + nDSTOffset)) / U_MILLIS_PER_DAY;
+}
+
// map field value from gregorian calendar to other calendar, it can be overwritten by derived class.
// By using eraArray, it can take care Japanese and Taiwan ROC calendar.
void Calendar_gregorian::mapFromGregorian() throw(RuntimeException)
diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx
index 634c71112e03..a38e9692033d 100644
--- a/i18npool/source/registerservices/registerservices.cxx
+++ b/i18npool/source/registerservices/registerservices.cxx
@@ -288,6 +288,9 @@ static const struct InstancesArray {
{ "com.sun.star.i18n.LocaleCalendar",
"com.sun.star.i18n.CalendarImpl",
&CalendarImpl_CreateInstance },
+ { "com.sun.star.i18n.LocaleCalendar2",
+ "com.sun.star.i18n.CalendarImpl",
+ &CalendarImpl_CreateInstance },
{ "com.sun.star.i18n.Calendar_gregorian",
"com.sun.star.i18n.Calendar_gregorian",
&Calendar_gregorian_CreateInstance },
diff --git a/i18npool/util/i18npool.component b/i18npool/util/i18npool.component
index 9617a8b4151b..1b74fd736f54 100644
--- a/i18npool/util/i18npool.component
+++ b/i18npool/util/i18npool.component
@@ -44,6 +44,7 @@
</implementation>
<implementation name="com.sun.star.i18n.CalendarImpl">
<service name="com.sun.star.i18n.LocaleCalendar"/>
+ <service name="com.sun.star.i18n.LocaleCalendar2"/>
</implementation>
<implementation name="com.sun.star.i18n.Calendar_ROC">
<service name="com.sun.star.i18n.Calendar_ROC"/>
diff --git a/include/unotools/calendarwrapper.hxx b/include/unotools/calendarwrapper.hxx
index a03f9068b282..de7443bd3dd5 100644
--- a/include/unotools/calendarwrapper.hxx
+++ b/include/unotools/calendarwrapper.hxx
@@ -35,13 +35,13 @@ namespace com { namespace sun { namespace star {
namespace com { namespace sun { namespace star {
namespace i18n {
- class XCalendar3;
+ class XCalendar4;
}
}}}
class UNOTOOLS_DLLPUBLIC CalendarWrapper
{
- ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCalendar3 > xC;
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCalendar4 > xC;
DateTime aEpochStart; // 1Jan1970
@@ -61,10 +61,9 @@ public:
void setDateTime( double fTimeInDays );
/// get UTC date/time
double getDateTime() const;
- /// convenience method to set local date/time
- void setLocalDateTime( double fTimeInDays );
- /// convenience method to get local date/time
- double getLocalDateTime() const;
+
+ // For local setDateTime() and getDateTime() see further down at wrapper
+ // implementations of XCalendar4.
// wrapper implementations of XCalendar
@@ -96,6 +95,13 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem2 > getGenitiveMonths() const;
::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem2 > getPartitiveMonths() const;
+ // wrapper implementations of XCalendar4
+
+ /// set local date/time
+ void setLocalDateTime( double fTimeInDays );
+ /// get local date/time
+ double getLocalDateTime() const;
+
// convenience methods
/// get epoch start (should be 01Jan1970)
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 0028b46c997e..63f242cc2e83 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -224,6 +224,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/i18n,\
IndexEntrySupplier \
InputSequenceChecker \
LocaleCalendar \
+ LocaleCalendar2 \
LocaleData \
NativeNumberSupplier \
NumberFormatMapper \
@@ -2752,6 +2753,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/i18n,\
XBreakIterator \
XCalendar \
XCalendar3 \
+ XCalendar4 \
XCharacterClassification \
XCollator \
XExtendedCalendar \
diff --git a/offapi/com/sun/star/i18n/LocaleCalendar2.idl b/offapi/com/sun/star/i18n/LocaleCalendar2.idl
new file mode 100644
index 000000000000..fd878afd06ef
--- /dev/null
+++ b/offapi/com/sun/star/i18n/LocaleCalendar2.idl
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_i18n_LocaleCalendar2_idl__
+#define __com_sun_star_i18n_LocaleCalendar2_idl__
+
+#include <com/sun/star/i18n/XCalendar4.idl>
+
+module com { module sun { module star { module i18n {
+
+/** Access a locale specific calendar.
+
+ @since LibreOffice 4.5
+ */
+published service LocaleCalendar2 : XCalendar4;
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/i18n/XCalendar.idl b/offapi/com/sun/star/i18n/XCalendar.idl
index 4dd5ddacb12c..fd89a5273da1 100644
--- a/offapi/com/sun/star/i18n/XCalendar.idl
+++ b/offapi/com/sun/star/i18n/XCalendar.idl
@@ -53,17 +53,17 @@ published interface XCalendar : com::sun::star::uno::XInterface
string getUniqueID();
/**
- Set the date/time as an offset to the start of the calendar at
- 1-Jan-1970 00:00. The integer part represents the number of days
- passed since start date. The fractional part represents
+ Set the UTC date/time as an offset to the start of the calendar
+ at 1-Jan-1970 00:00. The integer part represents the number of
+ days passed since start date. The fractional part represents
fractions of a day, thus 0.5 means 12 hours.
*/
void setDateTime( [in] double nTimeInDays );
/**
- Get the date/time as an offset to the start of the calendar at
- 1-Jan-1970 00:00. The integer part represents the number of days
- passed since start date. The fractional part represents
+ Get the UTC date/time as an offset to the start of the calendar
+ at 1-Jan-1970 00:00. The integer part represents the number of
+ days passed since start date. The fractional part represents
fractions of a day, thus 0.5 means 12 hours.
*/
double getDateTime();
diff --git a/offapi/com/sun/star/i18n/XCalendar4.idl b/offapi/com/sun/star/i18n/XCalendar4.idl
new file mode 100644
index 000000000000..4a1cffaff81c
--- /dev/null
+++ b/offapi/com/sun/star/i18n/XCalendar4.idl
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_i18n_XCalendar4_idl__
+#define __com_sun_star_i18n_XCalendar4_idl__
+
+#include <com/sun/star/i18n/Calendar3.idl>
+
+
+module com { module sun { module star { module i18n {
+
+
+
+/** This interface provides access to locale specific calendar
+ systems.
+
+ <p> It is derived from ::com::sun::star::i18n::XCalendar3 and
+ provides additional methods to set and get the local time. </p>
+
+ @since LibreOffice 4.5
+ */
+published interface XCalendar4 : com::sun::star::i18n::XCalendar3
+{
+ /** Set the local date/time as an offset to the start of the
+ calendar at 1-Jan-1970 00:00. The integer part represents the
+ number of days passed since start date. The fractional part
+ represents fractions of a day, thus 0.5 means 12 hours.
+
+ The actual timezone and daylight saving time offsets effective
+ at the given date and time are considered and subtracted before
+ setting the UTC time at the calendar.
+ */
+ void setLocalDateTime( [in] double TimeInDays );
+
+ /** Get the local date/time as an offset to the start of the
+ calendar at 1-Jan-1970 00:00. The integer part represents the
+ number of days passed since start date. The fractional part
+ represents fractions of a day, thus 0.5 means 12 hours.
+
+ The actual timezone and daylight saving time offsets effective
+ at the given date and time are considered and added to the UTC
+ time at the calendar.
+ */
+ double getLocalDateTime();
+
+};
+
+}; }; }; };
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 4e1f3cd38fae..94498741f848 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -28,7 +28,7 @@
#include <unotools/calendarwrapper.hxx>
#include <unotools/localedatawrapper.hxx>
#include <com/sun/star/i18n/CalendarFieldIndex.hpp>
-#include <com/sun/star/i18n/LocaleCalendar.hpp>
+#include <com/sun/star/i18n/LocaleCalendar2.hpp>
#include <unotools/digitgroupingiterator.hxx>
#include <svl/zforlist.hxx>
@@ -44,7 +44,7 @@
#endif
#if NF_TEST_CALENDAR
#include <comphelper/processfactory.hxx>
-#include <com/sun/star/i18n/XCalendar3.hpp>
+#include <com/sun/star/i18n/XCalendar4.hpp>
#endif
@@ -1974,7 +1974,7 @@ input for the following reasons:
sal_Int32 nZoneInMillis, nDST1InMillis, nDST2InMillis;
uno::Reference< uno::XComponentContext > xContext =
::comphelper::getProcessComponentContext();
- uno::Reference< i18n::XCalendar3 > xCal = i18n::LocaleCalendar::create(xContext);
+ uno::Reference< i18n::XCalendar4 > xCal = i18n::LocaleCalendar2::create(xContext);
for ( const entry* p = cals; p->lan; ++p )
{
aLocale.Language = OUString::createFromAscii( p->lan );
diff --git a/unotools/source/i18n/calendarwrapper.cxx b/unotools/source/i18n/calendarwrapper.cxx
index c39f5f7f203e..6d082f2fc447 100644
--- a/unotools/source/i18n/calendarwrapper.cxx
+++ b/unotools/source/i18n/calendarwrapper.cxx
@@ -20,7 +20,7 @@
#include <rtl/strbuf.hxx>
#include <unotools/calendarwrapper.hxx>
#include <com/sun/star/i18n/CalendarFieldIndex.hpp>
-#include <com/sun/star/i18n/LocaleCalendar.hpp>
+#include <com/sun/star/i18n/LocaleCalendar2.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::i18n;
@@ -34,7 +34,7 @@ CalendarWrapper::CalendarWrapper(
:
aEpochStart( Date( 1, 1, 1970 ) )
{
- xC = LocaleCalendar::create(rxContext);
+ xC = LocaleCalendar2::create(rxContext);
}
CalendarWrapper::~CalendarWrapper()