[Libreoffice-commits] core.git: sfx2/source
Stephan Bergmann
sbergman at redhat.com
Mon Jan 19 03:44:56 PST 2015
sfx2/source/doc/objserv.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit cfce342e6bba803349f9234bdcd9351df68be824
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jan 19 12:39:19 2015 +0100
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
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 0edb0e8..98bf20d 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 ) );
More information about the Libreoffice-commits
mailing list