[Libreoffice-commits] core.git: linguistic/source

László Németh laszlo.nemeth at collabora.com
Thu Feb 18 20:20:46 UTC 2016


 linguistic/source/spelldta.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 60d900254e93e8ac19fed3fa451b91c536efe930
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Wed Feb 17 23:23:39 2016 +0100

    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 at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index bb62a5a..001fbe9 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 );
             }
         }


More information about the Libreoffice-commits mailing list