summaryrefslogtreecommitdiff
path: root/i18npool/source/registerservices
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-09-13 12:47:11 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-17 14:28:21 +0200
commit369e3fdcdafdb112a6963fb86fa4d4d0edb29c00 (patch)
tree9b7b52b0524feee2c6cfcaf5e5fb440816520fde /i18npool/source/registerservices
parent9486e6c45f5e15e07f4717fdbaaf30afe6ed86b9 (diff)
fdo#46808, Adapt i18n::LocaleData UNO service to new style
The implementation of the LocaleData implements the optional XLocaleData4, so rather than creating a new interface for the new-style service, we simply make the service implement XLocaleData4, which in turn implements XLocaleData3, XLocaleData2, XLocaleData. Change-Id: I3e9a48b031be6b2aa5e04b376b3940b942add85a
Diffstat (limited to 'i18npool/source/registerservices')
-rw-r--r--i18npool/source/registerservices/registerservices.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx
index 85e3af8b3383..3eba12e2cc3c 100644
--- a/i18npool/source/registerservices/registerservices.cxx
+++ b/i18npool/source/registerservices/registerservices.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
+#include <comphelper/componentcontext.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>
@@ -101,6 +102,17 @@
new ImplName( rxMSF ) ); \
}
+#define IMPL_CREATEINSTANCE_CTX( ImplName ) \
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > \
+ SAL_CALL ImplName##_CreateInstance( \
+ const ::com::sun::star::uno::Reference< \
+ ::com::sun::star::lang::XMultiServiceFactory >& rxMSF ) \
+{ \
+ return ::com::sun::star::uno::Reference < \
+ ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) \
+ new ImplName( comphelper::ComponentContext(rxMSF).getUNOContext() ) ); \
+}
+
typedef ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > (SAL_CALL *FN_CreateInstance)(
const ::com::sun::star::uno::Reference<
@@ -115,7 +127,7 @@ typedef ::com::sun::star::uno::Reference<
using namespace ::com::sun::star::i18n;
-IMPL_CREATEINSTANCE_MSF( NumberFormatCodeMapper )
+IMPL_CREATEINSTANCE_CTX( NumberFormatCodeMapper )
IMPL_CREATEINSTANCE( NativeNumberSupplier )
IMPL_CREATEINSTANCE( LocaleData )
IMPL_CREATEINSTANCE_MSF( DefaultNumberingProvider )
@@ -147,7 +159,7 @@ IMPL_CREATEINSTANCE( Collator_Unicode )
IMPL_CREATEINSTANCE_MSF( CharacterClassificationImpl )
IMPL_CREATEINSTANCE_MSF( cclass_Unicode )
-IMPL_CREATEINSTANCE_MSF( TransliterationImpl )
+IMPL_CREATEINSTANCE_CTX( TransliterationImpl )
IMPL_CREATEINSTANCE( UnoScriptTypeDetector )
IMPL_CREATEINSTANCE_MSF( InputSequenceCheckerImpl )