sfx2/source/appl/appserv.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 87fe449c4c1ed46003e9d5fdaf1919f11a53b959
Author:     Vasily Melenchuk <vasily.melenc...@cib.de>
AuthorDate: Thu Jan 20 14:16:40 2022 +0300
Commit:     Vasily Melenchuk <vasily.melenc...@cib.de>
CommitDate: Fri Jan 21 09:10:49 2022 +0100

    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.mehrbr...@allotropia.de>
    Reviewed-by: Vasily Melenchuk <vasily.melenc...@cib.de>

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 980d4cb057e9..ee447497fdd5 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;

Reply via email to