sc/source/ui/app/inputhdl.cxx |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit c86f6421524c187fa75a19c6e8ba09bd800d3518
Author:     Gülşah Köse <gulsah.k...@collabora.com>
AuthorDate: Mon Feb 19 16:00:25 2024 +0300
Commit:     Pedro Silva <pedro.si...@collabora.com>
CommitDate: Fri Feb 23 10:07:26 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/+/163721
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 9b45a88b1d31..62a7d7b9bf09 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;
     }
 

Reply via email to