From 60d900254e93e8ac19fed3fa451b91c536efe930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20N=C3=A9meth?= Date: Wed, 17 Feb 2016 23:23:39 +0100 Subject: [PATCH] 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 Tested-by: Michael Stahl --- linguistic/source/spelldta.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx index bb62a5a059d4..001fbe9ece69 100644 --- a/linguistic/source/spelldta.cxx +++ b/linguistic/source/spelldta.cxx @@ -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 ); } }