diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-19 12:39:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-19 12:44:20 +0100 |
commit | cfce342e6bba803349f9234bdcd9351df68be824 (patch) | |
tree | 51286d849b766e834171225364241bc4fffbd844 /sfx2/source | |
parent | 5e4dc857252c8eeaaa629af2fb6b392ab02036cf (diff) |
fdo#86147: Do not reset r/o mode for SID_SAVETO
...(aka "Save Copy as...", as is used when the document is actually a DB form)
but only for true "Save As..." For reasons remaining un-debugged, calling
SetReadOnlyUI(false) on the former would somehow lose the connection to the
embeddedobj Interceptor instance.
Change-Id: I334cd6c5ebd596e408357bb6820800075217d2d1
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 0edb0e8ef2b6..98bf20deb44e 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -728,8 +728,13 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) if ( nId == SID_SAVEASDOC && nErrorCode == ERRCODE_NONE ) { - GetFrame()->RemoveInfoBar("readonly"); - SetReadOnlyUI(false); + SfxBoolItem const * saveTo = static_cast<SfxBoolItem const *>( + rReq.GetArg(SID_SAVETO, false, TYPE(SfxBoolItem))); + if (saveTo == nullptr || !saveTo->GetValue()) + { + GetFrame()->RemoveInfoBar("readonly"); + SetReadOnlyUI(false); + } } rReq.SetReturnValue( SfxBoolItem(0, nErrorCode == ERRCODE_NONE ) ); |