editeng/source/editeng/editview.cxx | 9 ++++++--- include/editeng/editview.hxx | 2 +- sc/source/ui/app/inputhdl.cxx | 7 +++++-- 3 files changed, 12 insertions(+), 6 deletions(-)
New commits: commit 01f86c59531b29cd06dd53a7a6e4556fb97cbb24 Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Wed Feb 24 00:59:17 2021 +0530 Commit: Pranam Lashkari <lpra...@collabora.com> CommitDate: Wed Feb 24 15:36:53 2021 +0100 avoid LOK text selection update when reference cell is in different tab Change-Id: I511b9c5a27f97b6e14e9a844179c27a96997abe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111315 Tested-by: Jenkins Reviewed-by: Pranam Lashkari <lpra...@collabora.com> diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 7f0a0bb7a809..5ae9c1770e64 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -415,11 +415,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 ) @@ -441,7 +443,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 ) diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 05e59a4753fd..3876a9a75d05 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -222,7 +222,7 @@ public: vcl::Cursor* GetCursor() const; - void InsertText( const OUString& rNew, bool bSelect = false ); + void InsertText( const OUString& rNew, bool bSelect = false , bool bLOKShowSelect = true); void InsertParaBreak(); bool PostKeyEvent( const KeyEvent& rKeyEvent, vcl::Window const * pFrameWin = nullptr ); diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 7465205fa089..540d342728ac 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3473,13 +3473,16 @@ void ScInputHandler::SetReference( const ScRange& rRef, const ScDocument& rDoc ) else aRefStr = rRef.Format(rDoc, ScRefFlags::VALID, aAddrDetails); } + bool bLOKShowSelect = true; + if(comphelper::LibreOfficeKit::isActive() && pRefViewSh->GetViewData().GetRefTabNo() != pRefViewSh->GetViewData().GetTabNo()) + bLOKShowSelect = false; if (pTableView || pTopView) { if (pTableView) - pTableView->InsertText( aRefStr, true ); + pTableView->InsertText( aRefStr, true, bLOKShowSelect ); if (pTopView) - pTopView->InsertText( aRefStr, true ); + pTopView->InsertText( aRefStr, true, bLOKShowSelect ); DataChanged(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits