From 7e406cf5df7d5110a2cbf85463efa042ef18640f Mon Sep 17 00:00:00 2001 From: Gülşah Köse Date: Mon, 19 Feb 2024 16:00:25 +0300 Subject: ONLINE: Add calc formula tooltip support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gülşah Köse Change-Id: I1f3c438f5152e2b372212d003c1ec4e74e4d3ff2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163651 Tested-by: Jenkins --- sc/source/ui/app/inputhdl.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'sc') diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 745e69158d3b..e0d9be5bdc97 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1109,6 +1109,10 @@ void ScInputHandler::HideTip() pTipVisibleParent = nullptr; } aManualTip.clear(); + + const SfxViewShell* pViewShell = SfxViewShell::Current(); + if (comphelper::LibreOfficeKit::isActive() && pViewShell) + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CALC_FUNCTION_LIST, "hidetip"_ostr); } void ScInputHandler::HideTipBelow() { @@ -1134,11 +1138,6 @@ bool lcl_hasSingleToken(std::u16string_view s, sal_Unicode c) void ScInputHandler::ShowArgumentsTip( OUString& rSelText ) { - if (comphelper::LibreOfficeKit::isActive()) - { - return; - } - if ( !pActiveViewSh ) return; @@ -1282,6 +1281,10 @@ void ScInputHandler::ShowArgumentsTip( OUString& rSelText ) ShowTipBelow( aNew ); bFound = true; } + + const SfxViewShell* pViewShell = SfxViewShell::Current(); + if (comphelper::LibreOfficeKit::isActive() && pViewShell->isLOKDesktop()) + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TOOLTIP, aNew.toUtf8()); } } } @@ -1430,7 +1433,7 @@ void ScInputHandler::ShowFuncList( const ::std::vector< OUString > & rFuncStrVec const SfxViewShell* pViewShell = SfxViewShell::Current(); if (comphelper::LibreOfficeKit::isActive()) { - if (rFuncStrVec.size() && pViewShell && pViewShell->isLOKMobilePhone()) + if (rFuncStrVec.size() && pViewShell) { auto aPos = pFormulaData->begin(); sal_uInt32 nCurIndex = std::distance(aPos, miAutoPosFormula); @@ -1483,7 +1486,6 @@ void ScInputHandler::ShowFuncList( const ::std::vector< OUString > & rFuncStrVec OString s = aPayload.makeStringAndClear(); pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CALC_FUNCTION_LIST, s); } - // not tunnel tooltips in the lok case return; } -- cgit