sc/source/ui/view/gridwin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit dc057620aa4652baa73301cf668511b1fd33190f Author: Czeber László Ádám <czeber.laszloa...@nisz.hu> AuthorDate: Fri Aug 11 10:31:24 2023 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Wed Aug 30 11:58:19 2023 +0200 tdf#155495 sc: fix cursor positioning editing centered/right-aligned cells It was not always possible to place the cursor in edited text by mouse clicking in case of centered and right-aligned cell content, i.e. when the edited content has been shown before the original (not edited) cell position. Now it's possible to place the cursor by mouse clicking before the left border of the not edited cell (instead of selecting other cells covered by the edited content). Change-Id: I23c59ca3ef67d223181a7e3dfd71b84f43fca32b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155579 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> (cherry picked from commit f8561c0098012b0f76ccf9b5c368a06dcecaf62e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156217 Tested-by: Jenkins diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index e68300c0b369..78a8db5e3d25 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1930,8 +1930,9 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta mrViewData.GetEditView( eWhich, pEditView, nEditCol, nEditRow ); SCCOL nEndCol = mrViewData.GetEditEndCol(); SCROW nEndRow = mrViewData.GetEditEndRow(); + SCCOL nStartCol = mrViewData.GetEditStartCol(); - if ( nPosX >= nEditCol && nPosX <= nEndCol && + if ( nPosX >= nStartCol && nPosX <= nEndCol && nPosY >= nEditRow && nPosY <= nEndRow ) { // when clicking in the table EditView, always reset the focus