diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-04-15 16:50:16 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-04-16 08:50:30 +0200 |
commit | 01521db61eb41447113c4bb671ac828a583c0cd1 (patch) | |
tree | 5e34993eef7bd2b98e6a9e4029f99ff65548e08b /cui/uiconfig/ui/comment.ui | |
parent | 5ce43b2b4e79c51f0d8922caf77fa6492c05c2a7 (diff) |
tdf#95615 android: Don't offer "Save" after opening template
When the input document in Android Viewer is a template,
a new doc is created and a plain '.uno:Save'
(which 'LibreOfficeMainActivity#saveDocument' triggers when the
"Save" menu entry is selected) will therefore fail.
A proper URI to save to (rather than overwriting the
template itself) is only known after a "Save As" anyway,
so don't set the 'mDocument' member until then, which leads to
the "Save" menu entry becoming disabled, just as is the
case when explicitly choosing to create a new document in
the start activity.
For now, the check whether the document is a template
checks whether the MIME type detected for the URI
ends with "template", which is the case for ODF and
OOXML types (like
"application/vnd.oasis.opendocument.text-template" or
"application/vnd.openxmlformats-officedocument.wordprocessingml.template").
This can be refined further as needed, e.g. by explicitly
adding more MIME types to check.
(Editing the actual template instead of creating a new doc
from it would be a different use case that remains
unsupported also with this change in place.)
Change-Id: I81ff957de27f620a026dbc01097b8061886293a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114157
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'cui/uiconfig/ui/comment.ui')
0 files changed, 0 insertions, 0 deletions