diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-04-15 08:57:56 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-04-16 08:47:59 +0200 |
commit | d16e569209fe40c2cb5776f7b9415e273d5b2387 (patch) | |
tree | f9a625921abadabac5dd1b4f11209b1d756cf0fa /android/source/res/menu/main.xml | |
parent | a2b4564d719e6efeb614052b9c833991e447c68c (diff) |
android: Add a "Save As..." menu entry
This adds a "Save As..." menu entry to Android
Viewer in order to save the currently opened file
to a different location.
Currently, the file is always saved in the corresponding
ODF format, regardless of the original file type,
i.e. that e.g. a DOCX file is saved in ODT format.
(This could be extended to allow a selection of the
target format as needed.)
Like "Save As" (and as compared to "Save a Copy")
in the desktop version, the app remembers the
new document URI and subsequent save operations
will overwrite the newly saved file, not the originally
opened one.
(There is no need to create a new temporary
local file to use, though.)
The directory of the currently used file
is preselected in the file chooser used to
specify where to save the new file.
Make sure to copy the file in a non-main thread,
since the destination URI might be handled
by a DocumentsProvider that does network access.
However, for now the main thread just waits for
the separate thread to finish, just like
commit 7f838b73e85eb6f0a1dce4647650a5cf5f34ccd2
Date: Fri Mar 19 15:46:36 2021 +0100
tdf#129833 android: Move reading file to separate thread
implemented it for copying from the URI to the
temporary file when opening a file.
This also adds a 'TileProvider#isDrawing' method
(like the already existing 'isTextDocument',
'isSpreadsheet' and 'isPresentation' ones).
Change-Id: I6f56b71763431b89a6c74be35cc1e81fad136cd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114058
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'android/source/res/menu/main.xml')
-rw-r--r-- | android/source/res/menu/main.xml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml index 2c97b3201b9e..94856d52e759 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_save_as" + android:title="@string/action_save_as" + android:orderInCategory="100" /> + <item android:id="@+id/action_exportToPDF" android:title="@string/action_exportToPDF" android:orderInCategory="100" |