summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMert Tumer <merttumer@outlook.com>2018-11-01 19:49:35 +0300
committerGülşah Köse <gulsah.1004@gmail.com>2018-11-02 07:03:27 +0100
commit2f88877af05e1a277f68b07faabba0ccc3d86b3b (patch)
tree9f8a6082e58e4a6074092aceafbfb9e37a9eb6b5 /android
parent8467d764187691f53e66d3568270197b162332d8 (diff)
[Pardus] fix highlight color in Presentation On Android
This patch is sponsored by ULAKBIM/Pardus project. Signed-off-by: Mert Tumer <merttumer@outlook.com> Change-Id: Ic56991b2957be91822d040d776a3dfcef2d5b451 Reviewed-on: https://gerrit.libreoffice.org/62753 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.1004@gmail.com>
Diffstat (limited to 'android')
-rw-r--r--android/source/src/java/org/libreoffice/FontController.java5
-rw-r--r--android/source/src/java/org/libreoffice/InvalidationHandler.java6
2 files changed, 9 insertions, 2 deletions
diff --git a/android/source/src/java/org/libreoffice/FontController.java b/android/source/src/java/org/libreoffice/FontController.java
index 250a67bbd8c9..1ac8fd6cf90f 100644
--- a/android/source/src/java/org/libreoffice/FontController.java
+++ b/android/source/src/java/org/libreoffice/FontController.java
@@ -160,7 +160,10 @@ public class FontController implements AdapterView.OnItemSelectedListener {
if(mActivity.isSpreadsheet()){
json.put("BackgroundColor", valueJson);
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:BackgroundColor", json.toString()));
- } else {
+ }else if(mActivity.getTileProvider().isPresentation()){
+ json.put("CharBackColor", valueJson);
+ LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:CharBackColor", json.toString()));
+ }else {
json.put("BackColor", valueJson);
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:BackColor", json.toString()));
}
diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java b/android/source/src/java/org/libreoffice/InvalidationHandler.java
index 0f72e7272004..436b5c513c3b 100644
--- a/android/source/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java
@@ -320,7 +320,11 @@ public class InvalidationHandler implements Document.MessageCallback, Office.Mes
mContext.getFormattingController().onToggleStateChanged(Document.NUMBERED_LIST, pressed);
} else if (parts[0].equals(".uno:Color")) {
mContext.getFontController().colorPaletteListener.updateColorPickerPosition(Integer.parseInt(value));
- } else if (parts[0].equals(".uno:BackColor")) {
+ } else if (mContext.getTileProvider().isTextDocument() && parts[0].equals(".uno:BackColor")) {
+ mContext.getFontController().backColorPaletteListener.updateColorPickerPosition(Integer.parseInt(value));
+ } else if (mContext.getTileProvider().isPresentation() && parts[0].equals(".uno:CharBackColor")) {
+ mContext.getFontController().backColorPaletteListener.updateColorPickerPosition(Integer.parseInt(value));
+ } else if (mContext.getTileProvider().isSpreadsheet() && parts[0].equals(".uno:BackgroundColor")) {
mContext.getFontController().backColorPaletteListener.updateColorPickerPosition(Integer.parseInt(value));
} else if (parts[0].equals(".uno:StatePageNumber")) {
// get the total page number and compare to the current value and update accordingly