sc/source/ui/app/inputwin.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 679abf198166220ea5cdc1c6eea1059bd9bb693f
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Tue Dec 7 14:42:47 2021 +0100
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Wed Feb 2 12:41:07 2022 +0100

    disable ScPosWnd completely in LOK mode
    
    366e328dc7f36061971c549c2d33d365026b65ca already mostly disabled it,
    but the instance was still created, and it sets up listening that
    results in ScPosWnd::FillRangeNames() getting called on every
    SfxLokHelper::setView(), which forms the major cost of the view
    switching.
    
    Change-Id: Ic16da4bdfb678d53a79da57e9bbdcb7fc59c576d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126444
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Tested-by: Marco Cecchetti <marco.cecche...@collabora.com>
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 3072395788e9..c089b2c27e21 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -154,7 +154,7 @@ static VclPtr<ScInputBarGroup> lcl_chooseRuntimeImpl( 
vcl::Window* pParent, cons
 ScInputWindow::ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ) 
:
         // With WB_CLIPCHILDREN otherwise we get flickering
         ToolBox         ( pParent, WinBits(WB_CLIPCHILDREN | WB_BORDER | 
WB_NOSHADOW) ),
-        aWndPos         ( VclPtr<ScPosWnd>::Create(this) ),
+        aWndPos         ( !comphelper::LibreOfficeKit::isActive() ? 
VclPtr<ScPosWnd>::Create(this) : nullptr ),
         mxTextWindow    ( lcl_chooseRuntimeImpl( this, pBind ) ),
         pInputHdl       ( nullptr ),
         mpViewShell     ( nullptr ),
@@ -587,7 +587,8 @@ void ScInputWindow::SetFuncString( const OUString& rString, 
bool bDoEdit )
 
 void ScInputWindow::SetPosString( const OUString& rStr )
 {
-    aWndPos->SetPos( rStr );
+    if (!comphelper::LibreOfficeKit::isActive())
+        aWndPos->SetPos( rStr );
 }
 
 void ScInputWindow::SetTextString( const OUString& rString )
@@ -646,7 +647,8 @@ void ScInputWindow::SetSumAssignMode()
 
 void ScInputWindow::SetFormulaMode( bool bSet )
 {
-    aWndPos->SetFormulaMode(bSet);
+    if (!comphelper::LibreOfficeKit::isActive())
+        aWndPos->SetFormulaMode(bSet);
     mxTextWindow->SetFormulaMode(bSet);
 }
 
@@ -711,7 +713,8 @@ void ScInputWindow::SwitchToTextWin()
 
 void ScInputWindow::PosGrabFocus()
 {
-    aWndPos->GrabFocus();
+    if (!comphelper::LibreOfficeKit::isActive())
+        aWndPos->GrabFocus();
 }
 
 void ScInputWindow::EnableButtons( bool bEnable )

Reply via email to