diff options
Diffstat (limited to 'i18npool')
8 files changed, 68 insertions, 55 deletions
diff --git a/i18npool/source/characterclassification/unoscripttypedetector.cxx b/i18npool/source/characterclassification/unoscripttypedetector.cxx index b2b79e8037a8..99e30d671492 100644 --- a/i18npool/source/characterclassification/unoscripttypedetector.cxx +++ b/i18npool/source/characterclassification/unoscripttypedetector.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <com/sun/star/uno/XComponentContext.hpp> #include "unoscripttypedetector.hxx" #include <cppuhelper/supportsservice.hxx> #include <i18nutil/scripttypedetector.hxx> @@ -61,12 +62,10 @@ UnoScriptTypeDetector::endOfCTLScriptType( const OUString& Text, sal_Int32 nPos return ScriptTypeDetector::endOfCTLScriptType(Text, nPos); } -const sal_Char sDetector[] = "draft.com.sun.star.i18n.UnoScriptTypeDetector"; - OUString SAL_CALL UnoScriptTypeDetector::getImplementationName() throw( ::com::sun::star::uno::RuntimeException ) { - return OUString(sDetector); + return OUString("com.sun.star.i18n.ScriptTypeDetector"); } sal_Bool SAL_CALL @@ -79,8 +78,16 @@ UnoScriptTypeDetector::supportsService(const OUString& ServiceName) throw( ::com UnoScriptTypeDetector::getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ) { ::com::sun::star::uno::Sequence< OUString > aRet(1); - aRet[0] = sDetector; + aRet[0] = OUString("com.sun.star.i18n.ScriptTypeDetector"); return aRet; } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_i18n_ScriptTypeDetector_get_implementation( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new UnoScriptTypeDetector()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index c3ae33483257..1694f32da925 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -26,7 +26,6 @@ #include <nativenumbersupplier.hxx> #include <stdio.h> #include <string.h> -#include <comphelper/processfactory.hxx> #include <cppuhelper/supportsservice.hxx> // Cyrillic upper case @@ -57,7 +56,6 @@ using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace ::rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -1043,11 +1041,10 @@ OUString DefaultNumberingProvider::getNumberingIdentifier( sal_Int16 nNumberingT return OUString(); } -static const sal_Char cDefaultNumberingProvider[] = "com.sun.star.text.DefaultNumberingProvider"; OUString DefaultNumberingProvider::getImplementationName(void) throw( RuntimeException ) { - return OUString::createFromAscii(cDefaultNumberingProvider); + return OUString("com.sun.star.text.DefaultNumberingProvider"); } sal_Bool DefaultNumberingProvider::supportsService(const OUString& rServiceName) @@ -1060,10 +1057,18 @@ Sequence< OUString > DefaultNumberingProvider::getSupportedServiceNames(void) throw( RuntimeException ) { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii(cDefaultNumberingProvider); + aRet[0] = OUString("com.sun.star.text.DefaultNumberingProvider"); return aRet; } } } } } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_text_DefaultNumberingProvider_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new css::i18n::DefaultNumberingProvider(context)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 9b826be1ccbc..d4ec4331c56c 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -28,7 +28,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -using namespace ::rtl; typedef struct { sal_Int16 number; @@ -911,4 +910,12 @@ NativeNumberSupplier::getSupportedServiceNames() throw( RuntimeException ) } } } } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_i18n_NativeNumberSupplier_get_implementation( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new css::i18n::NativeNumberSupplier()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/numberformatcode/numberformatcode.cxx b/i18npool/source/numberformatcode/numberformatcode.cxx index ab050fc75df9..70cbaf1275c3 100644 --- a/i18npool/source/numberformatcode/numberformatcode.cxx +++ b/i18npool/source/numberformatcode/numberformatcode.cxx @@ -281,4 +281,12 @@ NumberFormatCodeMapper::getSupportedServiceNames(void) throw( ::com::sun::star:: return aRet; } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_i18n_NumberFormatCodeMapper_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new NumberFormatCodeMapper(context)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx index 61cab4120f28..5cc1a1b43711 100644 --- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx +++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <com/sun/star/uno/XComponentContext.hpp> #include <boost/scoped_ptr.hpp> #include <i18nlangtag/languagetag.hxx> #include <i18nlangtag/languagetagicu.hxx> -#include <comphelper/processfactory.hxx> #include <cppuhelper/supportsservice.hxx> #include <string.h> #include "ordinalsuffix.hxx" @@ -31,7 +31,6 @@ using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::uno; using namespace ::com::sun::star; -using namespace ::rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -155,4 +154,12 @@ Sequence< OUString > SAL_CALL OrdinalSuffix::getSupportedServiceNames(void) thro } } } } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_i18n_OrdinalSuffix_get_implementation( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new css::i18n::OrdinalSuffix()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx index d0c6c34614f8..2f6a60da597a 100644 --- a/i18npool/source/registerservices/registerservices.cxx +++ b/i18npool/source/registerservices/registerservices.cxx @@ -26,9 +26,6 @@ #include <cppuhelper/weak.hxx> #include <osl/mutex.hxx> -#include <numberformatcode.hxx> -#include <nativenumbersupplier.hxx> -#include <defaultnumberingprovider.hxx> #include <servicename.hxx> #define TRANSLITERATION_ALL @@ -59,7 +56,6 @@ #include <indexentrysupplier_default.hxx> #include <characterclassificationImpl.hxx> -#include <unoscripttypedetector.hxx> #include <cclass_unicode.hxx> #include <chaptercollator.hxx> @@ -69,11 +65,8 @@ #include <inputsequencechecker_th.hxx> #include <inputsequencechecker_hi.hxx> -#include <textconversionImpl.hxx> #include <textconversion.hxx> -#include <ordinalsuffix.hxx> - using namespace ::com::sun::star; #define IMPL_CREATEINSTANCE( ImplName ) \ @@ -112,9 +105,6 @@ typedef uno::Reference< using namespace i18n; -IMPL_CREATEINSTANCE_CTX( NumberFormatCodeMapper ) -IMPL_CREATEINSTANCE( NativeNumberSupplier ) -IMPL_CREATEINSTANCE_CTX( DefaultNumberingProvider ) IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier ) IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_asian ) IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable ) @@ -141,13 +131,11 @@ IMPL_CREATEINSTANCE( Collator_Unicode ) IMPL_CREATEINSTANCE_CTX( CharacterClassificationImpl ) IMPL_CREATEINSTANCE_CTX( cclass_Unicode ) -IMPL_CREATEINSTANCE( UnoScriptTypeDetector ) IMPL_CREATEINSTANCE_CTX( InputSequenceCheckerImpl ) IMPL_CREATEINSTANCE( InputSequenceChecker_th ) IMPL_CREATEINSTANCE( InputSequenceChecker_hi ) -IMPL_CREATEINSTANCE_CTX( TextConversionImpl ) IMPL_CREATEINSTANCE_CTX( TextConversion_ko ) IMPL_CREATEINSTANCE_CTX( TextConversion_zh ) @@ -268,22 +256,11 @@ IMPL_CREATEINSTANCE( halfwidthKatakanaToFullwidthKatakana ) IMPL_CREATEINSTANCE( fullwidthToHalfwidthLikeASC ) IMPL_CREATEINSTANCE( halfwidthToFullwidthLikeJIS ) -IMPL_CREATEINSTANCE( OrdinalSuffix ) - static const struct InstancesArray { const sal_Char* pServiceNm; const sal_Char* pImplementationNm; FN_CreateInstance pFn; } aInstances[] = { - { "com.sun.star.i18n.NumberFormatMapper", - "com.sun.star.i18n.NumberFormatCodeMapper", - & NumberFormatCodeMapper_CreateInstance }, - { "com.sun.star.i18n.NativeNumberSupplier", - "com.sun.star.i18n.NativeNumberSupplier", - & NativeNumberSupplier_CreateInstance }, - { "com.sun.star.text.DefaultNumberingProvider", - "com.sun.star.text.DefaultNumberingProvider", - &DefaultNumberingProvider_CreateInstance }, { "com.sun.star.i18n.IndexEntrySupplier", "com.sun.star.i18n.IndexEntrySupplier", &IndexEntrySupplier_CreateInstance }, @@ -362,9 +339,6 @@ static const struct InstancesArray { { "com.sun.star.i18n.Collator_Unicode", "com.sun.star.i18n.Collator_Unicode", &Collator_Unicode_CreateInstance }, - { "com.sun.star.i18n.ScriptTypeDetector", - "com.sun.star.i18n.ScriptTypeDetector", - &UnoScriptTypeDetector_CreateInstance }, { "com.sun.star.i18n.CharacterClassification", "com.sun.star.i18n.CharacterClassification", &CharacterClassificationImpl_CreateInstance }, @@ -380,9 +354,6 @@ static const struct InstancesArray { { "com.sun.star.i18n.InputSequenceChecker_hi", "com.sun.star.i18n.InputSequenceChecker_hi", &InputSequenceChecker_hi_CreateInstance }, - { "com.sun.star.i18n.TextConversion", - "com.sun.star.i18n.TextConversion", - &TextConversionImpl_CreateInstance }, { "com.sun.star.i18n.TextConversion_ko", "com.sun.star.i18n.TextConversion_ko", &TextConversion_ko_CreateInstance }, @@ -524,10 +495,6 @@ static const struct InstancesArray { IMPL_TRANSLITERATION_ITEM (NumToTextTianGan_zh), IMPL_TRANSLITERATION_ITEM (NumToTextDiZi_zh), - { "com.sun.star.i18n.OrdinalSuffix", - "com.sun.star.i18n.OrdinalSuffix", - & OrdinalSuffix_CreateInstance }, - { TRLT_SERVICELNAME_L10N, TRLT_IMPLNAME_PREFIX "FULLWIDTHKATAKANA_HALFWIDTHKATAKANA", &fullwidthKatakanaToHalfwidthKatakana_CreateInstance }, diff --git a/i18npool/source/textconversion/textconversionImpl.cxx b/i18npool/source/textconversion/textconversionImpl.cxx index 2fc29c9fa335..00e1480561ed 100644 --- a/i18npool/source/textconversion/textconversionImpl.cxx +++ b/i18npool/source/textconversion/textconversionImpl.cxx @@ -110,12 +110,10 @@ TextConversionImpl::getLocaleSpecificTextConversion(const Locale& rLocale) throw throw NoSupportException(); // aLocale is not supported } -const sal_Char cTextConversion[] = "com.sun.star.i18n.TextConversion"; - OUString SAL_CALL TextConversionImpl::getImplementationName() throw( RuntimeException ) { - return OUString::createFromAscii(cTextConversion); + return OUString("com.sun.star.i18n.TextConversion"); } sal_Bool SAL_CALL @@ -129,10 +127,18 @@ Sequence< OUString > SAL_CALL TextConversionImpl::getSupportedServiceNames() throw( RuntimeException ) { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii(cTextConversion); + aRet[0] = OUString("com.sun.star.i18n.TextConversion"); return aRet; } } } } } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_i18n_TextConversion_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new css::i18n::TextConversionImpl(context)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/util/i18npool.component b/i18npool/util/i18npool.component index 092596e60b55..4ad3adf6684b 100644 --- a/i18npool/util/i18npool.component +++ b/i18npool/util/i18npool.component @@ -124,19 +124,24 @@ constructor="com_sun_star_i18n_LocaleDataImpl_get_implementation"> <service name="com.sun.star.i18n.LocaleData"/> </implementation> - <implementation name="com.sun.star.i18n.NativeNumberSupplier"> + <implementation name="com.sun.star.i18n.NativeNumberSupplier" + constructor="com_sun_star_i18n_NativeNumberSupplier_get_implementation"> <service name="com.sun.star.i18n.NativeNumberSupplier"/> </implementation> - <implementation name="com.sun.star.i18n.NumberFormatCodeMapper"> + <implementation name="com.sun.star.i18n.NumberFormatCodeMapper" + constructor="com_sun_star_i18n_NumberFormatCodeMapper_get_implementation"> <service name="com.sun.star.i18n.NumberFormatMapper"/> </implementation> - <implementation name="com.sun.star.i18n.OrdinalSuffix"> + <implementation name="com.sun.star.i18n.OrdinalSuffix" + constructor="com_sun_star_i18n_OrdinalSuffix_get_implementation"> <service name="com.sun.star.i18n.OrdinalSuffix"/> </implementation> - <implementation name="com.sun.star.i18n.ScriptTypeDetector"> + <implementation name="com.sun.star.i18n.ScriptTypeDetector" + constructor="com_sun_star_i18n_ScriptTypeDetector_get_implementation"> <service name="com.sun.star.i18n.ScriptTypeDetector"/> </implementation> - <implementation name="com.sun.star.i18n.TextConversion"> + <implementation name="com.sun.star.i18n.TextConversion" + constructor="com_sun_star_i18n_TextConversion_get_implementation"> <service name="com.sun.star.i18n.TextConversion"/> </implementation> <implementation name="com.sun.star.i18n.TextConversion_ko"> @@ -473,7 +478,8 @@ <implementation name="com.sun.star.i18n.Transliteration.smallToLarge_ja_JP"> <service name="com.sun.star.i18n.Transliteration.l10n"/> </implementation> - <implementation name="com.sun.star.text.DefaultNumberingProvider"> + <implementation name="com.sun.star.text.DefaultNumberingProvider" + constructor="com_sun_star_text_DefaultNumberingProvider_get_implementation"> <service name="com.sun.star.text.DefaultNumberingProvider"/> </implementation> <implementation name="com.sun.star.i18n.Transliteration.ignoreDiacritics_CTL"> |