diff options
author | Thomas Lange <tl@openoffice.org> | 2009-09-17 07:39:00 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2009-09-17 07:39:00 +0000 |
commit | 76b8b7baa77573076292306400b7cb80ccc502e4 (patch) | |
tree | 7e24283aa1db21ec99d3a1c941d9b957137cf0df /unotools/source/i18n | |
parent | 6485417ddb43981ebc67ed22c0b585a8841ae1ab (diff) |
#i1601# Sentence case, Title case, and Toggle case transliteration added
Diffstat (limited to 'unotools/source/i18n')
-rw-r--r-- | unotools/source/i18n/transliterationwrapper.cxx | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx index bd33e447471f..2536b1aee1ca 100644 --- a/unotools/source/i18n/transliterationwrapper.cxx +++ b/unotools/source/i18n/transliterationwrapper.cxx @@ -34,11 +34,12 @@ #include <unotools/transliterationwrapper.hxx> #include <tools/debug.hxx> #include <i18npool/mslangid.hxx> -#ifndef _COMPHELPER_COMPONENTFACTORY_HXX_ #include <comphelper/componentfactory.hxx> -#endif + #include <com/sun/star/uno/XInterface.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/i18n/TransliterationModulesExtra.hpp> #define TRANSLIT_LIBRARYNAME "i18n" #define TRANSLIT_SERVICENAME "com.sun.star.i18n.Transliteration" @@ -168,14 +169,22 @@ void TransliterationWrapper::loadModuleIfNeeded( sal_uInt16 nLang ) sal_Bool bLoad = bFirstCall; bFirstCall = sal_False; - if( nLanguage != nLang ) + if( static_cast< sal_Int32 >(nType) == TransliterationModulesExtra::SENTENCE_CASE ) { - setLanguageLocaleImpl( nLang ); - if( !bLoad ) - bLoad = needLanguageForTheMode(); + if( bLoad ) + loadModuleByImplName(String::CreateFromAscii("SENTENCE_CASE"), nLang); + } + else + { + if( nLanguage != nLang ) + { + setLanguageLocaleImpl( nLang ); + if( !bLoad ) + bLoad = needLanguageForTheMode(); + } + if( bLoad ) + loadModuleImpl(); } - if( bLoad ) - loadModuleImpl(); } |