summaryrefslogtreecommitdiff
path: root/svl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-25 17:18:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-29 17:32:57 +0100
commit8fff6bf6bdab6b7addcbbf472a226706edda1edb (patch)
treea27347a5b8e0bef5c00757a56a0e9a217fcb2f59 /svl/source
parentd29818290376f10f318ba805a79643384b34986e (diff)
fdo#46808, Adapt i18n::LocaleCalendar UNO service to new style
Did not need to create a new interface, because XCalendar3 already covers the whole service interface. Change-Id: Iaf094014c16e872d2003ca6e8e7588abd081d882
Diffstat (limited to 'svl/source')
-rw-r--r--svl/source/numbers/zforfind.cxx9
-rw-r--r--svl/source/numbers/zforlist.cxx2
2 files changed, 5 insertions, 6 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index da2a66f90311..55d7fd76c54e 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -30,6 +30,7 @@
#include <unotools/calendarwrapper.hxx>
#include <unotools/localedatawrapper.hxx>
#include <com/sun/star/i18n/CalendarFieldIndex.hpp>
+#include <com/sun/star/i18n/LocaleCalendar.hpp>
#include <unotools/digitgroupingiterator.hxx>
#include <svl/zforlist.hxx> // NUMBERFORMAT_XXX
@@ -1766,11 +1767,9 @@ input for the following reasons:
sal_Int16 nDaySet, nMonthSet, nYearSet, nHourSet, nMinuteSet, nSecondSet;
sal_Int16 nZO, nDST1, nDST2, nDST, nZOmillis, nDST1millis, nDST2millis, nDSTmillis;
sal_Int32 nZoneInMillis, nDST1InMillis, nDST2InMillis;
- uno::Reference< lang::XMultiServiceFactory > xSMgr =
- ::comphelper::getProcessServiceFactory();
- uno::Reference< ::com::sun::star::i18n::XCalendar3 > xCal(
- xSMgr->createInstance( "com.sun.star.i18n.LocaleCalendar" ),
- uno::UNO_QUERY );
+ uno::Reference< uno::XComponentContext > xContext =
+ ::comphelper::getProcessComponentContext();
+ uno::Reference< i18n::XCalendar3 > xCal = i18n::LocaleCalendar::create(xContext);
for ( const entry* p = cals; p->lan; ++p )
{
aLocale.Language = ::rtl::OUString::createFromAscii( p->lan );
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 9bc4f5d4bfeb..9919cf9d0ad6 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -236,7 +236,7 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
aLocale = MsLangId::convertLanguageToLocale( eLang );
pCharClass = new CharClass( xServiceManager, aLocale );
xLocaleData.init( xServiceManager, aLocale, eLang );
- xCalendar.init( xServiceManager, aLocale );
+ xCalendar.init( comphelper::getComponentContext(xServiceManager), aLocale );
xTransliteration.init( xServiceManager, eLang,
::com::sun::star::i18n::TransliterationModules_IGNORE_CASE );
xNatNum.init( xServiceManager );