Kaydet (Commit) 44ac1579 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

tdf#113928 More handling of SID_READONLYDOC

At least the second change makes a difference when attempting
to switch to read only mode, when there are unsaved changes
(by either choosing "Save" or "Don't Save").

Change-Id: Ic46b7f9b18900dd7ce83144be0319d6062cef6c8
Reviewed-on: https://gerrit.libreoffice.org/46671Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
üst 4e144751
......@@ -688,7 +688,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
}
// r/o-Doc couldn't be switched to writing mode
if ( bForEdit && SID_EDITDOC == rReq.GetSlot() )
if ( bForEdit && ( SID_EDITDOC == rReq.GetSlot() || SID_READONLYDOC == rReq.GetSlot() ) )
{
// ask user for opening as template
ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
......@@ -716,7 +716,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
xNewObj->SetModifyPasswordEntered( false );
xNewObj->SetReadOnly();
}
else if ( rReq.GetSlot() == SID_EDITDOC )
else if ( rReq.GetSlot() == SID_EDITDOC || rReq.GetSlot() == SID_READONLYDOC )
{
xNewObj->SetReadOnlyUI( !bForEdit );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment