[Libreoffice-commits] core.git: sc/source
Mert Tumer (via logerrit)
logerrit at kemper.freedesktop.org
Sat Feb 29 18:38:36 UTC 2020
sc/source/ui/view/gridwin.cxx | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
New commits:
commit 91228affd8996d9690b0abfa9544a18701ee3ec3
Author: Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Thu Feb 20 18:33:04 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Feb 29 19:38:03 2020 +0100
send hyperlinkclicked callback on calc mobile
for opening links ctrl+click must be pressed
but in mobile this cant be done
This patch allows it to send the callback and also
cell coordinates for hyperlink popup
Change-Id: I8c0fac167627ef449d9cf20a36a7a5a77978ae0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89121
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
(cherry picked from commit 9bfa939f87f28cdaed2a24c3dc5f9a21004b19da)
Blind build fix for Android
After 9bfa939f87f28cdaed2a24c3dc5f9a21004b19da
Also, replace chained OStringBuffer::append() with operator+
Change-Id: I7012667b3c4173cc0193720e0197992e5942bc7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89164
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89693
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index ef07ea912115..5ca54bae2a93 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2206,7 +2206,26 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
// ScGlobal::OpenURL() only understands Calc A1 style syntax.
// Convert it to Calc A1 before calling OpenURL().
if (pDoc->GetAddressConvention() == formula::FormulaGrammar::CONV_OOO)
- ScGlobal::OpenURL(aUrl, aTarget);
+ {
+ // in mobile view there is no ctrl+click and for hyperlink popup
+ // the cell coordinates must be sent along with click position for elegance
+ if (comphelper::LibreOfficeKit::isActive() &&
+ comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ {
+ ScTabViewShell* pViewShell = pViewData->GetViewShell();
+ Point aPos = rMEvt.GetPosPixel();
+ SCCOL nPosX;
+ SCROW nPosY;
+ pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
+ auto pForTabView = dynamic_cast<const ScTabViewShell *>(pViewShell);
+ OString aCursor = pForTabView->GetViewData().describeCellCursorAt(nPosX, nPosY);
+ double fPPTX = pForTabView->GetViewData().GetPPTX();
+ int mouseX = aPos.X() / fPPTX;
+ OString aMsg(aUrl.toUtf8() + " coordinates: " + aCursor + ", " + OString::number(mouseX));
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, aMsg.getStr());
+ } else
+ ScGlobal::OpenURL(aUrl, aTarget);
+ }
else
{
ScAddress aTempAddr;
More information about the Libreoffice-commits
mailing list