sc/source/ui/view/tabview4.cxx |   27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

New commits:
commit fd9cfe9ebe89dd64d6893e517375a56be50056e4
Author:     Bayram Çiçek <[email protected]>
AuthorDate: Thu Nov 14 11:14:31 2024 +0300
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Dec 19 12:16:13 2024 +0100

    sc: autofill: no need to send deleted cell addresses
    
    - with LOK_CALLBACK_TOOLTIP. we already send them with
      SendReferenceMarks (https://gerrit.libreoffice.org/c/core/+/176557)
    - also avoid warning "unknown tooltip type - CanvasTileLayer.js" on the
      console
    
    Signed-off-by: Bayram Çiçek <[email protected]>
    Change-Id: Id6e6d2c20c7b874d8d57324ed4dd3984a56ac398
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176565
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit 02046576573e1547c7cd00cd17faffc87d1ede72)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178790
    Tested-by: Jenkins

diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index ab7f6a59b99f..7ca7a942aab5 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -295,19 +295,6 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB 
nCurZ )
         if (ScTabViewShell* pLOKViewShell
             = comphelper::LibreOfficeKit::isActive() ? 
aViewData.GetViewShell() : nullptr)
         {
-            // autofill: collect the cell addresses that will be deleted
-            OUString sDeleteCellAddress
-                = OUString::Concat(OUString::number(aDelRange.aStart.Row()) + 
" "
-                                   + OUString::number(aDelRange.aStart.Col()) 
+ " "
-                                   + OUString::number(aDelRange.aEnd.Row()) + 
" "
-                                   + OUString::number(aDelRange.aEnd.Col()));
-
-            tools::JsonWriter writer;
-            writer.put("type", "autofilldeletecells");
-            writer.put("delrange", sDeleteCellAddress);
-            OString sPayloadString = writer.finishAndGetAsOString();
-            pLOKViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TOOLTIP, 
sPayloadString);
-
             // set cell addresses for deletion by autofill
             tools::Long nX1 = aDelRange.aStart.Col();
             tools::Long nX2 = aDelRange.aEnd.Col();
commit bf22a14283e3f9eda5e7062983f4e6055c404d59
Author:     Bayram Çiçek <[email protected]>
AuthorDate: Wed Nov 13 20:27:09 2024 +0300
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Dec 19 12:16:05 2024 +0100

    sc: send cell addresses of delete-by-autofill
    
    with LOK_CALLBACK_REFERENCE_MARKS
    
    Signed-off-by: Bayram Çiçek <[email protected]>
    Change-Id: Ic991f1dd41b99cf6caca7dc408caaf6d4dfeac3c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176557
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit c82ceac1cc544fe77f1ce8aaccc8baa0de938821)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178789
    Tested-by: Jenkins

diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 3b75cef9aba5..ab7f6a59b99f 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -30,6 +30,7 @@
 #include <inputhdl.hxx>
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
 #include <tools/json_writer.hxx>
+#include <output.hxx>
 
 // ---  Referenz-Eingabe / Fill-Cursor
 
@@ -306,6 +307,23 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB 
nCurZ )
             writer.put("delrange", sDeleteCellAddress);
             OString sPayloadString = writer.finishAndGetAsOString();
             pLOKViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TOOLTIP, 
sPayloadString);
+
+            // set cell addresses for deletion by autofill
+            tools::Long nX1 = aDelRange.aStart.Col();
+            tools::Long nX2 = aDelRange.aEnd.Col();
+            tools::Long nY1 = aDelRange.aStart.Row();
+            tools::Long nY2 = aDelRange.aEnd.Row();
+            tools::Long nTab = aDelRange.aStart.Tab();
+
+            std::vector<ReferenceMark> aReferenceMarks(1);
+
+            const svtools::ColorConfig& rColorCfg = 
ScModule::get()->GetColorConfig();
+            Color 
aSelColor(rColorCfg.GetColorValue(svtools::CALCHIDDENROWCOL).nColor);
+
+            aReferenceMarks[0] = ScInputHandler::GetReferenceMark(
+                aViewData, aViewData.GetDocShell(), nX1, nX2, nY1, nY2, nTab, 
aSelColor);
+
+            ScInputHandler::SendReferenceMarks(pLOKViewShell, aReferenceMarks);
         }
     }
     else if ( nEndX != aMarkRange.aEnd.Col() || nEndY != aMarkRange.aEnd.Row() 
)

Reply via email to