diff options
author | Thomas Lange <tl@openoffice.org> | 2009-07-13 11:08:01 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2009-07-13 11:08:01 +0000 |
commit | f74002df591f62452ef9181068cda76e355f75e7 (patch) | |
tree | 176852193b26e06b6a6ad5f5c9b642c970a382e4 /unotools | |
parent | #i64400# hyphen should be part of word by default (diff) | |
download | core-f74002df591f62452ef9181068cda76e355f75e7.tar.gz core-f74002df591f62452ef9181068cda76e355f75e7.zip |
#i1601# sentence case transliteration
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/i18n/transliterationwrapper.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx index bd33e447471f..70d37ad54f6a 100644 --- a/unotools/source/i18n/transliterationwrapper.cxx +++ b/unotools/source/i18n/transliterationwrapper.cxx @@ -34,11 +34,10 @@ #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/i18n/TransliterationModulesExtra.hpp> #define TRANSLIT_LIBRARYNAME "i18n" #define TRANSLIT_SERVICENAME "com.sun.star.i18n.Transliteration" @@ -168,14 +167,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(); } |