diff options
-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 ) ); |