diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-08-24 15:14:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-08-24 15:14:38 +0200 |
commit | 191c0a9e7719b777146430486d703641aaff43bf (patch) | |
tree | ca2afff9832f58fcbab4fc6d0582d776bd54602e /include/sfx2 | |
parent | 057ae1cfcac518e5693e75aca87d307ce90ba6fb (diff) |
tdf#93630: Remember whether a doc was originally requested to be opened r/o
...so it'll be opened r/o again on SID_RELOAD. Needs addition of yet another
m_bOriginallyLoadedReadOnly state, after
a199cad8376a5470c50125def2738b44b55ec018 "tdf#65498, tdf#87545: Don't confuse
logically r/o doc with physically r/o" already added m_bOriginallyReadOnly.
Change-Id: I9c7129a6f1b0e7618be616d5897ee6ef29e0abb7
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/docfile.hxx | 12 | ||||
-rw-r--r-- | include/sfx2/objsh.hxx | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx index a08c22b7bdb7..37576d1bf1a8 100644 --- a/include/sfx2/docfile.hxx +++ b/include/sfx2/docfile.hxx @@ -178,11 +178,17 @@ public: GetVersionList( bool _bNoReload = false ); SAL_WARN_UNUSED_RESULT bool IsReadOnly() const; - // Whether the medium had originally been opened r/o, independent of later - // changes via SetOpenMode; used to keep track of the "true" state of the - // medium across toggles via SID_EDITDOC (which do change SetOpenMode): + // Whether the medium had originally been opened r/o (either because it is + // "physically" r/o, or because it was requested to be opended r/o, + // independent of later changes via SetOpenMode; used to keep track of the + // "true" state of the medium across toggles via SID_EDITDOC (which do + // change SetOpenMode): SAL_WARN_UNUSED_RESULT bool IsOriginallyReadOnly() const; + // Whether the medium had originally been requested to be opened r/o, + // independent of later changes via SetOpenMode; used for SID_RELOAD: + SAL_WARN_UNUSED_RESULT bool IsOriginallyLoadedReadOnly() const; + css::uno::Reference< css::io::XInputStream > GetInputStream(); void CreateTempFile( bool bReplace = true ); diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index b4fecfe3921b..5a145dfb0fe9 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -283,6 +283,7 @@ public: bool IsReadOnly() const; bool IsReadOnlyMedium() const; bool IsOriginallyReadOnlyMedium() const; + bool IsOriginallyLoadedReadOnlyMedium() const; void SetReadOnlyUI( bool bReadOnly = true ); bool IsReadOnlyUI() const; void SetNoName(); |