sc/source/ui/inc/gridwin.hxx | 1 + sc/source/ui/view/gridwin.cxx | 13 +++++++++++++ 2 files changed, 14 insertions(+)
New commits: commit 3ad33e68f76aac47546920825c8081f166e37ae3 Author: Pranam Lashkari <[email protected]> AuthorDate: Thu Jan 15 03:50:04 2026 +0530 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Jan 15 12:50:09 2026 +0100 LOK: send notification when autofilter is changed Change-Id: I4b1e45461099404cffc0fe9cbbc5d45c09736bad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197302 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 5bc5f2c96023..5ed694801413 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -245,6 +245,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::DocWindow, public DropTarget bool DoPageFieldSelection( SCCOL nCol, SCROW nRow ); bool DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt ); void SendAutofilterPopupPosition(SCCOL nCol, SCROW nRow); + void SendAutofilterChange(); void DoPushPivotButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt, bool bButton, bool bPopup, bool bMultiField ); void DoPushPivotToggle( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt ); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index a896c2291dd0..860053c6dd64 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -954,6 +954,18 @@ void ScGridWindow::SendAutofilterPopupPosition(SCCOL nCol, SCROW nRow) { } } +void ScGridWindow::SendAutofilterChange() { + ScTabViewShell* pViewShell = mrViewData.GetViewShell(); + if (pViewShell) + { + tools::JsonWriter writer; + writer.put("commandName", "AutoFilterChange"); + writer.put("state", true); + OString info = writer.finishAndGetAsOString(); + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, info); + } +} + void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow) { SCTAB nTab = mrViewData.CurrentTabForData(); @@ -1327,6 +1339,7 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode) } } + SendAutofilterChange(); mrViewData.GetView()->Query(aParam, nullptr, true); pDBData->SetQueryParam(aParam); }
