[Libreoffice-commits] core.git: Branch 'feature/eszka' - sc/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 13 12:52:08 UTC 2020
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 9b6b6260f04f3538b879b03dec76d53fe3133717
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Nov 13 12:30:51 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Nov 13 13:33:19 2020 +0100
autofilter: make working with multiple users in online
Change-Id: Ib0255178112fae5d964cd6155d42848e7c7c51e8
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 35788177cbf1..40cb77f85b53 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -635,13 +635,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)));
More information about the Libreoffice-commits
mailing list