diff options
author | jan Iversen <jani@libreoffice.org> | 2017-10-29 19:43:49 +0100 |
---|---|---|
committer | jan Iversen <jani@libreoffice.org> | 2017-10-29 19:46:30 +0100 |
commit | fb88fbbe2b6bb62c4525659299b05aa0964229c5 (patch) | |
tree | a48850a5520aa6134ec26e18b871fbdb4a104078 /ios | |
parent | 64f9ae5510fa8f17e2ecb93525c413dd25f041b3 (diff) |
iOS, problem with menu control
storyboard and code had diverted.
Change-Id: I39d3db81f2c133a355c961a24cf7ed1409630b83
Diffstat (limited to 'ios')
4 files changed, 13 insertions, 15 deletions
diff --git a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj index ef0f743c8309..c0552f230cea 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj +++ b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj @@ -31,7 +31,6 @@ 39B08BD91E5F0BB600682A59 /* services.rdb in Resources */ = {isa = PBXBuildFile; fileRef = 39B085241E5F0BB400682A59 /* services.rdb */; }; 39B091CD1E5F0BB800682A59 /* udkapi.rdb in Resources */ = {isa = PBXBuildFile; fileRef = 39B08B9B1E5F0BB600682A59 /* udkapi.rdb */; }; 39B091CE1E5F0BB800682A59 /* unorc in Resources */ = {isa = PBXBuildFile; fileRef = 39B08B9C1E5F0BB600682A59 /* unorc */; }; - 39EE81541FA644E800B73AB8 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 39EE81531FA644E800B73AB8 /* Info.plist */; }; 39EF4E2F1FA500C9001914AC /* PropertiesController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39EF4E2E1FA500C9001914AC /* PropertiesController.swift */; }; /* End PBXBuildFile section */ @@ -86,7 +85,6 @@ 3911D89F1E5993600050D6BC /* Support files */ = { isa = PBXGroup; children = ( - 39EE81531FA644E800B73AB8 /* Info.plist */, 39ACF4181F8A317600DA7334 /* loApp.xcconfig */, 39B092501E5F3DEA00682A59 /* LibreOfficeLight-Prefix.pch */, 397275391E77D9F1006ACDCC /* LibreOfficeLight.entitlements */, @@ -129,6 +127,7 @@ 397E08FC1E597BD8001374E0 /* LibreOfficeLight */ = { isa = PBXGroup; children = ( + 39EE81531FA644E800B73AB8 /* Info.plist */, 39503A6F1F94C4AC00F19C78 /* lokit-Bridging-Header.h */, 39284DB01FA5E150006F43E4 /* dummyLOkit.c */, 397E08FD1E597BD8001374E0 /* AppDelegate.swift */, @@ -232,7 +231,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 39EE81541FA644E800B73AB8 /* Info.plist in Resources */, 397E09081E597BD8001374E0 /* Assets.xcassets in Resources */, 39B08BD71E5F0BB600682A59 /* rc in Resources */, 39B08B9E1E5F0BB600682A59 /* offapi.rdb in Resources */, diff --git a/ios/LibreOfficeLight/LibreOfficeLight/DocumentActions.swift b/ios/LibreOfficeLight/LibreOfficeLight/DocumentActions.swift index 96f9d3216633..dddb3b22d3b0 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight/DocumentActions.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/DocumentActions.swift @@ -17,6 +17,8 @@ class DocumentActions: UITableViewController // Pointer to callback class (in reality instance of DocumentController) var delegate : MenuDelegate? + + // set by DocumentController before invoking the menu // the variable is used to control which menu entries are active var isDocActive : Bool = false diff --git a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift index 5034d46533c1..ddfd77d2c301 100755 --- a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift @@ -19,15 +19,11 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC // 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") } @@ -192,12 +188,11 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC // Load document into LibreOfficeKit and present it internal func startOpenDocument() { - //FIXME - - // let openMenu = UIDocumentPickerViewController(documentTypes: ["public.data"], in: .open) let openMenu = UIDocumentBrowserViewController() - //penMenu.allowsDocumentCreation = true - // UIDocumentBrowserViewController.ImportMode = UIDocumentBrowserViewController.ImportMode.none // copy, move + openMenu.allowsDocumentCreation = true + + //FIXME + //UIDocumentBrowserViewController.ImportMode = UIDocumentBrowserViewController.ImportMode.none // copy, move //openMenu.InterfaceStyle = UIDocumentPickerViewController.dark openMenu.delegate = self self.present(openMenu, animated: true, completion: nil) diff --git a/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard b/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard index 936c0620eb13..338597acbbc9 100755 --- a/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard +++ b/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard @@ -357,6 +357,9 @@ <bool key="isElement" value="NO"/> </accessibility> <state key="normal" title="Close"/> + <connections> + <action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="lIq-w7-Yr5"/> + </connections> </button> </subviews> </tableViewCellContentView> @@ -440,11 +443,11 @@ <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <size key="freeformSize" width="134" height="210"/> <connections> - <outlet property="buttonClose" destination="6vH-aM-aYe" id="zNg-Rc-hcL"/> + <outlet property="buttonClose" destination="95N-Hk-rcU" id="hJo-Qc-Wgv"/> <outlet property="buttonOpen" destination="myk-zs-md7" id="xQK-I1-pDl"/> <outlet property="buttonPrint" destination="tvH-WR-c61" id="4YU-p2-Fim"/> <outlet property="buttonProperties" destination="b90-ja-Wm0" id="scY-Fn-fss"/> - <outlet property="buttonSave" destination="b90-ja-Wm0" id="Sdz-lq-s3S"/> + <outlet property="buttonSave" destination="m45-MR-Gca" id="UZw-LX-Bco"/> <outlet property="buttonSaveAs" destination="6vH-aM-aYe" id="4KY-Zi-iH4"/> <outlet property="buttonSaveAsPDF" destination="apE-3B-lUt" id="AZL-ON-v2Y"/> </connections> |