Skip to content

Commit

Permalink
iOS, upgrade and moved LOKit_init.
Browse files Browse the repository at this point in the history
Upgrade to new version of frameworks.

Moved LOKit_init to "didFinishLaunching" to "DidBecomeActive"

Change-Id: I2f805c4a9d21b049362fec1ec5258496b9505260
  • Loading branch information
jan Iversen committed Jun 3, 2017
1 parent 9564d47 commit 73e64e2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
Expand Up @@ -23,9 +23,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
{
// start LibreOfficeKit
BridgeLOkit_Init(Bundle.main.bundlePath)

// Get version info
let appInfo = Bundle.main.infoDictionary! as Dictionary<String,AnyObject>
let applicationVersion = (appInfo["CFBundleShortVersionString"] as! String) + "." +
Expand Down Expand Up @@ -75,8 +72,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate

func applicationDidBecomeActive(_ application: UIApplication)
{
// Restart any tasks that were paused (or not yet started) while the application was inactive.
// If the application was previously in the background, optionally refresh the user interface.
// start LibreOfficeKit
BridgeLOkit_Init(Bundle.main.bundlePath)
}


Expand Down
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="DGj-7d-jfR">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="DGj-7d-jfR">
<device id="ipad9_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Navigation items with more than one left or right bar item" minToolsVersion="7.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand Down Expand Up @@ -741,7 +741,7 @@
<image name="menu" width="22" height="22"/>
</resources>
<inferredMetricsTieBreakers>
<segue reference="0PG-d7-Fy1"/>
<segue reference="etF-bX-EXf"/>
<segue reference="MPj-WI-cxX"/>
<segue reference="nga-Gl-Vki"/>
</inferredMetricsTieBreakers>
</document>
12 changes: 2 additions & 10 deletions ios/experimental/LibreOfficeLight/LibreOfficeLight/lokit.mm
Expand Up @@ -36,16 +36,8 @@
strcpy(bufUserPath + strlen(path), "/user");

// Initialize LibreOfficeKit
kit = lok_init_2(path, bufUserPath);

udata_setCommonData(NULL, NULL);
ucnv_open("iso-8859-3", NULL);

ucnv_getName(NULL,NULL);
ucnv_close(NULL);
osl_setCommandArgs(8, NULL);
kit->pClass->documentLoad(kit, NULL);
document->pClass->initializeForRendering(document, "");
if (!kit)
kit = lok_init_2(path, bufUserPath);
return 0;
}

Expand Down

0 comments on commit 73e64e2

Please sign in to comment.