sc/source/ui/cctrl/checklistmenu.cxx | 12 ++++++++++-- sc/source/ui/view/gridwin.cxx | 8 +++++--- sc/source/ui/view/gridwin2.cxx | 3 ++- sc/source/ui/view/tabview3.cxx | 4 +++- vcl/jsdialog/jsdialogbuilder.cxx | 1 - vcl/source/window/dockwin.cxx | 5 ++++- 6 files changed, 24 insertions(+), 9 deletions(-)
New commits: commit 9419c2928a97d5c14be244dfdec51401b0487809 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Mon Feb 28 19:34:22 2022 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Fri Mar 4 12:29:21 2022 +0100 lok: run autofilter without timers so we are sure we will get correct position Change-Id: Idd218e19b8b3f3d6da67e325472e11b5661bc3b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130725 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Mert Tumer <mert.tu...@collabora.com> diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index c80c896f832f..e89fdbdb4df5 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -264,7 +264,10 @@ void ScCheckListMenuControl::queueLaunchSubMenu(size_t nPos, ScCheckListMenuWind maOpenTimer.mpSubMenu = pMenu; maOpenTimer.mnMenuPos = nPos; - maOpenTimer.maTimer.Start(); + if (comphelper::LibreOfficeKit::isActive()) + maOpenTimer.maTimer.Invoke(); + else + maOpenTimer.maTimer.Start(); } void ScCheckListMenuControl::queueCloseSubMenu() @@ -278,7 +281,10 @@ void ScCheckListMenuControl::queueCloseSubMenu() maCloseTimer.mpSubMenu = maOpenTimer.mpSubMenu; maCloseTimer.mnMenuPos = maOpenTimer.mnMenuPos; - maCloseTimer.maTimer.Start(); + if (comphelper::LibreOfficeKit::isActive()) + maOpenTimer.maTimer.Invoke(); + else + maCloseTimer.maTimer.Start(); } void ScCheckListMenuControl::launchSubMenu(bool bSetMenuPos) @@ -1403,6 +1409,8 @@ void ScCheckListMenuControl::launch(const tools::Rectangle& rRect) } StartPopupMode(aRect, FloatWinPopupFlags::Down); + if (comphelper::LibreOfficeKit::isActive()) + jsdialog::SendFullUpdate(std::to_string(mxFrame->GetLOKWindowId()), "toggle_all"); } void ScCheckListMenuControl::NotifyCloseLOK() diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index c449ad5b74ab..7608d722f237 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -618,7 +618,6 @@ JSInstanceBuilder::JSInstanceBuilder(vcl::Window* pParent, const OUString& rUIRo } initializeSender(GetNotifierWindow(), GetContentWindow(), GetTypeOfJSON()); - sendFullUpdate(); } JSInstanceBuilder* JSInstanceBuilder::CreateDialogBuilder(weld::Widget* pParent, commit 4b46b6376cbc1338ef18b6f85427a8c64c91ef87 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Fri Feb 25 13:22:36 2022 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Fri Mar 4 12:29:12 2022 +0100 lok: send logic autofilter position we need to show popup relative to the grid window Change-Id: Ib0cf66d2c0422b765a3b8035d5499b45e83f768d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130528 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Mert Tumer <mert.tu...@collabora.com> diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 826550e8f391..bd0cce8b5850 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -650,7 +650,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow) nSizeX = nSizeX / fZoomX; nSizeY = nSizeY / fZoomY; } - tools::Rectangle aCellRect(OutputToScreenPixel(aPos), Size(nSizeX, nSizeY)); + tools::Rectangle aCellRect(bLOKActive ? aPos : OutputToScreenPixel(aPos), Size(nSizeX, nSizeY)); ScDBData* pDBData = rDoc.GetDBAtCursor(nCol, nRow, nTab, ScDBDataPortion::AREA); if (!pDBData) @@ -905,7 +905,8 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ) Point aScrPos; Size aScrSize; getCellGeometry(aScrPos, aScrSize, mrViewData, nCol, nRow, eWhich); - DPLaunchFieldPopupMenu(OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol-1, nRow, nTab), pDPObj); + bool bLOK = comphelper::LibreOfficeKit::isActive(); + DPLaunchFieldPopupMenu(bLOK ? aScrPos : OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol-1, nRow, nTab), pDPObj); } void ScGridWindow::LaunchDPFieldMenu( SCCOL nCol, SCROW nRow ) @@ -918,7 +919,8 @@ void ScGridWindow::LaunchDPFieldMenu( SCCOL nCol, SCROW nRow ) Point aScrPos; Size aScrSize; getCellGeometry(aScrPos, aScrSize, mrViewData, nCol, nRow, eWhich); - DPLaunchFieldPopupMenu(OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol, nRow, nTab), pDPObj); + bool bLOK = comphelper::LibreOfficeKit::isActive(); + DPLaunchFieldPopupMenu(bLOK ? aScrPos : OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol, nRow, nTab), pDPObj); } void ScGridWindow::ShowFilterMenu(weld::Window* pParent, const tools::Rectangle& rCellRect, bool bLayoutRTL) diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 0b0044cefc4b..7651460d2adc 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -344,6 +344,7 @@ bool ScGridWindow::DPTestFieldPopupArrow( const MouseEvent& rMEvt, const ScAddress& rPos, const ScAddress& rDimPos, ScDPObject* pDPObj) { bool bLayoutRTL = mrViewData.GetDocument().IsLayoutRTL( mrViewData.GetTabNo() ); + bool bLOK = comphelper::LibreOfficeKit::isActive(); // Get the geometry of the cell. Point aScrPos = mrViewData.GetScrPos(rPos.Col(), rPos.Row(), eWhich); @@ -362,7 +363,7 @@ bool ScGridWindow::DPTestFieldPopupArrow( if (aRect.IsInside(rMEvt.GetPosPixel())) { // Mouse cursor inside the popup arrow box. Launch the field menu. - DPLaunchFieldPopupMenu(OutputToScreenPixel(aScrPos), aScrSize, rDimPos, pDPObj); + DPLaunchFieldPopupMenu(bLOK ? aScrPos : OutputToScreenPixel(aScrPos), aScrSize, rDimPos, pDPObj); return true; } diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 4994231f7b2b..a87f84f3682e 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2616,7 +2616,9 @@ void ScTabView::DoDPFieldPopup(OUString const & rPivotTableName, sal_Int32 nDime pDPObject->BuildAllDimensionMembers(); - Point aScreenPoint = pWin->OutputToScreenPixel(pWin->LogicToPixel(aPoint)); + Point aPos = pWin->LogicToPixel(aPoint); + bool bLOK = comphelper::LibreOfficeKit::isActive(); + Point aScreenPoint = bLOK ? aPos : pWin->OutputToScreenPixel(aPos); Size aScreenSize = pWin->LogicToPixel(aSize); pWin->DPLaunchFieldPopupMenu(aScreenPoint, aScreenSize, nDimensionIndex, pDPObject); diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 1bcc2517cb89..710eb57a49de 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -28,6 +28,7 @@ #include <vcl/timer.hxx> #include <vcl/idle.hxx> #include <vcl/settings.hxx> +#include <comphelper/lok.hxx> #include <svdata.hxx> #include <window.h> @@ -926,7 +927,9 @@ Point DockingWindow::GetFloatingPos() const aData.SetMask( WindowStateMask::Pos ); pWrapper->mpFloatWin->GetWindowStateData( aData ); Point aPos( aData.GetX(), aData.GetY() ); - aPos = pWrapper->mpFloatWin->GetParent()->ImplGetFrameWindow()->AbsoluteScreenToOutputPixel( aPos ); + // LOK needs logic coordinates not absolute screen position for autofilter menu + if (!comphelper::LibreOfficeKit::isActive() || get_id() != "check_list_menu") + aPos = pWrapper->mpFloatWin->GetParent()->ImplGetFrameWindow()->AbsoluteScreenToOutputPixel( aPos ); return aPos; } else