[Libreoffice-bugs] [Bug 141773] Autocorrection for all languages

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Apr 20 12:27:56 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=141773

--- Comment #4 from Julien Nabet <serval2412 at yahoo.fr> ---
With this patch this one is fixed without breaking the other:
diff --git a/editeng/source/misc/svxacorr.cxx
b/editeng/source/misc/svxacorr.cxx
index ce1f788f593c..21c95bc6bc8d 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1944,6 +1944,20 @@ const SvxAutocorrWord*
SvxAutoCorrect::SearchWordsInList(
             rLang = aLanguageTag;
             return pRet;
         }
+    }
+
+    LanguageTag aLanguageTagUnd(LANGUAGE_UNDETERMINED);
+    if (m_aLangTable.find(aLanguageTagUnd) != m_aLangTable.end())
+    {
+        //the language is available - so bring it on
+        std::unique_ptr<SvxAutoCorrectLanguageLists> const& pList =
m_aLangTable.find(aLanguageTagUnd)->second;
+        pRet = lcl_SearchWordsInList( pList.get(), rTxt, rStt, nEndPos );
+        if( pRet )
+        {
+            // TODO useful?
+            // rLang = aLanguageTag;
+            return pRet;
+        }
         else
             return nullptr;
     }

Now, I'm not sure if it's the right way.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210420/ffba6aa2/attachment.htm>


More information about the Libreoffice-bugs mailing list