summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2017-12-18 01:48:41 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2017-12-18 08:36:50 +0100
commit44ac1579f31c4ad7d026f7e2736ad2124e40295e (patch)
tree8caa83ef797a08fc68ede906a54240a8dd398439 /sfx2
parent4e144751f12a06e358e4f7efa7c8f13954e6cfd7 (diff)
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 <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewfrm.cxx4
1 files changed, 2 insertions, 2 deletions
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 );
}