summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorjan Iversen <jani@libreoffice.org>2017-10-26 18:54:25 +0200
committerjan Iversen <jani@libreoffice.org>2017-10-26 18:56:43 +0200
commitfb62c2c5252a0b25d22ceccbb07747048923a44a (patch)
tree95a51e7a519a0b11123a92678948fcb8d32d6379 /ios
parent79821193345d6d113eea0950f9ef0a335470219b (diff)
iOS added menu entries
Added Copy/Move/Delete since this is the only way to access the local storage. Change-Id: I9b054a4f23d32d5220ae500a37b52cb7e7a8587c
Diffstat (limited to 'ios')
-rwxr-xr-xios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift33
-rwxr-xr-xios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard126
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 @@
<objects>
<tableViewController autoresizesArchivedViewToFullSize="NO" title="Document Actions" automaticallyAdjustsScrollViewInsets="NO" modalTransitionStyle="crossDissolve" modalPresentationStyle="overCurrentContext" clearsSelectionOnViewWillAppear="NO" id="IER-X5-Ax8" customClass="DocumentActions" customModule="LibreOfficeLight" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="30" sectionHeaderHeight="28" sectionFooterHeight="28" id="RqF-IL-YJc">
- <rect key="frame" x="0.0" y="0.0" width="134" height="180"/>
+ <rect key="frame" x="0.0" y="0.0" width="134" height="270"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<sections>
@@ -370,6 +370,9 @@
<button opaque="NO" tag="1" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mCx-kB-iUI">
<rect key="frame" x="8" y="0.0" width="118" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <accessibility key="accessibilityConfiguration">
+ <bool key="isElement" value="NO"/>
+ </accessibility>
<state key="normal" title="New"/>
<connections>
<action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="0gI-or-ji1"/>
@@ -386,9 +389,11 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" tag="2" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="myk-zs-md7">
- <rect key="frame" x="8" y="2" width="118" height="30"/>
+ <rect key="frame" x="8" y="0.0" width="118" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <accessibility key="accessibilityConfiguration" identifier="actionOpen"/>
+ <accessibility key="accessibilityConfiguration">
+ <bool key="isElement" value="NO"/>
+ </accessibility>
<state key="normal" title="Open..."/>
<connections>
<action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="0gI-or-ji2"/>
@@ -405,9 +410,11 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" tag="3" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b90-ja-Wm0">
- <rect key="frame" x="8" y="-2" width="118" height="30"/>
+ <rect key="frame" x="8" y="0.0" width="118" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <accessibility key="accessibilityConfiguration" identifier="actionSave"/>
+ <accessibility key="accessibilityConfiguration" identifier="actionSave">
+ <bool key="isElement" value="NO"/>
+ </accessibility>
<state key="normal" title="Save"/>
<connections>
<action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="0gI-or-ji3"/>
@@ -424,9 +431,11 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" tag="4" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6vH-aM-aYe">
- <rect key="frame" x="8" y="-2" width="118" height="30"/>
+ <rect key="frame" x="8" y="0.0" width="118" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <accessibility key="accessibilityConfiguration" identifier="actionSaveAs"/>
+ <accessibility key="accessibilityConfiguration">
+ <bool key="isElement" value="NO"/>
+ </accessibility>
<state key="normal" title="Save as..."/>
<connections>
<action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="0gI-or-ji4"/>
@@ -442,9 +451,12 @@
<rect key="frame" x="0.0" y="0.0" width="134" height="29.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
- <button opaque="NO" tag="5" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="apE-3B-lUt">
- <rect key="frame" x="8" y="-1" width="118" height="30"/>
+ <button opaque="NO" tag="5" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="apE-3B-lUt" userLabel="Button Save As PDF">
+ <rect key="frame" x="8" y="0.0" width="118" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <accessibility key="accessibilityConfiguration" identifier="actionSaveAsPDF">
+ <bool key="isElement" value="NO"/>
+ </accessibility>
<state key="normal" title="Save as PDF"/>
<connections>
<action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="0gI-or-ji5"/>
@@ -453,20 +465,85 @@
</subviews>
</tableViewCellContentView>
</tableViewCell>
- <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="1ly-sz-g0x">
+ <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="diN-3v-tgm">
<rect key="frame" x="0.0" y="150" width="134" height="30"/>
<autoresizingMask key="autoresizingMask"/>
- <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1ly-sz-g0x" id="wVi-tX-eKD">
+ <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="diN-3v-tgm" id="24s-fs-4cw">
<rect key="frame" x="0.0" y="0.0" width="134" height="29.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
- <button opaque="NO" tag="6" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="516-b0-K4N" userLabel="Button Print">
- <rect key="frame" x="8" y="-1" width="118" height="30"/>
+ <button opaque="NO" tag="6" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tvH-WR-c61" userLabel="Button Print">
+ <rect key="frame" x="8" y="0.0" width="118" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <accessibility key="accessibilityConfiguration" identifier="actionPrint"/>
+ <accessibility key="accessibilityConfiguration">
+ <bool key="isElement" value="NO"/>
+ </accessibility>
<state key="normal" title="Print..."/>
<connections>
- <action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="0gI-or-ji6"/>
+ <action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="saH-6n-BkX"/>
+ </connections>
+ </button>
+ </subviews>
+ </tableViewCellContentView>
+ </tableViewCell>
+ <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="0Cu-Xh-XUR">
+ <rect key="frame" x="0.0" y="180" width="134" height="30"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0Cu-Xh-XUR" id="MHs-m1-fPx">
+ <rect key="frame" x="0.0" y="0.0" width="134" height="29.5"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <button opaque="NO" tag="7" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aLF-gf-Qy7" userLabel="Button Copy">
+ <rect key="frame" x="8" y="0.0" width="118" height="30"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <accessibility key="accessibilityConfiguration" identifier="actionCopy">
+ <bool key="isElement" value="NO"/>
+ </accessibility>
+ <state key="normal" title="Copy..."/>
+ <connections>
+ <action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="ga5-sF-FC6"/>
+ </connections>
+ </button>
+ </subviews>
+ </tableViewCellContentView>
+ </tableViewCell>
+ <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="Tos-KD-TOY">
+ <rect key="frame" x="0.0" y="210" width="134" height="30"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Tos-KD-TOY" id="wXd-3T-jNF">
+ <rect key="frame" x="0.0" y="0.0" width="134" height="29.5"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <button opaque="NO" tag="8" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DaU-7Y-QN0" userLabel="Button Move">
+ <rect key="frame" x="8" y="0.0" width="118" height="30"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <accessibility key="accessibilityConfiguration">
+ <bool key="isElement" value="NO"/>
+ </accessibility>
+ <state key="normal" title="Move..."/>
+ <connections>
+ <action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="fdk-gZ-5BR"/>
+ </connections>
+ </button>
+ </subviews>
+ </tableViewCellContentView>
+ </tableViewCell>
+ <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="1ly-sz-g0x">
+ <rect key="frame" x="0.0" y="240" width="134" height="30"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1ly-sz-g0x" id="wVi-tX-eKD">
+ <rect key="frame" x="0.0" y="0.0" width="134" height="29.5"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <button opaque="NO" tag="9" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="516-b0-K4N" userLabel="Button Delete">
+ <rect key="frame" x="8" y="0.0" width="118" height="30"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <accessibility key="accessibilityConfiguration" identifier="actionDelete">
+ <bool key="isElement" value="NO"/>
+ </accessibility>
+ <state key="normal" title="Delete..."/>
+ <connections>
+ <action selector="actionMenuSelect:" destination="IER-X5-Ax8" eventType="touchUpInside" id="YLz-aP-Poo"/>
</connections>
</button>
</subviews>
@@ -481,19 +558,22 @@
</connections>
</tableView>
<extendedEdge key="edgesForExtendedLayout"/>
- <value key="contentSizeForViewInPopover" type="size" width="134" height="210"/>
+ <value key="contentSizeForViewInPopover" type="size" width="134" height="300"/>
<nil key="simulatedStatusBarMetrics"/>
<nil key="simulatedTopBarMetrics"/>
<nil key="simulatedBottomBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
- <size key="freeformSize" width="134" height="180"/>
+ <size key="freeformSize" width="134" height="270"/>
<connections>
- <outlet property="buttonNew" destination="mCx-kB-iUI" id="Bxx-gc-1KK"/>
- <outlet property="buttonOpen" destination="myk-zs-md7" id="CST-dF-vGl"/>
- <outlet property="buttonPrint" destination="516-b0-K4N" id="kok-Tt-Y8w"/>
- <outlet property="buttonSave" destination="b90-ja-Wm0" id="tlk-Ku-xp6"/>
- <outlet property="buttonSaveAs" destination="6vH-aM-aYe" id="BMc-YI-Ssc"/>
- <outlet property="buttonSaveAsPDF" destination="apE-3B-lUt" id="r3J-xa-Syi"/>
+ <outlet property="buttonCopy" destination="aLF-gf-Qy7" id="czl-bI-0Qu"/>
+ <outlet property="buttonDelete" destination="516-b0-K4N" id="Zvb-8p-qrj"/>
+ <outlet property="buttonMove" destination="DaU-7Y-QN0" id="QRd-c8-teO"/>
+ <outlet property="buttonNew" destination="mCx-kB-iUI" id="E2p-ip-Slc"/>
+ <outlet property="buttonOpen" destination="myk-zs-md7" id="xQK-I1-pDl"/>
+ <outlet property="buttonPrint" destination="tvH-WR-c61" id="4YU-p2-Fim"/>
+ <outlet property="buttonSave" destination="b90-ja-Wm0" id="Sdz-lq-s3S"/>
+ <outlet property="buttonSaveAs" destination="6vH-aM-aYe" id="4KY-Zi-iH4"/>
+ <outlet property="buttonSaveAsPDF" destination="apE-3B-lUt" id="AZL-ON-v2Y"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="D6j-Ov-CSK" userLabel="First Responder" sceneMemberID="firstResponder"/>