Kaydet (Commit) 60d90025 authored tarafından László Németh's avatar László Németh Kaydeden (comit) Michael Stahl

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 c4318b8c
(add Greek alphabet to the technical dictionary).

Change-Id: I9356d439debfec34a963edbe5daacde976cc532c
Reviewed-on: https://gerrit.libreoffice.org/22449Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst e959fd9e
......@@ -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 );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment