From 79821193345d6d113eea0950f9ef0a335470219b Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Thu, 26 Oct 2017 14:05:03 +0200 Subject: iOS added select local/iCloud storage Added button in Document window, to signal if working local or in iCloud Change-Id: Ib33b67c95dfad466664e2289390ea577ba5e3391 --- .../LibreOfficeLight.xcodeproj/project.pbxproj | 14 ------ .../LibreOfficeLight/AppDelegate.swift | 6 +-- .../iCloudDrive.imageset/Contents.json | 23 ++++++++++ .../iCloudDrive.imageset/iCloudDrive.png | Bin 0 -> 1166 bytes .../iCloudDrive.imageset/iCloudDrive@2x.png | Bin 0 -> 2090 bytes .../iCloudDrive.imageset/iCloudDrive@3x.png | Bin 0 -> 2991 bytes .../Assets.xcassets/iPhone.imageset/Contents.json | 23 ++++++++++ .../Assets.xcassets/iPhone.imageset/iPhone.png | Bin 0 -> 1305 bytes .../Assets.xcassets/iPhone.imageset/iPhone@2x.png | Bin 0 -> 1799 bytes .../Assets.xcassets/iPhone.imageset/iPhone@3x.png | Bin 0 -> 2291 bytes .../LibreOfficeLight/DocumentController.swift | 11 +++++ .../LibreOfficeLight/en.lproj/Main.storyboard | 47 +++++++++++---------- 12 files changed, 85 insertions(+), 39 deletions(-) create mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/Contents.json create mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive.png create mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png create mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png create mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/Contents.json create mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone.png create mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png create mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png (limited to 'ios') diff --git a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj index 527961f92bee..d1541cc35d0d 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj +++ b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj @@ -39,14 +39,11 @@ 39022C1E1EDC2AB000100066 /* share */ = {isa = PBXFileReference; lastKnownFileType = folder; name = share; path = ../generated/resources/share; sourceTree = ""; }; 39022C201EDC2D0800100066 /* icudt59l.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = icudt59l.dat; path = ../generated/resources/icudt59l.dat; sourceTree = ""; }; 39022C231EDC303200100066 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 3913F8FE1F9E36A600F7E0C8 /* xmlreader.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xmlreader.cxx; path = ../../../xmlreader/source/xmlreader.cxx; sourceTree = ""; }; 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; }; 39503A6F1F94C4AC00F19C78 /* lokit-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "lokit-Bridging-Header.h"; sourceTree = ""; }; 39503A741F94D44900F19C78 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; - 3950BAE31F9CB680001A4E96 /* syslocaleoptions.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = syslocaleoptions.cxx; path = ../../../unotools/source/config/syslocaleoptions.cxx; sourceTree = ""; }; - 3950BAE51F9D0C32001A4E96 /* init.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = init.cxx; path = ../../../desktop/source/lib/init.cxx; sourceTree = ""; }; 396F92F61E7AE62400A28C82 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; 397275391E77D9F1006ACDCC /* LibreOfficeLight.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LibreOfficeLight.entitlements; sourceTree = ""; }; 397868D71E59A3EA007F9248 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/LaunchScreen.xib; sourceTree = ""; }; @@ -96,16 +93,6 @@ path = LibreOfficeLight; sourceTree = SOURCE_ROOT; }; - 3950BAE21F9CB63F001A4E96 /* extra */ = { - isa = PBXGroup; - children = ( - 3913F8FE1F9E36A600F7E0C8 /* xmlreader.cxx */, - 3950BAE51F9D0C32001A4E96 /* init.cxx */, - 3950BAE31F9CB680001A4E96 /* syslocaleoptions.cxx */, - ); - path = extra; - sourceTree = ""; - }; 3972753A1E77D9F7006ACDCC /* Frameworks */ = { isa = PBXGroup; children = ( @@ -119,7 +106,6 @@ 397E08F11E597BD8001374E0 = { isa = PBXGroup; children = ( - 3950BAE21F9CB63F001A4E96 /* extra */, 39B084E41E5F0B5200682A59 /* Resources */, 3911D89F1E5993600050D6BC /* Support files */, 397E08FC1E597BD8001374E0 /* LibreOfficeLight */, diff --git a/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift b/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift index 466881aded13..b77f53ece586 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift @@ -37,9 +37,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate defaults.synchronize() // start LibreOfficeKit - BridgeLOkit_Init(Bundle.main.bundlePath) - BridgeLOkit_open("jan"); - BridgeLOkit_ClientCommand("jan"); + //FIX BridgeLOkit_Init(Bundle.main.bundlePath) + //FIX BridgeLOkit_open("jan"); + //FIX BridgeLOkit_ClientCommand("jan"); // Override point for customization after application launch. return true diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/Contents.json b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/Contents.json new file mode 100644 index 000000000000..cd69f7f90c00 --- /dev/null +++ b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "iCloudDrive.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "iCloudDrive@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "iCloudDrive@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive.png new file mode 100644 index 000000000000..d213949b467f Binary files /dev/null and b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive.png differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png new file mode 100644 index 000000000000..ba486fbbe6ae Binary files /dev/null and b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png new file mode 100644 index 000000000000..28c41597cf0f Binary files /dev/null and b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/Contents.json b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/Contents.json new file mode 100644 index 000000000000..2d0a29db946a --- /dev/null +++ b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "iPhone.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "iPhone@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "iPhone@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone.png new file mode 100644 index 000000000000..defe533b489a Binary files /dev/null and b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone.png differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png new file mode 100644 index 000000000000..da7dcbff0dc4 Binary files /dev/null and b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png new file mode 100644 index 000000000000..1c827c89af6f Binary files /dev/null and b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift index b9cdc1e12e55..b28a3620d4c6 100755 --- a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift @@ -13,6 +13,7 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentPickerDelega { var currentDocumentName : String? var currentCloudUrl : URL? + var currentStorageLocal : Bool = false public func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentAt url: URL) @@ -69,6 +70,16 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentPickerDelega } + @IBOutlet weak var buttonSelectStorage: UIBarButtonItem! + + + @IBAction func doSelectStorage(_ sender: UIBarButtonItem) + { + currentStorageLocal = !currentStorageLocal + sender.image = currentStorageLocal ? #imageLiteral(resourceName: "iCloudDrive") : #imageLiteral(resourceName: "iPhone") + self.presentedViewController?.dismiss(animated: true, completion: nil) + } + // Last stop before displaying popover override func prepare(for segue: UIStoryboardSegue, sender: Any?) diff --git a/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard b/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard index bbf37da7894d..918081f812fe 100755 --- a/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard +++ b/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard @@ -1,12 +1,13 @@ - + - + + @@ -34,11 +35,18 @@ - - - - - + + + + + + + + + + + + @@ -49,6 +57,7 @@ + @@ -154,7 +163,7 @@ - + @@ -187,10 +196,9 @@