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

Added Clear Formatting button on Android Viewer

Change-Id: If576aaf3e5095e660219fed9f5e11971c9a73469
Signed-off-by: 's avatarMert Tumer <merttumer7@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/59293
Tested-by: Jenkins
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst 1c08deed
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M3.27,5L2,6.27l6.97,6.97L6.5,19h3l1.57,-3.66L16.73,21 18,19.73 3.55,5.27 3.27,5zM6,5v0.18L8.82,8h2.4l-0.72,1.68 2.1,2.1L14.21,8H20V5H6z"/>
</vector>
......@@ -107,6 +107,16 @@
android:paddingTop="12dp"
android:src="@drawable/ic_format_strikethrough" />
<ImageButton
android:id="@+id/button_clearformatting"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="@drawable/image_button_background"
android:paddingBottom="12dp"
android:paddingTop="12dp"
app:srcCompat="@drawable/ic_format_clear_black_24dp" />
</LinearLayout>
<Spinner
......
......@@ -53,6 +53,7 @@ class FormattingController implements View.OnClickListener {
mContext.findViewById(R.id.button_italic).setOnClickListener(this);
mContext.findViewById(R.id.button_strikethrough).setOnClickListener(this);
mContext.findViewById(R.id.button_underlined).setOnClickListener(this);
mContext.findViewById(R.id.button_clearformatting).setOnClickListener(this);
mContext.findViewById(R.id.button_align_left).setOnClickListener(this);
mContext.findViewById(R.id.button_align_center).setOnClickListener(this);
......@@ -102,8 +103,11 @@ class FormattingController implements View.OnClickListener {
case R.id.button_strikethrough:
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Strikeout"));
break;
case R.id.button_clearformatting:
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:ResetAttributes"));
break;
case R.id.button_underlined:
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Underline"));
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:UnderlineDouble"));
break;
case R.id.button_align_left:
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:LeftPara"));
......
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