diff options
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/inc/chaptercollator.hxx | 2 | ||||
-rw-r--r-- | i18npool/inc/collatorImpl.hxx | 5 | ||||
-rw-r--r-- | i18npool/inc/indexentrysupplier_asian.hxx | 2 | ||||
-rw-r--r-- | i18npool/inc/indexentrysupplier_common.hxx | 2 | ||||
-rw-r--r-- | i18npool/inc/indexentrysupplier_default.hxx | 4 | ||||
-rw-r--r-- | i18npool/inc/indexentrysupplier_ja_phonetic.hxx | 4 | ||||
-rw-r--r-- | i18npool/source/collator/chaptercollator.cxx | 6 | ||||
-rw-r--r-- | i18npool/source/collator/collatorImpl.cxx | 6 | ||||
-rw-r--r-- | i18npool/source/indexentry/indexentrysupplier_asian.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/indexentry/indexentrysupplier_common.cxx | 4 | ||||
-rw-r--r-- | i18npool/source/indexentry/indexentrysupplier_default.cxx | 10 | ||||
-rw-r--r-- | i18npool/source/registerservices/registerservices.cxx | 16 |
12 files changed, 30 insertions, 33 deletions
diff --git a/i18npool/inc/chaptercollator.hxx b/i18npool/inc/chaptercollator.hxx index cb50b257b062..83518d64a812 100644 --- a/i18npool/inc/chaptercollator.hxx +++ b/i18npool/inc/chaptercollator.hxx @@ -31,7 +31,7 @@ class ChapterCollator : public CollatorImpl { public: // Constructors - ChapterCollator( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF ); + ChapterCollator( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext ); // Destructor ~ChapterCollator(); diff --git a/i18npool/inc/collatorImpl.hxx b/i18npool/inc/collatorImpl.hxx index 7af96199cbbd..52409c59796f 100644 --- a/i18npool/inc/collatorImpl.hxx +++ b/i18npool/inc/collatorImpl.hxx @@ -20,7 +20,6 @@ #define _I18N_COLLATORIMPL_HXX_ #include <comphelper/processfactory.hxx> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/Reference.h> #include <com/sun/star/i18n/XLocaleData4.hpp> #include <com/sun/star/i18n/XCollator.hpp> @@ -44,7 +43,7 @@ class CollatorImpl : public cppu::WeakImplHelper2 public: // Constructors - CollatorImpl( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF ); + CollatorImpl( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext ); // Destructor ~CollatorImpl(); @@ -95,7 +94,7 @@ private : lookupTableItem *cachedItem; // Service Factory - com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xMSF; + com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_xContext; // lang::Locale Data com::sun::star::uno::Reference < XLocaleData4 > mxLocaleData; diff --git a/i18npool/inc/indexentrysupplier_asian.hxx b/i18npool/inc/indexentrysupplier_asian.hxx index 454fab80fdaa..d15ae9703655 100644 --- a/i18npool/inc/indexentrysupplier_asian.hxx +++ b/i18npool/inc/indexentrysupplier_asian.hxx @@ -31,7 +31,7 @@ namespace com { namespace sun { namespace star { namespace i18n { class IndexEntrySupplier_asian : public IndexEntrySupplier_Common { public: - IndexEntrySupplier_asian( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF ); + IndexEntrySupplier_asian( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext ); ~IndexEntrySupplier_asian(); rtl::OUString SAL_CALL getIndexCharacter( const rtl::OUString& rIndexEntry, diff --git a/i18npool/inc/indexentrysupplier_common.hxx b/i18npool/inc/indexentrysupplier_common.hxx index b5abbc3b0c99..65277c2b5220 100644 --- a/i18npool/inc/indexentrysupplier_common.hxx +++ b/i18npool/inc/indexentrysupplier_common.hxx @@ -38,7 +38,7 @@ class IndexEntrySupplier_Common : public cppu::WeakImplHelper2 > { public: - IndexEntrySupplier_Common( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF ); + IndexEntrySupplier_Common( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext ); ~IndexEntrySupplier_Common(); virtual com::sun::star::uno::Sequence < com::sun::star::lang::Locale > SAL_CALL getLocaleList() diff --git a/i18npool/inc/indexentrysupplier_default.hxx b/i18npool/inc/indexentrysupplier_default.hxx index e915ea7d3091..757a849af46a 100644 --- a/i18npool/inc/indexentrysupplier_default.hxx +++ b/i18npool/inc/indexentrysupplier_default.hxx @@ -30,7 +30,7 @@ class Index; // ---------------------------------------------------- class IndexEntrySupplier_Unicode : public IndexEntrySupplier_Common { public: - IndexEntrySupplier_Unicode( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF ); + IndexEntrySupplier_Unicode( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext ); ~IndexEntrySupplier_Unicode(); virtual sal_Bool SAL_CALL loadAlgorithm( @@ -81,7 +81,7 @@ public: class Index { public: - Index(const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF); + Index(const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext); ~Index(); void init(const com::sun::star::lang::Locale& rLocale, const rtl::OUString& algorithm) throw (com::sun::star::uno::RuntimeException); diff --git a/i18npool/inc/indexentrysupplier_ja_phonetic.hxx b/i18npool/inc/indexentrysupplier_ja_phonetic.hxx index 5419f0607131..33c8f7378390 100644 --- a/i18npool/inc/indexentrysupplier_ja_phonetic.hxx +++ b/i18npool/inc/indexentrysupplier_ja_phonetic.hxx @@ -30,7 +30,7 @@ namespace com { namespace sun { namespace star { namespace i18n { class IndexEntrySupplier_ja_phonetic : public IndexEntrySupplier_Common { public: - IndexEntrySupplier_ja_phonetic( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF ) : IndexEntrySupplier_Common(rxMSF) { + IndexEntrySupplier_ja_phonetic( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext ) : IndexEntrySupplier_Common(rxContext) { implementationName = "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic"; }; virtual rtl::OUString SAL_CALL getIndexCharacter( const rtl::OUString& rIndexEntry,\ @@ -49,7 +49,7 @@ public: #define INDEXENTRYSUPPLIER_JA_PHONETIC( algorithm ) \ class IndexEntrySupplier_##algorithm : public IndexEntrySupplier_ja_phonetic {\ public:\ - IndexEntrySupplier_##algorithm (const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF) : IndexEntrySupplier_ja_phonetic (rxMSF) {\ + IndexEntrySupplier_##algorithm (const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext) : IndexEntrySupplier_ja_phonetic (rxContext) {\ implementationName = "com.sun.star.i18n.IndexEntrySupplier_"#algorithm;\ };\ virtual sal_Bool SAL_CALL loadAlgorithm(\ diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx index 8c0c1100c308..23c936df4a12 100644 --- a/i18npool/source/collator/chaptercollator.cxx +++ b/i18npool/source/collator/chaptercollator.cxx @@ -31,11 +31,9 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::i18n; using namespace ::rtl; -ChapterCollator::ChapterCollator( const Reference < XMultiServiceFactory >& rxMSF ) : CollatorImpl(rxMSF) +ChapterCollator::ChapterCollator( const Reference < XComponentContext >& rxContext ) : CollatorImpl(rxContext) { - if ( rxMSF.is()) { - cclass = CharacterClassification::create( comphelper::getComponentContext( rxMSF ) ); - } + cclass = CharacterClassification::create( rxContext ); } ChapterCollator::~ChapterCollator() diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx index d2a85d2c72a3..fde6eef3373a 100644 --- a/i18npool/source/collator/collatorImpl.cxx +++ b/i18npool/source/collator/collatorImpl.cxx @@ -33,9 +33,9 @@ using ::rtl::OUStringBuffer; namespace com { namespace sun { namespace star { namespace i18n { -CollatorImpl::CollatorImpl( const Reference < XMultiServiceFactory >& rxMSF ) : xMSF(rxMSF) +CollatorImpl::CollatorImpl( const Reference < XComponentContext >& rxContext ) : m_xContext(rxContext) { - mxLocaleData.set(LocaleData::create(comphelper::getComponentContext(xMSF))); + mxLocaleData.set( LocaleData::create(rxContext) ); cachedItem = NULL; } @@ -155,7 +155,7 @@ CollatorImpl::createCollator(const lang::Locale& rLocale, const OUString& servic } } Reference < XInterface > xI = - xMSF->createInstance(OUString("com.sun.star.i18n.Collator_") + serviceName); + m_xContext->getServiceManager()->createInstanceWithContext( OUString("com.sun.star.i18n.Collator_") + serviceName, m_xContext ); if (xI.is()) { Reference < XCollator > xC; diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx index 90a92d19a651..f77bc7d4676c 100644 --- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx @@ -35,7 +35,7 @@ extern "C" { static void SAL_CALL thisModule() {} } #endif IndexEntrySupplier_asian::IndexEntrySupplier_asian( - const Reference < XMultiServiceFactory >& rxMSF ) : IndexEntrySupplier_Common(rxMSF) + const Reference < XComponentContext >& rxContext ) : IndexEntrySupplier_Common(rxContext) { implementationName = "com.sun.star.i18n.IndexEntrySupplier_asian"; #ifndef DISABLE_DYNLOADING diff --git a/i18npool/source/indexentry/indexentrysupplier_common.cxx b/i18npool/source/indexentry/indexentrysupplier_common.cxx index d2c2486d88bc..bd647b2b2476 100644 --- a/i18npool/source/indexentry/indexentrysupplier_common.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_common.cxx @@ -28,10 +28,10 @@ using namespace ::rtl; namespace com { namespace sun { namespace star { namespace i18n { -IndexEntrySupplier_Common::IndexEntrySupplier_Common(const Reference < lang::XMultiServiceFactory >& rxMSF) +IndexEntrySupplier_Common::IndexEntrySupplier_Common(const Reference < uno::XComponentContext >& rxContext) { implementationName = "com.sun.star.i18n.IndexEntrySupplier_Common"; - collator = new CollatorImpl(rxMSF); + collator = new CollatorImpl(rxContext); usePhonetic = sal_False; } diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx index 022cead9f9e0..eba5beed2c33 100644 --- a/i18npool/source/indexentry/indexentrysupplier_default.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx @@ -29,11 +29,11 @@ using namespace ::rtl; namespace com { namespace sun { namespace star { namespace i18n { IndexEntrySupplier_Unicode::IndexEntrySupplier_Unicode( - const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF ) : - IndexEntrySupplier_Common(rxMSF) + const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext ) : + IndexEntrySupplier_Common(rxContext) { implementationName = "com.sun.star.i18n.IndexEntrySupplier_Unicode"; - index = new Index(rxMSF); + index = new Index(rxContext); } IndexEntrySupplier_Unicode::~IndexEntrySupplier_Unicode() @@ -106,9 +106,9 @@ void IndexTable::init(sal_Unicode start_, sal_Unicode end_, IndexKey *keys, sal_ } } -Index::Index(const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF) +Index::Index(const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext) { - collator = new CollatorImpl(rxMSF); + collator = new CollatorImpl(rxContext); } Index::~Index() diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx index 44e00d328f38..5b9572abc2a6 100644 --- a/i18npool/source/registerservices/registerservices.cxx +++ b/i18npool/source/registerservices/registerservices.cxx @@ -132,12 +132,12 @@ IMPL_CREATEINSTANCE( NativeNumberSupplier ) IMPL_CREATEINSTANCE( LocaleData ) IMPL_CREATEINSTANCE_CTX( DefaultNumberingProvider ) IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier ) -IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_asian ) -IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable ) -IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant ) -IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable ) -IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant ) -IMPL_CREATEINSTANCE_MSF( IndexEntrySupplier_Unicode ) +IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_asian ) +IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable ) +IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant ) +IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable ) +IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant ) +IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_Unicode ) IMPL_CREATEINSTANCE_MSF( CalendarImpl ) IMPL_CREATEINSTANCE( Calendar_gregorian ) IMPL_CREATEINSTANCE( Calendar_hanja ) @@ -153,8 +153,8 @@ IMPL_CREATEINSTANCE( BreakIterator_zh ) IMPL_CREATEINSTANCE( BreakIterator_zh_TW ) IMPL_CREATEINSTANCE( BreakIterator_ko ) IMPL_CREATEINSTANCE( BreakIterator_th ) -IMPL_CREATEINSTANCE_MSF( ChapterCollator ) -IMPL_CREATEINSTANCE_MSF( CollatorImpl ) +IMPL_CREATEINSTANCE_CTX( ChapterCollator ) +IMPL_CREATEINSTANCE_CTX( CollatorImpl ) IMPL_CREATEINSTANCE( Collator_Unicode ) IMPL_CREATEINSTANCE_MSF( CharacterClassificationImpl ) |