From 2802d6f1e7e5cf7dbf47c3d05e6c4dbb0c0e827b Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 18 Mar 2021 13:45:18 +0200 Subject: Use the iOS French and Italian dictionaries for other relevant countries, too Fixes https://github.com/CollaboraOnline/online/issues/1463 Change-Id: I9fffd4bc9499aee2098258f5c3a9181330b339a1 Signed-off-by: Tor Lillqvist --- .../source/spellcheck/macosxspell/macspellimp.mm | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index ab463e7d43aa..822e7481daac 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -195,11 +195,36 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales() postspdict.push_back( pLangStr ); } } +#ifdef IOS + else if ([pLangStr isEqualToString:@"fr_FR"]) + { + const std::vector aFR + { @"BE", @"BF", @"BJ", @"CA", @"CH", @"CI", @"FR", @"LU", @"MC", @"ML", + @"MU", @"NE", @"SN", @"TG" }; + for (auto c: aFR) + { + pLangStr = [@"fr_" stringByAppendingString: c]; + postspdict.push_back( pLangStr ); + } + } +#endif else if ([pLangStr isEqualToString:@"it"]) { postspdict.push_back( @"it_CH" ); postspdict.push_back( @"it_IT" ); } +#ifdef IOS + else if ([pLangStr isEqualToString:@"it_IT"]) + { + const std::vector aIT + { @"CH", @"IT" }; + for (auto c: aIT) + { + pLangStr = [@"it_" stringByAppendingString: c]; + postspdict.push_back( pLangStr ); + } + } +#endif else if ([pLangStr isEqualToString:@"ko"]) { postspdict.push_back( @"ko_KR" ); -- cgit