[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - editeng/source include/editeng sc/source
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 24 14:36:44 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 8fd3d2a1ed6e64cfeac49b9a1758d1a320371f74
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Wed Feb 24 00:59:17 2021 +0530
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Feb 24 15:36:07 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/+/111346
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
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 )
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 282d5e0d200e..a7c714079fee 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -198,7 +198,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 0c7e80720e0d..7e0bb9272970 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3452,13 +3452,16 @@ void ScInputHandler::SetReference( const ScRange& rRef, const ScDocument* pDoc )
else
aRefStr = rRef.Format(ScRefFlags::VALID, pDoc, 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