sc/source/ui/app/inputhdl.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
New commits: commit c48151369f04c4f01dceb0ca31cf23287aa8d676 Author: Gülşah Köse <gulsah.k...@collabora.com> AuthorDate: Mon Feb 19 16:00:25 2024 +0300 Commit: Gülşah Köse <gulsah.k...@collabora.com> CommitDate: Fri Feb 23 11:29:03 2024 +0100 ONLINE: Add calc formula tooltip support. Signed-off-by: Gülşah Köse <gulsah.k...@collabora.com> Change-Id: I1f3c438f5152e2b372212d003c1ec4e74e4d3ff2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163594 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 1f5ae2869c6e..aede676ebdde 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1113,6 +1113,12 @@ void ScInputHandler::HideTip() pTipVisibleParent = nullptr; } aManualTip.clear(); + + const SfxViewShell* pViewShell = SfxViewShell::Current(); + if (comphelper::LibreOfficeKit::isActive() && pViewShell) { + OUString sHideMsg = "hidetip"; + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CALC_FUNCTION_LIST, sHideMsg.toUtf8().getStr()); + } } void ScInputHandler::HideTipBelow() { @@ -1138,11 +1144,6 @@ bool lcl_hasSingleToken(std::u16string_view s, sal_Unicode c) void ScInputHandler::ShowArgumentsTip( OUString& rSelText ) { - if (comphelper::LibreOfficeKit::isActive()) - { - return; - } - if ( !pActiveViewSh ) return; @@ -1286,6 +1287,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().getStr()); } } } @@ -1434,7 +1439,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); @@ -1488,7 +1493,6 @@ void ScInputHandler::ShowFuncList( const ::std::vector< OUString > & rFuncStrVec OString s = aPayload.makeStringAndClear(); pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CALC_FUNCTION_LIST, s.getStr()); } - // not tunnel tooltips in the lok case return; }