diff options
author | Thomas Lange [tl] <tl@openoffice.org> | 2010-08-09 11:35:18 +0200 |
---|---|---|
committer | Thomas Lange [tl] <tl@openoffice.org> | 2010-08-09 11:35:18 +0200 |
commit | f343838dbbae63d6040706c078e96efc4a50661a (patch) | |
tree | e3de63986f32be9195ea9159e22de8d0fceda52e /lingucomponent/source/spellcheck/spell/sspellimp.cxx | |
parent | adb0c9fe06f0a9b8c871df5e45303c6414106107 (diff) |
cws tl82: #i113293# sspellimp.cxx fixed
Diffstat (limited to 'lingucomponent/source/spellcheck/spell/sspellimp.cxx')
-rwxr-xr-x | lingucomponent/source/spellcheck/spell/sspellimp.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index b8b0fe7a13cd..832a1349c61e 100755 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -51,6 +51,7 @@ #include <unotools/useroptions.hxx> #include <osl/file.hxx> #include <rtl/ustrbuf.hxx> +#include <rtl/textenc.h> #include <list> #include <set> @@ -334,16 +335,16 @@ INT16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocal eEnc = aDEncs[i]; } - // we don't want to work with a default text encoding since following incorrect - // results may occur only for specific text and thus may be hard to notice. - // Thus better always make a clean exit here if the text encoding is in question. - // Hopefully something not working at all will raise proper attention quickly. ;-) - DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" ); - if (eEnc == RTL_TEXTENCODING_DONTKNOW) - return -1; - if (pMS) { + // we don't want to work with a default text encoding since following incorrect + // results may occur only for specific text and thus may be hard to notice. + // Thus better always make a clean exit here if the text encoding is in question. + // Hopefully something not working at all will raise proper attention quickly. ;-) + DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" ); + if (eEnc == RTL_TEXTENCODING_DONTKNOW) + return -1; + OString aWrd(OU2ENC(nWord,eEnc)); int rVal = pMS->spell((char*)aWrd.getStr()); if (rVal != 1) |