diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-05 11:28:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-15 08:28:44 +0100 |
commit | d2f6a87ac7adb3f60f7eae7c5a8f8a9076b7a75c (patch) | |
tree | 0bcc19623fa6cda27b78df47c54192bd3e73ef41 /unotools/inc | |
parent | 5837402fb1daa437d9a1a37edc9ede57319944f1 (diff) |
fdo#46808, use service constructor for i18n::NumberFormatMapper
Also create a utility constructor for LocaleDataWrapper, which
simplifies many of the calling sites.
Change-Id: Ic8510b51c4201fa17fc0620e18d3e258e43636ba
Diffstat (limited to 'unotools/inc')
-rw-r--r-- | unotools/inc/unotools/localedatawrapper.hxx | 15 | ||||
-rw-r--r-- | unotools/inc/unotools/numberformatcodewrapper.hxx | 7 |
2 files changed, 12 insertions, 10 deletions
diff --git a/unotools/inc/unotools/localedatawrapper.hxx b/unotools/inc/unotools/localedatawrapper.hxx index 1b6e95beae6d..1198895753d9 100644 --- a/unotools/inc/unotools/localedatawrapper.hxx +++ b/unotools/inc/unotools/localedatawrapper.hxx @@ -30,8 +30,8 @@ #include "unotools/unotoolsdllapi.h" namespace com { namespace sun { namespace star { - namespace lang { - class XMultiServiceFactory; + namespace uno { + class XComponentContext; } }}} class Date; @@ -56,7 +56,7 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper : private boost::noncopyable { 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::uno::XComponentContext > m_xContext; ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XLocaleData4 > xLD; ::com::sun::star::lang::Locale aLocale; ::boost::shared_ptr< ::com::sun::star::i18n::Calendar2 > xDefaultCalendar; @@ -111,7 +111,10 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper : private boost::noncopyable public: LocaleDataWrapper( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xSF, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rxContext, + const ::com::sun::star::lang::Locale& rLocale + ); + LocaleDataWrapper( const ::com::sun::star::lang::Locale& rLocale ); ~LocaleDataWrapper(); @@ -122,8 +125,8 @@ public: lives "on the grassland". The CalendarWrapper ctor can handle that though. */ const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > & getServiceFactory() - const { return xSMgr; } + ::com::sun::star::uno::XComponentContext > & getComponentContext() + const { return m_xContext; } /// set a new Locale to request void setLocale( const ::com::sun::star::lang::Locale& rLocale ); diff --git a/unotools/inc/unotools/numberformatcodewrapper.hxx b/unotools/inc/unotools/numberformatcodewrapper.hxx index 4c92ba9ede2f..82e254e7ea1d 100644 --- a/unotools/inc/unotools/numberformatcodewrapper.hxx +++ b/unotools/inc/unotools/numberformatcodewrapper.hxx @@ -24,15 +24,14 @@ #include "unotools/unotoolsdllapi.h" namespace com { namespace sun { namespace star { - namespace lang { - class XMultiServiceFactory; + namespace uno { + class XComponentContext; } }}} class UNOTOOLS_DLLPUBLIC NumberFormatCodeWrapper { - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr; ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XNumberFormatCode > xNFC; ::com::sun::star::lang::Locale aLocale; @@ -42,7 +41,7 @@ class UNOTOOLS_DLLPUBLIC NumberFormatCodeWrapper public: NumberFormatCodeWrapper( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xSF, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rxContext, const ::com::sun::star::lang::Locale& rLocale ); |