summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorBayram Çiçek <bayram.cicek@collabora.com>2024-11-13 20:27:09 +0300
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-11-13 20:17:46 +0100
commitc82ceac1cc544fe77f1ce8aaccc8baa0de938821 (patch)
tree43ae77c42ba92476458f3373fddbd6ac4d7cee35 /sc
parentb8eb56653ddf0b272cff897f157c7940a3043e14 (diff)
sc: send cell addresses of delete-by-autofill
with LOK_CALLBACK_REFERENCE_MARKS Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com> Change-Id: Ic991f1dd41b99cf6caca7dc408caaf6d4dfeac3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176557 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview4.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 99353eac81be..351a8a7320ed 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 = SC_MOD()->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() )