sc/source/ui/view/gridwin.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 62e201d2cf82f4ccaa6564bd2420ac6582594b8f
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: Tue Aug 29 16:49:20 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>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 275c9dbcec25..d5a6bf9db155 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1943,8 +1943,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

Reply via email to