sfx2/source/view/viewfrm.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 44ac1579f31c4ad7d026f7e2736ad2124e40295e Author: Maxim Monastirsky <[email protected]> Date: Mon Dec 18 01:48:41 2017 +0200 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/46671 Tested-by: Jenkins <[email protected]> Reviewed-by: Maxim Monastirsky <[email protected]> diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 448b625dd427..149b24b89826 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -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 ); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
