sc/source/ui/cctrl/checklistmenu.cxx |    5 ++++-
 sc/source/ui/inc/checklistmenu.hxx   |    3 ++-
 sc/source/ui/view/gridwin.cxx        |    9 ++++++---
 3 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit b528017e8c95791bb441d61540cfbafe89854eb4
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Fri Nov 13 12:30:51 2020 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Tue Dec 1 12:16:38 2020 +0100

    autofilter: make working with multiple users in online
    
    Change-Id: Ib0255178112fae5d964cd6155d42848e7c7c51e8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106909
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 98421847ccd6..0df3819e686c 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -558,11 +558,14 @@ ScCheckListMenuControl::~ScCheckListMenuControl()
 }
 
 ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* 
pDoc, bool bCanHaveSubMenu,
-                                             bool bTreeMode, int nWidth, 
ScCheckListMenuWindow* pParentMenu)
+                                             bool bTreeMode, int nWidth, 
ScCheckListMenuWindow* pParentMenu,
+                                             vcl::ILibreOfficeKitNotifier* 
pNotifier)
     : DockingWindow(pParent, "InterimDockParent", 
"svx/ui/interimdockparent.ui")
     , mxParentMenu(pParentMenu)
     , mxBox(get<vcl::Window>("box"))
 {
+    if (pNotifier)
+        SetLOKNotifier(pNotifier);
     setDeferredProperties();
     mxControl.reset(new ScCheckListMenuControl(this, mxBox.get(), pDoc, 
bCanHaveSubMenu, bTreeMode, nWidth));
     
SetBackground(Application::GetSettings().GetStyleSettings().GetMenuColor());
diff --git a/sc/source/ui/inc/checklistmenu.hxx 
b/sc/source/ui/inc/checklistmenu.hxx
index 49d4822ecd3b..5d4d6a6abd33 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -304,7 +304,8 @@ class ScCheckListMenuWindow : public DockingWindow
 public:
     explicit ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* pDoc,
                                    bool bCanHaveSubMenu, bool bTreeMode, int 
nWidth = -1,
-                                   ScCheckListMenuWindow* pParentMenu = 
nullptr);
+                                   ScCheckListMenuWindow* pParentMenu = 
nullptr,
+                                   vcl::ILibreOfficeKitNotifier* pNotifier = 
nullptr);
     virtual void dispose() override;
     virtual ~ScCheckListMenuWindow() override;
 
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 31db62f12c6e..fe1bf2703a34 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -639,13 +639,16 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW 
nRow)
     ScFilterEntries aFilterEntries;
     pDoc->GetFilterEntries(nCol, nRow, nTab, aFilterEntries);
 
+    vcl::ILibreOfficeKitNotifier* pNotifier = nullptr;
+    if (bLOKActive)
+        pNotifier = SfxViewShell::Current();
+
     int nColWidth = ScViewData::ToPixel(pDoc->GetColWidth(nCol, nTab), 
pViewData->GetPPTX());
     mpAutoFilterPopup.reset(VclPtr<ScCheckListMenuWindow>::Create(this, pDoc, 
false,
-                                                                  
aFilterEntries.mbHasDates, nColWidth));
+                                                                  
aFilterEntries.mbHasDates,
+                                                                  nColWidth, 
nullptr, pNotifier));
     ScCheckListMenuControl& rControl = mpAutoFilterPopup->get_widget();
 
-    if (bLOKActive)
-        mpAutoFilterPopup->SetLOKNotifier(SfxViewShell::Current());
     rControl.setOKAction(new AutoFilterAction(this, AutoFilterMode::Normal));
     rControl.setPopupEndAction(
         new AutoFilterPopupEndAction(this, ScAddress(nCol, nRow, nTab)));
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to