diff options
author | Tor Lillqvist <tml@collabora.com> | 2019-04-24 16:21:23 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2019-08-12 22:45:47 +0200 |
commit | 9d85335b098dc2988314898cf70f4187d52146fa (patch) | |
tree | b56542b3acd4ed1b21207152a80b17a3ffb1298d /lingucomponent | |
parent | 608ac7055ef6c82aeb5b581fbb6e66add4ff8c3a (diff) |
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
(cherry picked from commit 4f46a493eae1ab9d705451738f79876e869622c9)
Reviewed-on: https://gerrit.libreoffice.org/77358
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/spellcheck/macosxspell/macspellimp.mm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index e317f80142ee..2439fef273f8 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -138,6 +138,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. |