summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/source/res/menu/main.xml5
-rw-r--r--android/source/res/values-tr/strings.xml1
-rw-r--r--android/source/res/values/strings.xml1
-rw-r--r--android/source/src/java/org/libreoffice/InvalidationHandler.java5
-rw-r--r--android/source/src/java/org/libreoffice/LOKitTileProvider.java18
-rw-r--r--android/source/src/java/org/libreoffice/ToolbarController.java1
6 files changed, 20 insertions, 11 deletions
diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml
index b442878cbf51..2c97b3201b9e 100644
--- a/android/source/res/menu/main.xml
+++ b/android/source/res/menu/main.xml
@@ -60,6 +60,7 @@
android:title="@string/action_add_worksheet"
android:orderInCategory="100"
android:visible="false" />
+
<item android:id="@+id/action_rename_worksheet"
android:title="@string/action_rename_worksheet"
android:orderInCategory="100"
@@ -79,6 +80,10 @@
android:title="@string/action_add_slide"
android:orderInCategory="100"
android:visible="false" />
+ <item android:id="@+id/action_rename_slide"
+ android:title="@string/action_rename_slide"
+ android:orderInCategory="100"
+ android:visible="false" />
<item android:id="@+id/action_delete_slide"
android:title="@string/action_delete_slide"
diff --git a/android/source/res/values-tr/strings.xml b/android/source/res/values-tr/strings.xml
index bb914081c749..583fa5313e13 100644
--- a/android/source/res/values-tr/strings.xml
+++ b/android/source/res/values-tr/strings.xml
@@ -240,4 +240,5 @@
<string name="part">Bölüm</string>
<string name="highlight_color">Vurgulama Rengi</string>
<string name="font_color">Metin Rengi</string>
+ <string name="action_rename_slide">Slaytı yeniden adlandır</string>
</resources>
diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml
index 123751b8ee3b..3669d0a2ed90 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -240,4 +240,5 @@
<string name="part">Part</string>
<string name="highlight_color">Highlight Color</string>
<string name="font_color">Font Color</string>
+ <string name="action_rename_slide">Rename Slide</string>
</resources>
diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java b/android/source/src/java/org/libreoffice/InvalidationHandler.java
index 436b5c513c3b..473d8bcb3625 100644
--- a/android/source/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java
@@ -132,7 +132,8 @@ public class InvalidationHandler implements Document.MessageCallback, Office.Mes
if (payloadObject.getString("success").equals("true")) {
mContext.saveFilesToCloud();
}
- }else if(payloadObject.getString("commandName").equals(".uno:Name")){
+ }else if(payloadObject.getString("commandName").equals(".uno:Name") ||
+ payloadObject.getString("commandName").equals(".uno:RenamePage")){
//success returns false even though its true for some reason,
LOKitShell.getMainHandler().post(new Runnable() {
@Override
@@ -144,7 +145,7 @@ public class InvalidationHandler implements Document.MessageCallback, Office.Mes
}
});
} else if(payloadObject.getString("commandName").equals(".uno:Remove") ||
- payloadObject.getString("commandName").equals(".uno:DeletePage") ) {
+ payloadObject.getString("commandName").equals(".uno:DeletePage") ) {
LOKitShell.getMainHandler().post(new Runnable() {
@Override
public void run() {
diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index c38b5c1607ab..65de28fe884e 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -249,20 +249,20 @@ class LOKitTileProvider implements TileProvider {
return;
}
}
- if(isSpreadsheet() == false) {
- //document must be spreadsheet
- return;
- }
JSONObject parameter = new JSONObject();
JSONObject name = new JSONObject();
- JSONObject index = new JSONObject();
name.put("type", "string");
name.put("value", partName);
- index.put("type","long");
- index.put("value", getCurrentPartNumber()+1);
parameter.put("Name", name);
- parameter.put("Index", index);
- LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND_NOTIFY, ".uno:Name", parameter.toString(),true));
+ if(isPresentation()){
+ LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND_NOTIFY, ".uno:RenamePage", parameter.toString(),true));
+ }else {
+ JSONObject index = new JSONObject();
+ index.put("type","long");
+ index.put("value", getCurrentPartNumber()+1);
+ parameter.put("Index", index);
+ LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND_NOTIFY, ".uno:Name", parameter.toString(),true));
+ }
}catch (JSONException e){
e.printStackTrace();
}
diff --git a/android/source/src/java/org/libreoffice/ToolbarController.java b/android/source/src/java/org/libreoffice/ToolbarController.java
index 9c7566e10f2d..d21396cf4615 100644
--- a/android/source/src/java/org/libreoffice/ToolbarController.java
+++ b/android/source/src/java/org/libreoffice/ToolbarController.java
@@ -209,6 +209,7 @@ public class ToolbarController implements Toolbar.OnMenuItemClickListener {
mContext.addPart();
return true;
case R.id.action_rename_worksheet:
+ case R.id.action_rename_slide:
mContext.renamePart();
return true;
case R.id.action_delete_worksheet: