tdf#97179: do not suggest 1-letter custom dictionary words
Fix for the following regression: Suggestions for all 1- or 2-letter words contain ~all Greek letters from the commit c4318b8c1912c1ee947d96b02b3d4abf2eaf65f6 (add Greek alphabet to the technical dictionary). Change-Id: I9356d439debfec34a963edbe5daacde976cc532c Reviewed-on: https://gerrit.libreoffice.org/22449 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
This commit is contained in:
parent
e959fd9e23
commit
60d900254e
@ -99,7 +99,7 @@ void SearchSimilarText( const OUString &rText, sal_Int16 nLanguage,
|
||||
// remove characters used to determine hyphenation positions
|
||||
aEntryTxt = comphelper::string::remove(pEntries[k]->getDictionaryWord(), '=');
|
||||
}
|
||||
if (!aEntryTxt.isEmpty() && LevDistance( rText, aEntryTxt ) <= 2)
|
||||
if (!aEntryTxt.isEmpty() && aEntryTxt.getLength() > 1 && LevDistance( rText, aEntryTxt ) <= 2)
|
||||
rDicListProps.push_back( aEntryTxt );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user