editeng/source/editeng/impedit.cxx | 5 ++++- sc/source/ui/app/inputhdl.cxx | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-)
New commits: commit 7ac26ea039ea0c355b80232e30c29a07e2bb027d Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Mar 29 08:45:52 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Jun 2 15:01:16 2022 +0200 tdf#148087 assert editing a cell with OnSelectionChange macro breakpoint assert was introduced in commit e1972743d692c8d8611912c31aae2cb08ae7636d Author: Noel Grandin <noelgran...@gmail.com> Date: Sun Sep 5 15:01:44 2021 +0200 be more disciplined with SetUpdateLayout on editengine We want to restore UpdateLayout when we're done doing layout, we should not just leave it FALSE Change-Id: Ic0431ffc3c66d0d02bfd10c323b18383f52dbc95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 8c373127d3db..87ddc0bcd994 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1739,8 +1739,11 @@ bool ImpEditView::MouseButtonDown( const MouseEvent& rMouseEvent ) nTravelXPos = TRAVEL_X_DONTKNOW; nExtraCursorFlags = GetCursorFlags::NONE; nCursorBidiLevel = CURSOR_BIDILEVEL_DONTKNOW; + bool bPrevUpdateLayout = pEditEngine->pImpEditEngine->SetUpdateLayout(true); bClickedInSelection = IsSelectionAtPoint( rMouseEvent.GetPosPixel() ); - return pEditEngine->pImpEditEngine->MouseButtonDown( rMouseEvent, GetEditViewPtr() ); + bool bRet = pEditEngine->pImpEditEngine->MouseButtonDown( rMouseEvent, GetEditViewPtr() ); + pEditEngine->pImpEditEngine->SetUpdateLayout(bPrevUpdateLayout); + return bRet; } bool ImpEditView::MouseMove( const MouseEvent& rMouseEvent ) diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index a1b7afa38976..3cd4c3cfaebf 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3133,6 +3133,8 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool bBeforeSavingInL } std::vector<editeng::MisspellRanges> aMisspellRanges; + // UpdateLayout must be true during CompleteOnlineSpelling + const bool bUpdateLayout = mpEditEngine->SetUpdateLayout( true ); mpEditEngine->CompleteOnlineSpelling(); bool bSpellErrors = !bFormulaMode && mpEditEngine->HasOnlineSpellErrors(); if ( bSpellErrors ) @@ -3399,6 +3401,8 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool bBeforeSavingInL bInOwnChange = false; bInEnterHandler = false; + if (bUpdateLayout) + mpEditEngine->SetUpdateLayout( true ); } void ScInputHandler::CancelHandler()