sc/source/ui/inc/operation/Operation.hxx |    1 -
 sc/source/ui/operation/Operation.cxx     |    7 ++++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 5e852f8f61a54d269cd39551626156074770b637
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Wed Feb 18 16:15:29 2026 +0900
Commit:     Miklos Vajna <[email protected]>
CommitDate: Wed Feb 18 14:39:34 2026 +0100

    sc: Fix issues with Operation::convertMark
    
    A potential issue when we would not return the converted mark, even
    when this is desirable.
    
    Some other minor fixes for Operation class.
    
    Change-Id: I81a080d98dd2287b6ec462cc3288885d1b47aafb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199601
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/sc/source/ui/inc/operation/Operation.hxx 
b/sc/source/ui/inc/operation/Operation.hxx
index cafc00a68583..07f5ec5970f7 100644
--- a/sc/source/ui/inc/operation/Operation.hxx
+++ b/sc/source/ui/inc/operation/Operation.hxx
@@ -9,7 +9,6 @@
 
 #pragma once
 
-#include <SheetViewOperationsTester.hxx>
 #include <operation/OperationType.hxx>
 
 class ScMarkData;
diff --git a/sc/source/ui/operation/Operation.cxx 
b/sc/source/ui/operation/Operation.cxx
index 024f4a2b0e12..8baec262344b 100644
--- a/sc/source/ui/operation/Operation.cxx
+++ b/sc/source/ui/operation/Operation.cxx
@@ -18,7 +18,6 @@
 #include <SheetView.hxx>
 #include <sal/log.hxx>
 
-#include <viewdata.hxx>
 #include <dbdata.hxx>
 #include <queryparam.hxx>
 #include <sortparam.hxx>
@@ -108,6 +107,7 @@ ScMarkData Operation::convertMark(ScMarkData const& 
rMarkData)
         && nSheetViewTab == aNewMark.GetArea().aEnd.Tab())
     {
         aNewMark.SetAreaTab(nDefaultViewTab);
+        bChanged = true;
     }
 
     // If sheet view tab is selected, deselect and select default view tab 
instead
@@ -115,6 +115,7 @@ ScMarkData Operation::convertMark(ScMarkData const& 
rMarkData)
     {
         aNewMark.SelectTable(nSheetViewTab, false);
         aNewMark.SelectTable(nDefaultViewTab, true);
+        bChanged = true;
     }
 
     // Take sorting into account when we convert to default view
@@ -150,7 +151,7 @@ ScMarkData Operation::convertMark(ScMarkData const& 
rMarkData)
 
             for (SCROW nRow = nRowStart; nRow <= nRowEnd; ++nRow)
             {
-                for (SCROW nColumn = nColumnStart; nColumn <= nColumnEnd; 
++nColumn)
+                for (SCCOL nColumn = nColumnStart; nColumn <= nColumnEnd; 
++nColumn)
                 {
                     if (aNewMark.IsCellMarked(nColumn, nRow))
                     {
@@ -242,7 +243,7 @@ void Operation::syncSheetViews()
 
 bool Operation::checkSheetViewProtection()
 {
-    sc::SheetViewOperationsTester aSheetViewTester(ScDocShell::GetViewData());
+    sc::SheetViewOperationsTester aSheetViewTester(mpViewData);
     return aSheetViewTester.check(meType);
 }
 

Reply via email to