sc/source/ui/view/tabview4.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
New commits: commit c82ceac1cc544fe77f1ce8aaccc8baa0de938821 Author: Bayram Çiçek <bayram.ci...@collabora.com> AuthorDate: Wed Nov 13 20:27:09 2024 +0300 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Nov 13 20:17:46 2024 +0100 sc: send cell addresses of delete-by-autofill with LOK_CALLBACK_REFERENCE_MARKS Signed-off-by: Bayram Çiçek <bayram.ci...@collabora.com> Change-Id: Ic991f1dd41b99cf6caca7dc408caaf6d4dfeac3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176557 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> 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() )