diff options
author | Rüdiger Timm <rt@openoffice.org> | 2003-04-24 13:02:03 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2003-04-24 13:02:03 +0000 |
commit | 51f32751afe81ae9b10673a98c73850ff4faeace (patch) | |
tree | 38dca79f490a77e8334f518f6c2db9d989c723d8 /linguistic/source/spelldsp.cxx | |
parent | b5219e4364c8d58627818ce4301bf2ae69e96a64 (diff) |
INTEGRATION: CWS mav4 (1.12.10); FILE MERGED
2003/04/15 12:39:49 tl 1.12.10.1: #108864# first time spelling problem fixed
Diffstat (limited to 'linguistic/source/spelldsp.cxx')
-rw-r--r-- | linguistic/source/spelldsp.cxx | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index fab4a503a74f..753bfc86b8a7 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: spelldsp.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: vg $ $Date: 2003-04-02 09:24:57 $ + * last change: $Author: rt $ $Date: 2003-04-24 14:02:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -697,7 +697,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( // list of proposals found (to be checked against entries of // neagtive dictionaries) Sequence< OUString > aProposals; - INT16 eFailureType = SpellFailure::IS_NEGATIVE_WORD; + INT16 eFailureType = -1; // no failure if (xRes.is()) { aProposals = xRes->getAlternatives(); @@ -721,6 +721,8 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( aChkWord, nLanguage, FALSE, TRUE ) ); if (xNegEntry.is()) { + eFailureType = SpellFailure::IS_NEGATIVE_WORD; + // replacement text to be added to suggestions, if not empty OUString aAddRplcTxt( xNegEntry->getReplacementText() ); @@ -740,12 +742,15 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( } } - // remove entries listed in negative dictionaries - if (bCheckDics && xDicList.is()) - SeqRemoveNegEntries( aProposals, xDicList, nLanguage ); + if (eFailureType != -1) // word found in negative dictionary + { + // remove entries listed in negative dictionaries + if (bCheckDics && xDicList.is()) + SeqRemoveNegEntries( aProposals, xDicList, nLanguage ); - xRes = new SpellAlternatives( aChkWord, nLanguage, - eFailureType, aProposals ); + xRes = new SpellAlternatives( aChkWord, nLanguage, + eFailureType, aProposals ); + } } return xRes; |