[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - sc/source sfx2/source
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 29 21:06:34 UTC 2020
sc/source/ui/view/gridwin.cxx | 16 +++++++++++++++-
sfx2/source/sidebar/SidebarDockingWindow.cxx | 11 +++++++----
2 files changed, 22 insertions(+), 5 deletions(-)
New commits:
commit cd7539be13dee445c643e43547313c57e01f9391
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Fri May 1 05:39:53 2020 +0530
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 29 22:01:57 2020 +0100
lokit: fix autofilter window position...
when client zoom is not 100%. The fix and the reasoning
is same as that in
lokit: fix validation dropdown's wrong position
3405f7f1b19738cad57b58259105ec87c1108466
Change-Id: I04837721d82b1e178cf5aa1130bbdaf77d13edae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93240
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 4e90c3c26127..4751dcb77b63 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -627,6 +627,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
{
SCTAB nTab = pViewData->GetTabNo();
ScDocument* pDoc = pViewData->GetDocument();
+ bool bLOKActive = comphelper::LibreOfficeKit::isActive();
mpAutoFilterPopup.disposeAndClear();
int nColWidth = ScViewData::ToPixel(pDoc->GetColWidth(nCol, nTab), pViewData->GetPPTX());
@@ -637,7 +638,8 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
// If NWF renders the focus rects itself, that breaks double-buffering.
mpAutoFilterPopup->RequestDoubleBuffering(true);
- if (comphelper::LibreOfficeKit::isActive())
+ mpAutoFilterPopup.reset(VclPtr<ScCheckListMenuWindow>::Create(this, pDoc));
+ if (bLOKActive)
mpAutoFilterPopup->SetLOKNotifier(SfxViewShell::Current());
mpAutoFilterPopup->setOKAction(new AutoFilterAction(this, AutoFilterMode::Normal));
mpAutoFilterPopup->setPopupEndAction(
@@ -649,6 +651,18 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
long nSizeX = 0;
long nSizeY = 0;
pViewData->GetMergeSizePixel(nCol, nRow, nSizeX, nSizeY);
+ if (bLOKActive)
+ {
+ // Reverse the zoom factor from aPos and nSize[X|Y]
+ // before letting the autofilter window convert the to twips
+ // with no zoom information.
+ double fZoomX(pViewData->GetZoomX());
+ double fZoomY(pViewData->GetZoomY());
+ aPos.setX(aPos.getX() / fZoomX);
+ aPos.setY(aPos.getY() / fZoomY);
+ nSizeX = nSizeX / fZoomX;
+ nSizeY = nSizeY / fZoomY;
+ }
tools::Rectangle aCellRect(OutputToScreenPixel(aPos), Size(nSizeX, nSizeY));
ScDBData* pDBData = pDoc->GetDBAtCursor(nCol, nRow, nTab, ScDBDataPortion::AREA);
commit 1ebc370887a88bda4ffa7b213b281cb893b8ad4d
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun May 10 16:34:25 2020 -0400
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 29 21:53:35 2020 +0100
sfx2: lok: separate sidebar notifications to mobile and desktop
If we have two notifiers for mobile and non-mobile,
we should check them separately, so we can support
one without the other.
Also, correctly check for null before dereferencing.
Change-Id: I3f21d2f4d5d430b7c876aaf4e90d5b4e55df04ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93944
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index 0544c998b8aa..8bb1f164c125 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -58,13 +58,12 @@ public:
void Invoke() override
{
- auto pNotifier = m_rSidebarDockingWin.GetLOKNotifier();
- auto pMobileNotifier = SfxViewShell::Current();
- if (!pNotifier || (!pMobileNotifier && !comphelper::LibreOfficeKit::isActive()))
+ if (!comphelper::LibreOfficeKit::isActive())
return;
try
{
+ auto pMobileNotifier = SfxViewShell::Current();
if (pMobileNotifier && pMobileNotifier->isLOKMobilePhone())
{
// Mobile.
@@ -81,7 +80,11 @@ public:
}
// Notify the sidebar is created, and its LOKWindowId, which
- // is needed on both Mobile and Desktop.
+ // is needed on mobile phones, tablets, and desktop.
+ auto pNotifier = m_rSidebarDockingWin.GetLOKNotifier();
+ if (!pNotifier)
+ return;
+
const Point pos(m_rSidebarDockingWin.GetOutOffXPixel(),
m_rSidebarDockingWin.GetOutOffYPixel());
const OString posMessage = pos.toString();
More information about the Libreoffice-commits
mailing list