summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-06-01 17:32:07 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-01 17:32:07 +0200
commitb9ecec7c74687ed5a9470cffb7d02e0e6e83107e (patch)
tree3d7c4f5a191dc837032b0a094b5316055a3679ec /oox
parent477c2229d2532a11ec8c81b9ef392ce49357f95c (diff)
Allow for editing of read-only documents
When e.g. viewing mail attachments (that have been stored r/o to some download directory by the mail application), it would be nice if the user could easily temporarily modify them (say, play around with a spreadsheet, changing some numbers and triggering recalculation of formulas) by clicking the "Edit File" button and not being asked to create a copy for editing. This patch tries to make editability of a view independent of the r/o status of the medium: * SID_EDITDOC (the "Edit File" button) now only toggles the r/o status of the view. It no longer asks to create a copy for editing if the underlying medium is r/o. * When a modified document is toggled to r/o via SID_EDITDOC, LO still asks the user to save or discard the changes. However, if the underlying medium is physically r/o (see next), saving the document opens the "Save As" dialog, instead of just doing a "Save" operation (which would fail on the r/o file). * A new state of "IsOriginallyReadOnly" needed to be added to the medium, to keep track whether the medium was originally opened r/o (and is thus assumed to be physically r/o), as toggling SID_EDITDOC in the view also changes the open mode of the underlying medium. Instead of trying to fully understand and disentangle that horrible mess, I just added yet another state to the mess... * The title of the document window now contains "(read-only)" if and only if either the view is r/o or the medium is originally r/o (or both). Change-Id: I89d9c6adf0baab411e737a5f4e6f4e770e7a70be
Diffstat (limited to 'oox')
0 files changed, 0 insertions, 0 deletions