summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2020-02-26 18:48:46 +0300
committerAndras Timar <andras.timar@collabora.com>2020-03-04 21:19:58 +0100
commit9323307d675b71c501534ee98872a2f00b465bc2 (patch)
tree8a3e46ede5386a520d15ba8b6ffc3c3a77b8ae05 /sc
parentd08d5c1857482cb3789ed2896921abeb83f4d217 (diff)
fix ToC links give unhelpful url popups
core expects ctrl+click for internal links too and it should not expect it if it is tiled rendering Change-Id: Id841f0e9729e46f00988ea0b4eb29bd65098a740 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89559 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 3fe9dfca2d44d9e41ee329883f199359c673f382) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89919 Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5ca54bae2a93..d690b59fccc6 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2202,14 +2202,18 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if ( GetEditUrl( rMEvt.GetPosPixel(), &aName, &aUrl, &aTarget ) )
{
nMouseStatus = SC_GM_NONE; // Ignore double-click
-
+ bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
// ScGlobal::OpenURL() only understands Calc A1 style syntax.
// Convert it to Calc A1 before calling OpenURL().
if (pDoc->GetAddressConvention() == formula::FormulaGrammar::CONV_OOO)
{
+ if (aUrl.startsWith("#")) {
+ ScGlobal::OpenURL(aUrl, aTarget, isTiledRendering);
+ return;
+ }
// 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() &&
+ if (isTiledRendering &&
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
{
ScTabViewShell* pViewShell = pViewData->GetViewShell();
@@ -2260,7 +2264,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
aBuf.append('#');
OUString aUrlCalcA1(aTempAddr.Format(ScRefFlags::ADDR_ABS_3D, pDoc, formula::FormulaGrammar::CONV_OOO));
aBuf.append(aUrlCalcA1);
- ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget);
+ ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget, isTiledRendering);
}
}