summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-01-24 16:02:01 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-27 08:42:53 +0100
commit564c0aa65712b52f8d0fb187fd0f123be8c1fe3f (patch)
tree080526e1a8c9ff9c7a9fa4b9403df08e586c5f99 /i18npool
parente0696359a0b4a9ac2e3f1a84d69e8f43488aea3b (diff)
i18npool: Ctor feature for few general services.
Change-Id: I1d489cacaf4717ab395b22a92e6dd6645cb92b1c
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx14
-rw-r--r--i18npool/source/collator/collatorImpl.cxx14
-rw-r--r--i18npool/source/localedata/localedata.cxx8
-rw-r--r--i18npool/source/registerservices/registerservices.cxx20
-rw-r--r--i18npool/source/transliteration/transliterationImpl.cxx14
-rw-r--r--i18npool/util/i18npool.component12
6 files changed, 46 insertions, 36 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index a8e453da2d60..8b9daea70b03 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -605,12 +605,10 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw (
throw RuntimeException();
}
-const sal_Char cBreakIterator[] = "com.sun.star.i18n.BreakIterator";
-
OUString SAL_CALL
BreakIteratorImpl::getImplementationName(void) throw( RuntimeException )
{
- return OUString::createFromAscii(cBreakIterator);
+ return OUString("com.sun.star.i18n.BreakIterator");
}
sal_Bool SAL_CALL
@@ -623,10 +621,18 @@ Sequence< OUString > SAL_CALL
BreakIteratorImpl::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii(cBreakIterator);
+ aRet[0] = OUString("com.sun.star.i18n.BreakIterator");
return aRet;
}
} } } }
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_i18n_BreakIterator_get_implementation(
+ css::uno::XComponentContext *context,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new com::sun::star::i18n::BreakIteratorImpl(context));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx
index bb02ab2fcd44..a928b0b7ccbf 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -212,11 +212,9 @@ CollatorImpl::loadCachedCollator(const lang::Locale& rLocale, const OUString& rS
}
}
-const sal_Char cCollator[] = "com.sun.star.i18n.Collator";
-
OUString SAL_CALL CollatorImpl::getImplementationName() throw( RuntimeException )
{
- return OUString::createFromAscii(cCollator);
+ return OUString("com.sun.star.i18n.Collator");
}
sal_Bool SAL_CALL CollatorImpl::supportsService(const OUString& rServiceName)
@@ -229,10 +227,18 @@ Sequence< OUString > SAL_CALL
CollatorImpl::getSupportedServiceNames() throw( RuntimeException )
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii(cCollator);
+ aRet[0] = OUString("com.sun.star.i18n.Collator");
return aRet;
}
} } } }
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_i18n_Collator_get_implementation(
+ css::uno::XComponentContext *context,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new com::sun::star::i18n::CollatorImpl(context));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index da49400cc71a..37748ad23213 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -1664,4 +1664,12 @@ OUString LocaleDataImpl::getFirstLocaleServiceName( const com::sun::star::lang::
return aVec;
}
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_i18n_LocaleDataImpl_get_implementation(
+ css::uno::XComponentContext *,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new LocaleDataImpl());
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx
index 65b2ad2982d6..d0c6c34614f8 100644
--- a/i18npool/source/registerservices/registerservices.cxx
+++ b/i18npool/source/registerservices/registerservices.cxx
@@ -26,14 +26,12 @@
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>
-#include <localedata.hxx>
#include <numberformatcode.hxx>
#include <nativenumbersupplier.hxx>
#include <defaultnumberingprovider.hxx>
#include <servicename.hxx>
#define TRANSLITERATION_ALL
-#include <transliterationImpl.hxx>
#include <transliteration_body.hxx>
#include <transliteration_caseignore.hxx>
#include <transliteration_Ignore.hxx>
@@ -50,7 +48,6 @@
#include <calendar_jewish.hxx>
#define BREAKITERATOR_ALL
-#include <breakiteratorImpl.hxx>
#include <breakiterator_cjk.hxx>
#include <breakiterator_th.hxx>
#include <breakiterator_unicode.hxx>
@@ -65,7 +62,6 @@
#include <unoscripttypedetector.hxx>
#include <cclass_unicode.hxx>
-#include <collatorImpl.hxx>
#include <chaptercollator.hxx>
#include <collator_unicode.hxx>
@@ -118,7 +114,6 @@ using namespace i18n;
IMPL_CREATEINSTANCE_CTX( NumberFormatCodeMapper )
IMPL_CREATEINSTANCE( NativeNumberSupplier )
-IMPL_CREATEINSTANCE( LocaleDataImpl )
IMPL_CREATEINSTANCE_CTX( DefaultNumberingProvider )
IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier )
IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_asian )
@@ -135,7 +130,6 @@ IMPL_CREATEINSTANCE( Calendar_ROC )
IMPL_CREATEINSTANCE( Calendar_hijri )
IMPL_CREATEINSTANCE( Calendar_jewish )
IMPL_CREATEINSTANCE( Calendar_buddhist )
-IMPL_CREATEINSTANCE_CTX( BreakIteratorImpl )
IMPL_CREATEINSTANCE( BreakIterator_Unicode )
IMPL_CREATEINSTANCE( BreakIterator_ja )
IMPL_CREATEINSTANCE( BreakIterator_zh )
@@ -143,12 +137,10 @@ IMPL_CREATEINSTANCE( BreakIterator_zh_TW )
IMPL_CREATEINSTANCE( BreakIterator_ko )
IMPL_CREATEINSTANCE( BreakIterator_th )
IMPL_CREATEINSTANCE_CTX( ChapterCollator )
-IMPL_CREATEINSTANCE_CTX( CollatorImpl )
IMPL_CREATEINSTANCE( Collator_Unicode )
IMPL_CREATEINSTANCE_CTX( CharacterClassificationImpl )
IMPL_CREATEINSTANCE_CTX( cclass_Unicode )
-IMPL_CREATEINSTANCE_CTX( TransliterationImpl )
IMPL_CREATEINSTANCE( UnoScriptTypeDetector )
IMPL_CREATEINSTANCE_CTX( InputSequenceCheckerImpl )
@@ -283,9 +275,6 @@ static const struct InstancesArray {
const sal_Char* pImplementationNm;
FN_CreateInstance pFn;
} aInstances[] = {
- { "com.sun.star.i18n.LocaleData",
- "com.sun.star.i18n.LocaleDataImpl",
- & LocaleDataImpl_CreateInstance },
{ "com.sun.star.i18n.NumberFormatMapper",
"com.sun.star.i18n.NumberFormatCodeMapper",
& NumberFormatCodeMapper_CreateInstance },
@@ -349,9 +338,6 @@ static const struct InstancesArray {
{ "com.sun.star.i18n.Calendar_buddhist",
"com.sun.star.i18n.Calendar_buddhist",
&Calendar_buddhist_CreateInstance },
- { "com.sun.star.i18n.BreakIterator",
- "com.sun.star.i18n.BreakIterator",
- &BreakIteratorImpl_CreateInstance },
{ "com.sun.star.i18n.BreakIterator_Unicode",
"com.sun.star.i18n.BreakIterator_Unicode",
&BreakIterator_Unicode_CreateInstance },
@@ -370,9 +356,6 @@ static const struct InstancesArray {
{ "com.sun.star.i18n.BreakIterator_th",
"com.sun.star.i18n.BreakIterator_th",
&BreakIterator_th_CreateInstance },
- { "com.sun.star.i18n.Collator",
- "com.sun.star.i18n.Collator",
- &CollatorImpl_CreateInstance },
{ "com.sun.star.i18n.ChapterCollator",
"com.sun.star.i18n.ChapterCollator",
&ChapterCollator_CreateInstance },
@@ -406,9 +389,6 @@ static const struct InstancesArray {
{ "com.sun.star.i18n.TextConversion_zh",
"com.sun.star.i18n.TextConversion_zh",
&TextConversion_zh_CreateInstance },
- { TRLT_SERVICELNAME,
- TRLT_IMPLNAME ,
- &TransliterationImpl_CreateInstance },
{ TRLT_SERVICELNAME_L10N,
TRLT_IMPLNAME_PREFIX "UPPERCASE_LOWERCASE",
&Transliteration_u2l_CreateInstance },
diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx
index 0a2e1f5dd81f..ebdb16f67cb4 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -632,12 +632,10 @@ TransliterationImpl::loadModuleByName( const OUString& implName,
return body.is();
}
-const sal_Char cTrans[] = "com.sun.star.i18n.Transliteration";
-
OUString SAL_CALL
TransliterationImpl::getImplementationName() throw( RuntimeException )
{
- return OUString::createFromAscii(cTrans);
+ return OUString("com.sun.star.i18n.Transliteration");
}
sal_Bool SAL_CALL
@@ -650,10 +648,18 @@ Sequence< OUString > SAL_CALL
TransliterationImpl::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii(cTrans);
+ aRet[0] = OUString("com.sun.star.i18n.Transliteration");
return aRet;
}
} } } }
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_i18n_Transliteration_get_implementation(
+ css::uno::XComponentContext *context,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new com::sun::star::i18n::TransliterationImpl(context));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/i18npool/util/i18npool.component b/i18npool/util/i18npool.component
index d2bf07ea0b02..092596e60b55 100644
--- a/i18npool/util/i18npool.component
+++ b/i18npool/util/i18npool.component
@@ -19,7 +19,8 @@
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="i18npool" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.i18n.BreakIterator">
+ <implementation name="com.sun.star.i18n.BreakIterator"
+ constructor="com_sun_star_i18n_BreakIterator_get_implementation">
<service name="com.sun.star.i18n.BreakIterator"/>
</implementation>
<implementation name="com.sun.star.i18n.BreakIterator_Unicode">
@@ -76,7 +77,8 @@
<implementation name="com.sun.star.i18n.CharacterClassification_Unicode">
<service name="com.sun.star.i18n.CharacterClassification_Unicode"/>
</implementation>
- <implementation name="com.sun.star.i18n.Collator">
+ <implementation name="com.sun.star.i18n.Collator"
+ constructor="com_sun_star_i18n_Collator_get_implementation">
<service name="com.sun.star.i18n.Collator"/>
</implementation>
<implementation name="com.sun.star.i18n.Collator_Unicode">
@@ -118,7 +120,8 @@
<implementation name="com.sun.star.i18n.InputSequenceChecker_th">
<service name="com.sun.star.i18n.InputSequenceChecker_th"/>
</implementation>
- <implementation name="com.sun.star.i18n.LocaleDataImpl">
+ <implementation name="com.sun.star.i18n.LocaleDataImpl"
+ constructor="com_sun_star_i18n_LocaleDataImpl_get_implementation">
<service name="com.sun.star.i18n.LocaleData"/>
</implementation>
<implementation name="com.sun.star.i18n.NativeNumberSupplier">
@@ -142,7 +145,8 @@
<implementation name="com.sun.star.i18n.TextConversion_zh">
<service name="com.sun.star.i18n.TextConversion_zh"/>
</implementation>
- <implementation name="com.sun.star.i18n.Transliteration">
+ <implementation name="com.sun.star.i18n.Transliteration"
+ constructor="com_sun_star_i18n_Transliteration_get_implementation">
<service name="com.sun.star.i18n.Transliteration"/>
</implementation>
<implementation name="com.sun.star.i18n.Transliteration.CharToNumEastIndic_ar">