[Libreoffice-commits] core.git: android/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Nov 4 22:51:41 UTC 2018
android/source/res/menu/main.xml | 5 ++
android/source/res/values-tr/strings.xml | 1
android/source/res/values/strings.xml | 1
android/source/src/java/org/libreoffice/InvalidationHandler.java | 5 +-
android/source/src/java/org/libreoffice/LOKitTileProvider.java | 18 +++++-----
android/source/src/java/org/libreoffice/ToolbarController.java | 1
6 files changed, 20 insertions(+), 11 deletions(-)
New commits:
commit f825e6d4082c0d0beb1c95b881f6a2ee9bfc9161
Author: Mert Tumer <merttumer at outlook.com>
AuthorDate: Sun Nov 4 22:26:24 2018 +0300
Commit: Gülşah Köse <gulsah.1004 at gmail.com>
CommitDate: Sun Nov 4 23:50:52 2018 +0100
[Pardus] ability to change slide name
This patch is sponsored by ULAKBIM/Pardus project.
Signed-off-by: Mert Tumer <merttumer at outlook.com>
Change-Id: I6361e3d23b03e5463d165f7f02dacad8be9206da
Reviewed-on: https://gerrit.libreoffice.org/62861
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.1004 at gmail.com>
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:
More information about the Libreoffice-commits
mailing list