sc/source/ui/view/cellsh1.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 279343c9a5f144e75ac8dd5b06ddd9e65b0d5090
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Feb 9 11:53:28 2026 +0000
Commit:     Miklos Vajna <[email protected]>
CommitDate: Tue Feb 10 11:12:43 2026 +0100

    nFlags is InsertDeleteFlags::NONE in the error case
    
    Change-Id: Iae1f64b43c6ad6b290a9ccfb5156be54fc2f72c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198977
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index ddced08d30da..6982aa907313 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -486,17 +486,18 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 
         case SID_DELETE:
             {
-                InsertDeleteFlags nFlags = InsertDeleteFlags::NONE;
-
                 if ( pReqArgs!=nullptr && pTabViewShell->SelectionEditable() )
                 {
                     const   SfxPoolItem* pItem;
                     OUString aFlags('A');
 
+                    InsertDeleteFlags nFlags = InsertDeleteFlags::NONE;
                     if( pReqArgs->HasItem( SID_DELETE, &pItem ) )
                         aFlags = static_cast<const 
SfxStringItem*>(pItem)->GetValue();
 
                     nFlags |= FlagsFromString(aFlags, InsertDeleteFlags::ALL);
+
+                    DeleteContents(pTabViewShell, rReq, nFlags);
                 }
                 else
                 {
@@ -512,14 +513,13 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                             pDlg->DisableObjects();
                         if (pDlg->Execute() == RET_OK)
                         {
-                            nFlags = pDlg->GetDelContentsCmdBits();
+                            InsertDeleteFlags nFlags = 
pDlg->GetDelContentsCmdBits();
+                            DeleteContents(pTabViewShell, rReq, nFlags);
                         }
                     }
                     else
                         pTabViewShell->ErrorMessage(aTester.GetMessageId());
                 }
-
-                DeleteContents(pTabViewShell, rReq, nFlags);
             }
             break;
 

Reply via email to