[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - ios/Mobile

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 10 16:18:30 UTC 2019


 ios/Mobile/TemplateCollectionViewController.mm |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 251d168dc6cbf6fb4eb26c945fb594e11312a2af
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Oct 10 19:03:50 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Oct 10 19:17:51 2019 +0300

    tdf#123741: Call LibreOfficeKit::setLanguageTag() also when loading a template
    
    Sadly I have no understanding why not doing that caused such a
    mysterious end result. But I am glad I thought of trying this simple
    thing before spending any more time trying to understand what is going
    on.
    
    Change-Id: I129f8fffa32fa087e21c444f9657394de0e255a1

diff --git a/ios/Mobile/TemplateCollectionViewController.mm b/ios/Mobile/TemplateCollectionViewController.mm
index a31f3a655..ae8187f42 100644
--- a/ios/Mobile/TemplateCollectionViewController.mm
+++ b/ios/Mobile/TemplateCollectionViewController.mm
@@ -6,6 +6,9 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#define LIBO_INTERNAL_ONLY
+#include <comphelper/lok.hxx>
+
 #import "svtools/strings.hrc"
 
 #import <LibreOfficeKit/LibreOfficeKitInit.h>
@@ -137,9 +140,10 @@ static NSString *mapTemplateExtensionToActual(NSString *templateName) {
     NSURL *cacheDirectory = [NSFileManager.defaultManager URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask][0];
     NSURL *newURL = [cacheDirectory URLByAppendingPathComponent:mapTemplateExtensionToActual(selectedTemplate.lastPathComponent)
                                                     isDirectory:NO];
-
     LibreOfficeKit *lo_kit = lok_init_2(nullptr, nullptr);
 
+    comphelper::LibreOfficeKit::setLanguageTag(LanguageTag(OUString::fromUtf8(OString([app_locale UTF8String])), true));
+
     // Load the template into LibreOffice core, save as the corresponding document type (with the
     // same basename), and then proceed to edit that.
 


More information about the Libreoffice-commits mailing list