From fb62c2c5252a0b25d22ceccbb07747048923a44a Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Thu, 26 Oct 2017 18:54:25 +0200 Subject: iOS added menu entries Added Copy/Move/Delete since this is the only way to access the local storage. Change-Id: I9b054a4f23d32d5220ae500a37b52cb7e7a8587c --- .../LibreOfficeLight/DocumentController.swift | 33 ++++-- .../LibreOfficeLight/en.lproj/Main.storyboard | 126 +++++++++++++++++---- 2 files changed, 124 insertions(+), 35 deletions(-) diff --git a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift index b28a3620d4c6..1d02c01bb364 100755 --- a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift @@ -35,7 +35,7 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentPickerDelega // Show sidemenu (part of documentcontroller) @IBAction func doMenu(_ sender: UIBarButtonItem) { - if (sender.tag == 10) { + if (sender.tag == 99) { sender.tag = 0; let viewMenuBack : UIView = view.subviews.last! @@ -53,7 +53,7 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentPickerDelega } sender.isEnabled = false - sender.tag = 10 + sender.tag = 99 let sidebar : SidebarController = self.storyboard!.instantiateViewController(withIdentifier: "SidebarController") as! SidebarController view.addSubview(sidebar.view) @@ -129,14 +129,23 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentPickerDelega popover.sourceView = janTest popover.sourceRect = janTest.bounds present(vc, animated: true, completion: nil) - print("menu Save as... to be done") + case 5: // Save as PDF... print("menu Save as PDF... to be done") case 6: // Print... print("menu Print... to be done") + case 7: // Copy... + print("menu Copy... to be done") + + case 8: // Move... + print("menu Move... to be done") + + case 9: // Delete... + print("menu Delete... to be done") + default: // should not happen print("unknown menu" + String(tag)) } @@ -180,21 +189,21 @@ class DocumentActions: UITableViewController var isDocActive : Bool = false // Calling class might enable/disable each button - @IBOutlet weak var buttonNew: UIButton! - @IBOutlet weak var buttonOpen: UIButton! - @IBOutlet weak var buttonSave: UIButton! - @IBOutlet weak var buttonSaveAs: UIButton! - @IBOutlet weak var buttonSaveAsPDF: UIButton! - @IBOutlet weak var buttonPrint: UIButton! - - - @IBAction func actionMenuSelect(_ sender: UIButton) { dismiss(animated: false) delegate?.actionMenuSelected(sender.tag) } + @IBOutlet weak var buttonNew: UIButton! + @IBOutlet weak var buttonOpen: UIButton! + @IBOutlet weak var buttonSave: UIButton! + @IBOutlet weak var buttonSaveAs: UIButton! + @IBOutlet weak var buttonSaveAsPDF: UIButton! + @IBOutlet weak var buttonPrint: UIButton! + @IBOutlet weak var buttonCopy: UIButton! + @IBOutlet weak var buttonMove: UIButton! + @IBOutlet weak var buttonDelete: UIButton! override func viewDidLoad() { diff --git a/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard b/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard index 918081f812fe..299547157e8c 100755 --- a/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard +++ b/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard @@ -354,7 +354,7 @@ - + @@ -370,6 +370,9 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -481,19 +558,22 @@ - + - + - - - - - - + + + + + + + + + -- cgit