From 4d3f9005a105cc3d1d4cf992cbcc1e98f597a837 Mon Sep 17 00:00:00 2001 From: Pranam Lashkari Date: Wed, 24 Feb 2021 00:59:17 +0530 Subject: avoid LOK text selection update when reference cell is in different tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I511b9c5a27f97b6e14e9a844179c27a96997abe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111346 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos --- editeng/source/editeng/editview.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'editeng/source/editeng/editview.cxx') diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index b5eeb327aa12..aa003718b139 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -416,11 +416,13 @@ vcl::Cursor* EditView::GetCursor() const return pImpEditView->pCursor.get(); } -void EditView::InsertText( const OUString& rStr, bool bSelect ) +void EditView::InsertText( const OUString& rStr, bool bSelect, bool bLOKShowSelect ) { EditEngine* pEE = pImpEditView->pEditEngine; - pImpEditView->DrawSelectionXOR(); + + if (bLOKShowSelect) + pImpEditView->DrawSelectionXOR(); EditPaM aPaM1; if ( bSelect ) @@ -442,7 +444,8 @@ void EditView::InsertText( const OUString& rStr, bool bSelect ) else pImpEditView->SetEditSelection( EditSelection( aPaM2, aPaM2 ) ); - pEE->FormatAndUpdate( this ); + if (bLOKShowSelect) + pEE->FormatAndUpdate( this ); } bool EditView::PostKeyEvent( const KeyEvent& rKeyEvent, vcl::Window const * pFrameWin ) -- cgit v1.2.3