summaryrefslogtreecommitdiff
path: root/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
diff options
context:
space:
mode:
authorjan Iversen <jani@libreoffice.org>2017-10-29 10:15:44 +0100
committerjan Iversen <jani@libreoffice.org>2017-10-29 10:46:57 +0100
commit351d83c357093ac0ec6d3768355df9ee1b224d02 (patch)
tree8ca27e58f816e06b2bbd1b9d3113c2117fae3d25 /ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
parent3d872ecc51e47e02e70732c848964274b2aad29e (diff)
iOS background handling
When the app moves to background (hipernate) LOkit needs to be stopped, and when it reenters foreground started again. In order to keep AppDelegate slim as recommended, calls to DocumentController are added. Change-Id: I7e4c8c5ae7fe29235381e3e7217abfd1911e39ad
Diffstat (limited to 'ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift')
-rwxr-xr-xios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift25
1 files changed, 21 insertions, 4 deletions
diff --git a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
index 1ef7d80c792f..0190ad946666 100755
--- a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
+++ b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift
@@ -53,6 +53,14 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC
+ public func Hipernate() -> Void
+ {
+ }
+
+ public func LeaveHipernate() -> Void
+ {
+ }
+
// var currentDocumentName : String?
@@ -67,6 +75,9 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC
toDestinationURL destinationURL: URL)
{
// Tells the delegate that a document has been successfully imported.
+ //FIX BridgeLOkit_open("jan");
+ //FIX BridgeLOkit_ClientCommand("jan");
+
}
internal func documentBrowser(_ controller: UIDocumentBrowserViewController,
@@ -80,6 +91,8 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC
didPickDocumentURLs documentURLs: [URL])
{
// Tells the delegate that the user has selected one or more documents.
+ //FIX BridgeLOkit_open("jan");
+ //FIX BridgeLOkit_ClientCommand("jan");
}
@IBOutlet weak var janTest: UILabel!
@@ -112,16 +125,19 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC
self.present(openMenu, animated: true, completion: nil)
print("menu Open... to be done")
- case 2: // Save
+ case 2: // Properties
+ print("menu Properties to be done")
+
+ case 3: // Save
print("menu Save to be done")
- case 3: // Save as...
+ case 4: // Save as...
print("menu Save as... to be done")
- case 4: // Save as PDF...
+ case 5: // Save as PDF...
print("menu Save as PDF... to be done")
- case 5: // Print...
+ case 6: // Print...
print("menu Print... to be done")
default: // should not happen
@@ -172,6 +188,7 @@ class DocumentActions: UITableViewController
delegate?.actionMenuSelected(sender.tag)
}
+ @IBOutlet weak var buttonProperties: UIButton!
@IBOutlet weak var buttonNew: UIButton!
@IBOutlet weak var buttonOpen: UIButton!
@IBOutlet weak var buttonSave: UIButton!