diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-05 15:07:20 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-27 18:18:06 +0100 |
commit | c2bbc9797c2fef9078c11460100996972bebd971 (patch) | |
tree | 914381462eceda8e659d773290b18a27c3825364 /unotools | |
parent | 60fa5057039d2413d56813df4d45e5cfdfbb40ac (diff) |
fdo#46808, use service constructor for i18n::NativeNumberSupplier
Change-Id: I092ca8f912e26f0743909920c6e740d648b8677e
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/nativenumberwrapper.hxx | 7 | ||||
-rw-r--r-- | unotools/source/i18n/nativenumberwrapper.cxx | 11 |
2 files changed, 6 insertions, 12 deletions
diff --git a/unotools/inc/unotools/nativenumberwrapper.hxx b/unotools/inc/unotools/nativenumberwrapper.hxx index b8bac89a7cc0..dea1ee01e0f7 100644 --- a/unotools/inc/unotools/nativenumberwrapper.hxx +++ b/unotools/inc/unotools/nativenumberwrapper.hxx @@ -23,15 +23,14 @@ #include <com/sun/star/i18n/XNativeNumberSupplier.hpp> namespace com { namespace sun { namespace star { - namespace lang { - class XMultiServiceFactory; + namespace uno { + class XComponentContext; } }}} class UNOTOOLS_DLLPUBLIC NativeNumberWrapper { - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr; ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XNativeNumberSupplier > xNNS; // not implemented, prevent usage NativeNumberWrapper( const NativeNumberWrapper& ); @@ -39,7 +38,7 @@ class UNOTOOLS_DLLPUBLIC NativeNumberWrapper public: NativeNumberWrapper( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xSF + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rxContext ); ~NativeNumberWrapper(); diff --git a/unotools/source/i18n/nativenumberwrapper.cxx b/unotools/source/i18n/nativenumberwrapper.cxx index 5fa8f0a0b943..59238084f695 100644 --- a/unotools/source/i18n/nativenumberwrapper.cxx +++ b/unotools/source/i18n/nativenumberwrapper.cxx @@ -20,20 +20,15 @@ #include <unotools/nativenumberwrapper.hxx> #include <tools/debug.hxx> -#include "instance.hxx" +#include <com/sun/star/i18n/NativeNumberSupplier.hpp> using namespace ::com::sun::star; NativeNumberWrapper::NativeNumberWrapper( - const uno::Reference< lang::XMultiServiceFactory > & xSF + const uno::Reference< uno::XComponentContext > & rxContext ) - : - xSMgr( xSF ) { - xNNS = uno::Reference< i18n::XNativeNumberSupplier > ( - intl_createInstance( xSMgr, "com.sun.star.i18n.NativeNumberSupplier", - "NativeNumberWrapper"), uno::UNO_QUERY ); - DBG_ASSERT( xNNS.is(), "NativeNumberWrapper: no NativeNumberSupplier" ); + xNNS = i18n::NativeNumberSupplier::create(rxContext); } |