diff --git a/main/i18npool/inc/transliterationImpl.hxx b/main/i18npool/inc/transliterationImpl.hxx index 5cd3c7b2bd..74b827b873 100644 --- a/main/i18npool/inc/transliterationImpl.hxx +++ b/main/i18npool/inc/transliterationImpl.hxx @@ -121,15 +121,6 @@ private: com::sun::star::uno::Reference< XLocaleData > localedata; com::sun::star::uno::Reference< com::sun::star::i18n::XExtendedTransliteration > caseignore; - /** structure to cache the last transliteration body used. */ - struct TransBody - { - ::osl::Mutex mutex; - ::rtl::OUString Name; - ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XExtendedTransliteration > Body; - }; - static TransBody lastTransBody; - virtual sal_Bool SAL_CALL loadModuleByName( const rtl::OUString& implName, com::sun::star::uno::Reference & body, const com::sun::star::lang::Locale& rLocale) throw(com::sun::star::uno::RuntimeException); diff --git a/main/i18npool/source/transliteration/transliterationImpl.cxx b/main/i18npool/source/transliteration/transliterationImpl.cxx index 8b68415484..2141fd5859 100644 --- a/main/i18npool/source/transliteration/transliterationImpl.cxx +++ b/main/i18npool/source/transliteration/transliterationImpl.cxx @@ -144,8 +144,6 @@ static struct TMlist { {(TransliterationModules)0, (TransliterationModulesNew)0, NULL} }; -TransliterationImpl::TransBody TransliterationImpl::lastTransBody; - // Constructor/Destructor TransliterationImpl::TransliterationImpl(const Reference & xMSF) : xSMgr(xMSF) { @@ -591,15 +589,6 @@ TransliterationImpl::clear() void TransliterationImpl::loadBody( OUString &implName, Reference& body ) throw (RuntimeException) { - ::osl::MutexGuard guard(lastTransBody.mutex); - - if (implName.equals(lastTransBody.Name)) - { - // Use the cached body instead of going through the expensive looping again. - body = lastTransBody.Body; - return; - } - Reference< XContentEnumerationAccess > xEnumAccess( xSMgr, UNO_QUERY ); Reference< XEnumeration > xEnum(xEnumAccess->createContentEnumeration( OUString::createFromAscii(TRLT_SERVICELNAME_L10N))); @@ -616,8 +605,6 @@ void TransliterationImpl::loadBody( OUString &implName, ReferencequeryInterface(::getCppuType(( const Reference*)0)); a >>= body; - lastTransBody.Name = implName; - lastTransBody.Body = body; return; } }