summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2016-02-17 23:23:39 +0100
committerMichael Stahl <mstahl@redhat.com>2016-02-18 20:20:20 +0000
commit60d900254e93e8ac19fed3fa451b91c536efe930 (patch)
tree184ec712457cc07d42ee636abf79422b3da90777 /linguistic
parente959fd9e2389727c74631b8b29c5d39b404b390a (diff)
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>
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/spelldta.cxx2
1 files changed, 1 insertions, 1 deletions
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 );
}
}