diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-25 17:18:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-29 17:32:57 +0100 |
commit | 8fff6bf6bdab6b7addcbbf472a226706edda1edb (patch) | |
tree | a27347a5b8e0bef5c00757a56a0e9a217fcb2f59 /basic | |
parent | d29818290376f10f318ba805a79643384b34986e (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 'basic')
-rw-r--r-- | basic/source/runtime/methods1.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 7072c09cb3d7..6dae3f4bbb63 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -48,7 +48,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/i18n/XCalendar3.hpp> +#include <com/sun/star/i18n/LocaleCalendar.hpp> #include <com/sun/star/sheet/XFunctionAccess.hpp> using namespace comphelper; @@ -64,12 +64,8 @@ static Reference< XCalendar3 > getLocaleCalendar( void ) static Reference< XCalendar3 > xCalendar; if( !xCalendar.is() ) { - Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); - if( xSMgr.is() ) - { - xCalendar = Reference< XCalendar3 >( xSMgr->createInstance - ( ::rtl::OUString("com.sun.star.i18n.LocaleCalendar" ) ), UNO_QUERY ); - } + Reference< XComponentContext > xContext = getProcessComponentContext(); + xCalendar = LocaleCalendar::create(xContext); } static com::sun::star::lang::Locale aLastLocale; |