[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - editeng/source include/editeng sc/source
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 2 17:49:36 UTC 2021
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 c488acfc2d163b421e07518597668d18c7b88a67
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Wed Feb 24 00:59:17 2021 +0530
Commit: Pranam Lashkari <lpranam at collabora.com>
CommitDate: Fri Apr 2 19:49:03 2021 +0200
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 <lpranam at collabora.com>
(cherry picked from commit 01f86c59531b29cd06dd53a7a6e4556fb97cbb24)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113536
Tested-by: Pranam Lashkari <lpranam at collabora.com>
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 8e7c62f224e6..82cb86add8dd 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 e89cd356be72..fdd80b38a926 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -212,7 +212,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 96f90e672afe..5555e2ba9874 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3474,13 +3474,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();
}
More information about the Libreoffice-commits
mailing list