summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorjan Iversen <jani@libreoffice.org>2017-10-29 11:19:42 +0100
committerjan Iversen <jani@libreoffice.org>2017-10-29 11:21:11 +0100
commitadff3863890af26c9c3fb4fb5611c333c746fe61 (patch)
treec77e2df8826b2840bfee8b54e8dd0912fbf3cadb /ios
parentcbe828b7f759969c0d70eb818fca62d67379e648 (diff)
iOS, added dummy calls for LO
In order to speed up UI work, a dummy source is added. Change-Id: Ic226b1365681ac65036729a672c97aa5579ed118
Diffstat (limited to 'ios')
-rw-r--r--ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj4
-rw-r--r--ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift4
-rwxr-xr-xios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift49
-rw-r--r--ios/LibreOfficeLight/LibreOfficeLight/dummyLOkit.c48
4 files changed, 84 insertions, 21 deletions
diff --git a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
index 986ce57cc1b2..fd71169bfa57 100644
--- a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
+++ b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
@@ -12,6 +12,7 @@
39022C1F1EDC2AB000100066 /* share in Resources */ = {isa = PBXBuildFile; fileRef = 39022C1E1EDC2AB000100066 /* share */; };
39022C211EDC2D0800100066 /* icudt59l.dat in Resources */ = {isa = PBXBuildFile; fileRef = 39022C201EDC2D0800100066 /* icudt59l.dat */; };
39022C241EDC303200100066 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 39022C221EDC303200100066 /* InfoPlist.strings */; };
+ 39284DB11FA5E150006F43E4 /* dummyLOkit.c in Sources */ = {isa = PBXBuildFile; fileRef = 39284DB01FA5E150006F43E4 /* dummyLOkit.c */; };
392ED9B31E5E4B03005C8435 /* ViewPrintManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 392ED9B21E5E4B03005C8435 /* ViewPrintManager.swift */; };
393975781F8BECB0002DC80B /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 393975771F8BECB0002DC80B /* libiconv.tbd */; };
3939757A1F8BECC1002DC80B /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 393975791F8BECC1002DC80B /* libz.tbd */; };
@@ -39,6 +40,7 @@
39022C1E1EDC2AB000100066 /* share */ = {isa = PBXFileReference; lastKnownFileType = folder; name = share; path = ../generated/resources/share; sourceTree = "<group>"; };
39022C201EDC2D0800100066 /* icudt59l.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = icudt59l.dat; path = ../generated/resources/icudt59l.dat; sourceTree = "<group>"; };
39022C231EDC303200100066 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 39284DB01FA5E150006F43E4 /* dummyLOkit.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = dummyLOkit.c; sourceTree = "<group>"; };
392ED9B21E5E4B03005C8435 /* ViewPrintManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewPrintManager.swift; path = LibreOfficeLight/ViewPrintManager.swift; sourceTree = SOURCE_ROOT; };
393975771F8BECB0002DC80B /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
393975791F8BECC1002DC80B /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
@@ -126,6 +128,7 @@
isa = PBXGroup;
children = (
39503A6F1F94C4AC00F19C78 /* lokit-Bridging-Header.h */,
+ 39284DB01FA5E150006F43E4 /* dummyLOkit.c */,
397E08FD1E597BD8001374E0 /* AppDelegate.swift */,
3992D8591E5B762A00BEA987 /* DocumentController.swift */,
39EF4E2E1FA500C9001914AC /* PropertiesController.swift */,
@@ -254,6 +257,7 @@
files = (
392ED9B31E5E4B03005C8435 /* ViewPrintManager.swift in Sources */,
399648471E5B87DC00E73E83 /* ViewProperties.swift in Sources */,
+ 39284DB11FA5E150006F43E4 /* dummyLOkit.c in Sources */,
3992D85A1E5B762A00BEA987 /* DocumentController.swift in Sources */,
397E08FE1E597BD8001374E0 /* AppDelegate.swift in Sources */,
39EF4E2F1FA500C9001914AC /* PropertiesController.swift in Sources */,
diff --git a/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift b/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift
index 9bdc1fefa48e..31da9986b9f3 100644
--- a/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift
+++ b/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift
@@ -25,7 +25,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool
{
// called when started from another Application.
- // Jan to be done
+ //FIXME
return true
}
@@ -46,7 +46,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate
defaults.synchronize()
// start LibreOfficeKit
- //FIX BridgeLOkit_Init(Bundle.main.bundlePath)
+ BridgeLOkit_Init(Bundle.main.bundlePath)
return true
}
diff --git a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
index c05da106344a..28f18b5afd66 100755
--- a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
+++ b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
@@ -15,6 +15,32 @@ import UIKit
// It is a delegate class to recieve Menu events as well as file handling events
class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewControllerDelegate
{
+ // Handling of DocumentController
+ // this is normal functions every controller must implement
+
+
+ // called once controller is loaded
+ override func viewDidLoad()
+ {
+ super.viewDidLoad()
+ //FIXME
+ // we should load the document types, so we can use them for the open call
+ // let path = Bundle.main.path(forResource: "Info", ofType: "plist")
+ // let dict = NSDictionary(contentsOfFile: path!)
+ // let tableData = dict!.object(forKey: "CFBundleDocumentTypes")
+ }
+
+
+
+ // called when there is a memory constraint
+ override func didReceiveMemoryWarning()
+ {
+ super.didReceiveMemoryWarning()
+ // not used in this App
+ }
+
+
+
// Handling of Background (hipernate)
// iOS is not true multitasking, only 1 app can be active (foreground) at any time,
// therefore apps frequently are moved to the background.
@@ -94,6 +120,10 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC
}
}
+
+
+
+
// var currentDocumentName : String?
@@ -177,25 +207,6 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC
print("unknown menu" + String(tag))
}
}
-
-
- override func viewDidLoad()
- {
- super.viewDidLoad()
- // Do any additional setup after loading the view.
-
- // let path = Bundle.main.path(forResource: "Info", ofType: "plist")
- // let dict = NSDictionary(contentsOfFile: path!)
- // let tableData = dict!.object(forKey: "CFBundleDocumentTypes")
- }
-
-
-
- override func didReceiveMemoryWarning()
- {
- super.didReceiveMemoryWarning()
- // Dispose of any resources that can be recreated.
- }
}
diff --git a/ios/LibreOfficeLight/LibreOfficeLight/dummyLOkit.c b/ios/LibreOfficeLight/LibreOfficeLight/dummyLOkit.c
new file mode 100644
index 000000000000..5063f0f1317e
--- /dev/null
+++ b/ios/LibreOfficeLight/LibreOfficeLight/dummyLOkit.c
@@ -0,0 +1,48 @@
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// 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/.
+//
+
+
+// replaces LibreOfficeKit and thereby reducing turn around time, which is
+// favorized while working on pure UI issues
+// It can be turned on/off by adding/removing it from settings/build phases/compile sources
+
+int BridgeLOkit_Init(const char *path)
+{
+ (void)path;
+ return 0;
+}
+
+
+
+int BridgeLOkit_open(const char *path)
+{
+ (void)path;
+ return 0;
+}
+
+
+
+int BridgeLOkit_ClientCommand(const char *input)
+{
+ (void)input;
+ return 0;
+}
+
+
+
+int BridgeLOkit_Hipernate()
+{
+ return 0;
+}
+
+
+
+int BridgeLOkit_LeaveHipernate()
+{
+ return 0;
+}