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

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 24 13:29:18 UTC 2019


 lingucomponent/source/spellcheck/macosxspell/macspellimp.mm |   14 ++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit dedf339aa14df31c134650660b9aac55bdd8464d
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Apr 24 16:21:23 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Apr 24 16:26:21 2019 +0300

    tdf#124909: Assume the iOS de_DE dictionary works well enough generically
    
    On macOS, the system says it has a generic "de" dictionary. But on
    iOS, it says it is specificaly "de_DE". Assume it is good enough for
    the other German variants, too, for now.
    
    Change-Id: I745cc02c1ffa774dbcbfdc1d775ce358957f04f8

diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
index f97c0945afe9..823687c2cb25 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
@@ -139,6 +139,20 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales()
                     postspdict.push_back( pLangStr );
                 }
             }
+#ifdef IOS
+            // iOS says it has specifically de_DE, but let's assume it is good enough for the other
+            // variants, too, for now.
+            else if ([pLangStr isEqualToString:@"de_DE"])
+            {
+                const std::vector<NSString*> aDE
+                    { @"AT", @"BE", @"CH", @"DE", @"LI", @"LU" };
+                for (auto c: aDE)
+                {
+                    pLangStr = [@"de_" stringByAppendingString: c];
+                    postspdict.push_back( pLangStr );
+                }
+            }
+#endif
             else if ([pLangStr isEqualToString:@"en"])
             {
                 // System has en_AU, en_CA, en_GB, and en_IN. Add the rest.


More information about the Libreoffice-commits mailing list