summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2022-01-20 14:16:40 +0300
committerVasily Melenchuk <vasily.melenchuk@cib.de>2022-01-21 14:09:25 +0100
commitd8ad1d634db888026ef973442775775051066458 (patch)
treefa2fd7b55be84722d679b72477e71a41897ee49c
parentUpdate git submodules (diff)
downloadcore-d8ad1d634db888026ef973442775775051066458.tar.gz
core-d8ad1d634db888026ef973442775775051066458.zip
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> (cherry picked from commit 87fe449c4c1ed46003e9d5fdaf1919f11a53b959) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128676
-rw-r--r--sfx2/source/appl/appserv.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index b8c80823daf3..107b8c1f749a 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -461,7 +461,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() );
@@ -1149,7 +1149,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
pObjSh;
pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
{
- if ( pObjSh->IsModified() )
+ if ( pObjSh->IsModified() && !pObjSh->isSaveLocked() )
{
bModified = true;
break;