summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-19 12:39:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-01-19 15:56:30 +0000
commit030f26259f44d1e38623ce8e40015beedd57cd7e (patch)
tree3d7f705edb06502a7d4c18b693854c9e31cf0370 /sfx2
parent38c9c6831975b5944fa19b0ab02ee61ba49e825d (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. (cherry picked from commit cfce342e6bba803349f9234bdcd9351df68be824, plus trivial "nullptr" -> "0" de-C++11-ification) Change-Id: I334cd6c5ebd596e408357bb6820800075217d2d1 Reviewed-on: https://gerrit.libreoffice.org/14016 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objserv.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 0d1300ad419a..6b14d06939a6 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 == 0 || !saveTo->GetValue())
+ {
+ GetFrame()->RemoveInfoBar("readonly");
+ SetReadOnlyUI(false);
+ }
}
rReq.SetReturnValue( SfxBoolItem(0, nErrorCode == ERRCODE_NONE ) );