diff options
author | jan Iversen <jani@libreoffice.org> | 2017-10-26 14:05:03 +0200 |
---|---|---|
committer | jan Iversen <jani@libreoffice.org> | 2017-10-26 18:56:42 +0200 |
commit | 79821193345d6d113eea0950f9ef0a335470219b (patch) | |
tree | 81cdaa8735b0264486cca9e737eda9804b617a09 /ios | |
parent | 25313923b08018bd837cfe3fc99a5e141602cafc (diff) |
iOS added select local/iCloud storage
Added button in Document window, to signal if working local or in iCloud
Change-Id: Ib33b67c95dfad466664e2289390ea577ba5e3391
Diffstat (limited to 'ios')
12 files changed, 85 insertions, 39 deletions
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 = "<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>"; }; - 3913F8FE1F9E36A600F7E0C8 /* xmlreader.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xmlreader.cxx; path = ../../../xmlreader/source/xmlreader.cxx; 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; }; 39503A6F1F94C4AC00F19C78 /* lokit-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "lokit-Bridging-Header.h"; sourceTree = "<group>"; }; 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 = "<group>"; }; - 3950BAE51F9D0C32001A4E96 /* init.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = init.cxx; path = ../../../desktop/source/lib/init.cxx; sourceTree = "<group>"; }; 396F92F61E7AE62400A28C82 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; }; 397275391E77D9F1006ACDCC /* LibreOfficeLight.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LibreOfficeLight.entitlements; sourceTree = "<group>"; }; 397868D71E59A3EA007F9248 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/LaunchScreen.xib; sourceTree = "<group>"; }; @@ -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 = "<group>"; - }; 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 Binary files differnew file mode 100644 index 000000000000..d213949b467f --- /dev/null +++ b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive.png diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png Binary files differnew file mode 100644 index 000000000000..ba486fbbe6ae --- /dev/null +++ b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png Binary files differnew file mode 100644 index 000000000000..28c41597cf0f --- /dev/null +++ b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png 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 Binary files differnew file mode 100644 index 000000000000..defe533b489a --- /dev/null +++ b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone.png diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png Binary files differnew file mode 100644 index 000000000000..da7dcbff0dc4 --- /dev/null +++ b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png Binary files differnew file mode 100644 index 000000000000..1c827c89af6f --- /dev/null +++ b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png 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 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="DGj-7d-jfR"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="DGj-7d-jfR"> <device id="ipad9_7" orientation="portrait"> <adaptation id="fullscreen"/> </device> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13174"/> <capability name="Constraints to layout margins" minToolsVersion="6.0"/> + <capability name="Navigation items with more than one left or right bar item" minToolsVersion="7.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> @@ -34,11 +35,18 @@ </view> <toolbarItems/> <navigationItem key="navigationItem" title="Document" id="5c6-32-T4J"> - <barButtonItem key="leftBarButtonItem" image="menu" id="fdq-Uw-536"> - <connections> - <action selector="doMenu:" destination="vXZ-lx-hvc" id="mHw-Uf-vh2"/> - </connections> - </barButtonItem> + <leftBarButtonItems> + <barButtonItem image="menu" id="fdq-Uw-536" userLabel="Button Side Menu"> + <connections> + <action selector="doMenu:" destination="vXZ-lx-hvc" id="mHw-Uf-vh2"/> + </connections> + </barButtonItem> + <barButtonItem image="iCloudDrive" id="BNN-MQ-25d" userLabel="Button Select Storage"> + <connections> + <action selector="doSelectStorage:" destination="vXZ-lx-hvc" id="77L-yW-vcR"/> + </connections> + </barButtonItem> + </leftBarButtonItems> <barButtonItem key="rightBarButtonItem" systemItem="action" id="BNq-ol-ZVK"> <connections> <segue destination="IER-X5-Ax8" kind="popoverPresentation" identifier="showActions" popoverAnchorBarButtonItem="BNq-ol-ZVK" id="xmZ-1A-ZrW"> @@ -49,6 +57,7 @@ </navigationItem> <simulatedToolbarMetrics key="simulatedBottomBarMetrics"/> <connections> + <outlet property="buttonSelectStorage" destination="BNN-MQ-25d" id="c5F-NA-mbv"/> <outlet property="janTest" destination="D1P-q2-3PT" id="ERV-pa-Fs9"/> </connections> </viewController> @@ -154,7 +163,7 @@ <navigationController automaticallyAdjustsScrollViewInsets="NO" id="DGj-7d-jfR" sceneMemberID="viewController"> <toolbarItems/> <navigationBar key="navigationBar" contentMode="scaleToFill" barStyle="black" id="mjw-Ry-qIh"> - <rect key="frame" x="0.0" y="0.0" width="320" height="44"/> + <rect key="frame" x="0.0" y="20" width="768" height="44"/> <autoresizingMask key="autoresizingMask"/> <color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="barTintColor" red="0.0" green="0.58367598684210531" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> @@ -187,10 +196,9 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="K3a-CQ-sBC"> - <rect key="frame" x="20" y="359" width="150" height="45"/> + <rect key="frame" x="20" y="359" width="72" height="45"/> <constraints> <constraint firstAttribute="height" constant="45" id="Rg4-bW-MQk"/> - <constraint firstAttribute="width" constant="150" id="y0o-Nq-4z4"/> </constraints> <inset key="titleEdgeInsets" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/> <state key="normal" title="Style6" image="document"> @@ -201,9 +209,8 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hk4-yl-lM9"> - <rect key="frame" x="20" y="304" width="150" height="45"/> + <rect key="frame" x="20" y="304" width="72" height="45"/> <constraints> - <constraint firstAttribute="width" constant="150" id="UL6-xy-1qB"/> <constraint firstAttribute="height" constant="45" id="hty-y5-gVo"/> </constraints> <inset key="titleEdgeInsets" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/> @@ -215,9 +222,8 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CBj-V3-BKJ"> - <rect key="frame" x="20" y="249" width="150" height="45"/> + <rect key="frame" x="20" y="249" width="72" height="45"/> <constraints> - <constraint firstAttribute="width" constant="150" id="U6W-G1-H2J"/> <constraint firstAttribute="height" constant="45" id="wOH-9b-B8P"/> </constraints> <inset key="titleEdgeInsets" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/> @@ -229,10 +235,9 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eZV-Rh-hCf"> - <rect key="frame" x="20" y="194" width="150" height="45"/> + <rect key="frame" x="20" y="194" width="72" height="45"/> <constraints> <constraint firstAttribute="height" constant="45" id="N7I-YK-5uo"/> - <constraint firstAttribute="width" constant="150" id="eLW-p8-QBZ"/> </constraints> <inset key="titleEdgeInsets" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/> <state key="normal" title="Style3" image="document"> @@ -243,10 +248,9 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YTV-Y5-L8R"> - <rect key="frame" x="20" y="139" width="150" height="45"/> + <rect key="frame" x="20" y="139" width="71" height="45"/> <constraints> <constraint firstAttribute="height" constant="45" id="4H0-0k-rm5"/> - <constraint firstAttribute="width" constant="150" id="Q1z-1N-WMF"/> </constraints> <inset key="titleEdgeInsets" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/> <state key="normal" title="Style2" image="document"> @@ -257,10 +261,9 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Mv-7b-xjF"> - <rect key="frame" x="20" y="414" width="150" height="45"/> + <rect key="frame" x="20" y="414" width="70" height="45"/> <constraints> <constraint firstAttribute="height" constant="45" id="Fyt-Iq-YWv"/> - <constraint firstAttribute="width" constant="150" id="eFy-qB-RER"/> </constraints> <inset key="titleEdgeInsets" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/> <state key="normal" title="Style7" image="document"> @@ -271,9 +274,8 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="g5y-SJ-jU1"> - <rect key="frame" x="20" y="84" width="150" height="45"/> + <rect key="frame" x="20" y="84" width="69" height="45"/> <constraints> - <constraint firstAttribute="width" constant="150" id="Uuo-01-tfU"/> <constraint firstAttribute="height" constant="45" id="v75-o1-ii6"/> </constraints> <inset key="titleEdgeInsets" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/> @@ -501,6 +503,7 @@ </scenes> <resources> <image name="document" width="20" height="20"/> + <image name="iCloudDrive" width="22" height="22"/> <image name="menu" width="22" height="22"/> </resources> </document> |