From cfce342e6bba803349f9234bdcd9351df68be824 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 19 Jan 2015 12:39:19 +0100 Subject: 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 --- sfx2/source/doc/objserv.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sfx2') 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( + rReq.GetArg(SID_SAVETO, false, TYPE(SfxBoolItem))); + if (saveTo == nullptr || !saveTo->GetValue()) + { + GetFrame()->RemoveInfoBar("readonly"); + SetReadOnlyUI(false); + } } rReq.SetReturnValue( SfxBoolItem(0, nErrorCode == ERRCODE_NONE ) ); -- cgit