diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2022-02-25 13:22:36 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2022-03-04 12:29:12 +0100 |
commit | 4b46b6376cbc1338ef18b6f85427a8c64c91ef87 (patch) | |
tree | 5bf41502372f4860fe21bd6ce4ed0d5e4c5a170b /sc | |
parent | bea00ffb1b6d65a276b8bc55a6e0135fb9bcf65b (diff) |
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 <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin2.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 4 |
3 files changed, 10 insertions, 5 deletions
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); |