sc/source/ui/inc/gridwin.hxx | 1 + sc/source/ui/view/gridwin.cxx | 13 +++++++++++++ 2 files changed, 14 insertions(+)
New commits: commit 27dd3aab2fdeee0a9ee00c69462a2b706a30f7de Author: Pranam Lashkari <[email protected]> AuthorDate: Thu Jan 15 03:50:04 2026 +0530 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Jan 16 10:54:27 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]> (cherry picked from commit 3ad33e68f76aac47546920825c8081f166e37ae3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197349 Tested-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index fa2ba12282b9..7c5ae3ec1e5b 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -235,6 +235,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 44e4aa0a785c..958ce5c8cdea 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -956,6 +956,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(); @@ -1329,6 +1341,7 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode) } } + SendAutofilterChange(); mrViewData.GetView()->Query(aParam, nullptr, true); pDBData->SetQueryParam(aParam); }
