tdf#140020: Disable also menu File->SaveAll for docs with LockSave
If LockSave attribute is applied, docs with it are not affecting
File->Save All menu item: these documents are not enabling this menu
and also not saved during this process.
Change-Id: I00bcd251fccfab3f13cb42c20ccb61b54ab49346
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128650
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 980d4cb0..ee447497 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -463,7 +463,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
{
SfxRequest aReq( SID_SAVEDOC, SfxCallMode::SLOT, pObjSh->GetPool() );
if ( pObjSh->IsModified() )
if ( pObjSh->IsModified() && !pObjSh->isSaveLocked())
{
pObjSh->ExecuteSlot( aReq );
const SfxBoolItem *pItem = dynamic_cast<const SfxBoolItem*>( aReq.GetReturnValue() );
@@ -1155,7 +1155,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
pObjSh;
pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
{
if ( pObjSh->IsModified() )
if ( pObjSh->IsModified() && !pObjSh->isSaveLocked() )
{
bModified = true;
break;