Kaydet (Commit) 088fb93a authored tarafından Mert Tumer's avatar Mert Tumer Kaydeden (comit) Tomaž Vajngerl

tdf#106369 added toggle status ability for the list buttons

Change-Id: Ic3132441bac57abf36e3588e6871c5b14a47c25d
Reviewed-on: https://gerrit.libreoffice.org/35427Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst ed42442c
......@@ -49,6 +49,8 @@ public class Document {
public static final int ALIGN_CENTER = 5;
public static final int ALIGN_RIGHT= 6;
public static final int ALIGN_JUSTIFY= 7;
public static final int NUMBERED_LIST= 8;
public static final int BULLET_LIST= 9;
/**
* Callback message types
......
......@@ -105,6 +105,12 @@ import org.libreoffice.kit.Document;
case Document.ALIGN_JUSTIFY:
buttonId = R.id.button_align_justify;
break;
case Document.BULLET_LIST:
buttonId = R.id.button_insertFormatListBullets;
break;
case Document.NUMBERED_LIST:
buttonId = R.id.button_insertFormatListNumbering;
break;
default:
Log.e(LOGTAG, "Uncaptured state change type: " + type);
return;
......
......@@ -113,6 +113,10 @@ public class InvalidationHandler implements Document.MessageCallback {
mContext.getFormattingController().onToggleStateChanged(Document.ALIGN_RIGHT, pressed);
} else if (parts[0].equals(".uno:JustifyPara")) {
mContext.getFormattingController().onToggleStateChanged(Document.ALIGN_JUSTIFY, pressed);
} else if (parts[0].equals(".uno:DefaultBullet")) {
mContext.getFormattingController().onToggleStateChanged(Document.BULLET_LIST, pressed);
} else if (parts[0].equals(".uno:DefaultNumbering")) {
mContext.getFormattingController().onToggleStateChanged(Document.NUMBERED_LIST, pressed);
} else {
Log.d(LOGTAG, "LOK_CALLBACK_STATE_CHANGED type uncatched: " + payload);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment