diff options
author | Ximeng Zu <uznomis@yahoo.com> | 2017-04-24 22:30:17 -0500 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-07-15 12:47:11 +0200 |
commit | 7c2d92ab63834f124c32ea49178974432159d980 (patch) | |
tree | ca68375de704b535c79db357d88735bea000941c /android/source/res | |
parent | 43d8bf8beefe31a41733c5c9b443df22ca3c22a9 (diff) |
Developer Mode
Added an settings option to enable Developer
Mode, in which you can send UNO commands
from the Viewer. You can also add properties
to the command.
Change-Id: I76cbb55771cdd5cea89da65ddf67e48e12745b41
Reviewed-on: https://gerrit.libreoffice.org/37045
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'android/source/res')
-rw-r--r-- | android/source/res/layout/toolbar_bottom.xml | 92 | ||||
-rw-r--r-- | android/source/res/menu/main.xml | 4 | ||||
-rw-r--r-- | android/source/res/values/strings.xml | 9 | ||||
-rw-r--r-- | android/source/res/xml/libreoffice_preferences.xml | 6 |
4 files changed, 111 insertions, 0 deletions
diff --git a/android/source/res/layout/toolbar_bottom.xml b/android/source/res/layout/toolbar_bottom.xml index d1820216d2ab..25f47b828a36 100644 --- a/android/source/res/layout/toolbar_bottom.xml +++ b/android/source/res/layout/toolbar_bottom.xml @@ -446,4 +446,96 @@ android:src="@drawable/ic_search_direction_up" /> </LinearLayout> + <LinearLayout + android:id="@+id/UNO_commands_toolbar" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <EditText + android:id="@+id/UNO_commands_string" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:maxLines="1" + android:scrollHorizontally="true" + android:inputType="textNoSuggestions" + android:hint="@string/UNO_commands_string_hint" /> + + <ImageButton + android:id="@+id/button_send_UNO_commands" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/image_button_background" + android:padding="10dp" + app:srcCompat="@drawable/ic_check" /> + + <ImageButton + android:id="@+id/button_send_UNO_commands_show" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/image_button_background" + android:padding="10dp" + app:srcCompat="@drawable/ic_filter_list_black_24dp" /> + + <ImageButton + android:id="@+id/button_send_UNO_commands_clear" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/image_button_background" + android:padding="10dp" + app:srcCompat="@drawable/ic_undo" /> + + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <EditText + android:id="@+id/UNO_commands_string_parent_value" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:maxLines="1" + android:scrollHorizontally="true" + android:inputType="textNoSuggestions" + android:hint="@string/UNO_commands_string_parent_value_hint" /> + + <EditText + android:id="@+id/UNO_commands_string_type" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:maxLines="1" + android:scrollHorizontally="true" + android:inputType="textNoSuggestions" + android:hint="@string/UNO_commands_string_type_hint" /> + + <EditText + android:id="@+id/UNO_commands_string_value" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:maxLines="1" + android:scrollHorizontally="true" + android:inputType="textNoSuggestions" + android:hint="@string/UNO_commands_string_value_hint" /> + + <ImageButton + android:id="@+id/button_add_property" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/image_button_background" + android:padding="10dp" + app:srcCompat="@drawable/ic_add_black_24dp" /> + + </LinearLayout> + + </LinearLayout> + </LinearLayout> diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml index 7fba5f46e380..92b40c250aaa 100644 --- a/android/source/res/menu/main.xml +++ b/android/source/res/menu/main.xml @@ -36,6 +36,10 @@ android:title="@string/action_save" android:orderInCategory="100" /> + <item android:id="@+id/action_UNO_commands" + android:title="@string/action_UNO_commands" + android:orderInCategory="100" /> + <item android:id="@+id/action_add_slide" android:title="@string/action_add_slide" android:orderInCategory="100" diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml index cbbce88d158c..b476ac38682e 100644 --- a/android/source/res/values/strings.xml +++ b/android/source/res/values/strings.xml @@ -51,6 +51,8 @@ <string name="pref_experimental_editing_summary">Enable the experimental editing mode. Use at your own risk.</string> <string name="pref_show_hidden_files">Hidden Files/Folders</string> <string name="pref_show_hidden_files_summary">Enable to show hidden files/folders</string> + <string name="pref_developer_mode">Developer Mode</string> + <string name="pref_developer_mode_summary">Enable developer mode where you can send UNO commands within app. Use at your own risk.</string> <string name="action_about">About</string> <string name="action_parts">Parts</string> @@ -93,6 +95,7 @@ <string name="action_save">Save</string> <string name="action_fromat">Enable Format</string> <string name="action_search">Search</string> + <string name="action_UNO_commands">Send UNO Cmd</string> <!-- Feedback messages --> <string name="message_saved">Save complete</string> @@ -196,4 +199,10 @@ <item>Delete Table</item> </string-array> + <!-- UNO cmd controller Strings --> + <string name="UNO_commands_string_hint">UNO Command</string> + <string name="UNO_commands_string_type_hint">Type</string> + <string name="UNO_commands_string_value_hint">Value</string> + <string name="UNO_commands_string_parent_value_hint">Parent Value</string> + </resources> diff --git a/android/source/res/xml/libreoffice_preferences.xml b/android/source/res/xml/libreoffice_preferences.xml index 17236434daa2..2b3d9dde2f57 100644 --- a/android/source/res/xml/libreoffice_preferences.xml +++ b/android/source/res/xml/libreoffice_preferences.xml @@ -34,5 +34,11 @@ android:key="ENABLE_EXPERIMENTAL" android:summary="@string/pref_experimental_editing_summary" android:defaultValue="false" /> + <CheckBoxPreference + android:title="@string/pref_developer_mode" + android:key="ENABLE_DEVELOPER" + android:dependency="ENABLE_EXPERIMENTAL" + android:summary="@string/pref_developer_mode_summary" + android:defaultValue="false" /> </PreferenceCategory> </PreferenceScreen> |