[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sfx2/source
Stephan Bergmann
sbergman at redhat.com
Mon Jan 19 07:57:06 PST 2015
sfx2/source/doc/objserv.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 030f26259f44d1e38623ce8e40015beedd57cd7e
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.
(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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 0d1300a..6b14d06 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 ) );
More information about the Libreoffice-commits
mailing list