sc/source/ui/view/gridwin4.cxx |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit dbb8d805dbea42fa5955c2f9b54a1d476592df7d
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Tue Jan 10 10:56:18 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jan 13 18:52:24 2023 +0000

    lok: adjust paint rect for in-place editing
    
    This allows to send correct cursor position (at the very end
    of the cell) when typing numbers in LOK mode.
    
    This fixes regression from:
    commit  9257486636dfe95b73e5690462ba6e8408a12166
    lok: sc: render expanded EditEngine when editing in-place
    
    Change-Id: I1f6c7ce3de7a2ba7ccbd4f9f9becd49e352cf05e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145260
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 6fdd332092de..31022c43144d 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1174,7 +1174,9 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
                             // Get top-left offset because of margin and 
indent.
                             lcl_GetEditAreaTLOffset(nOffsetX, nOffsetY, 
ScAddress(nCol1, nRow1, nTab), mrViewData, rDoc);
                             aEditRect.AdjustLeft(nOffsetX + 1);
+                            aEditRect.AdjustRight(1);
                             aEditRect.AdjustTop(nOffsetY + 1);
+                            aEditRect.AdjustBottom(1);
 
                             // EditView has an 'output area' which is used to 
clip the 'paint area' we provide below.
                             // So they need to be in the same 
coordinates/units. This is tied to the mapmode of the gridwin
@@ -1306,13 +1308,6 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
         // paint the editeng text
         if (bIsTiledRendering)
         {
-            tools::Rectangle aEditRect(aBackground);
-            tools::Long nOffsetX = 0, nOffsetY = 0;
-            // Get top-left offset because of margin and indent.
-            lcl_GetEditAreaTLOffset(nOffsetX, nOffsetY, ScAddress(nCol1, 
nRow1, mrViewData.GetTabNo()), mrViewData, rDoc);
-            aEditRect.AdjustLeft(nOffsetX + 1);
-            aEditRect.AdjustTop(nOffsetY + 1);
-
             // EditView has an 'output area' which is used to clip the paint 
area we provide below.
             // So they need to be in the same coordinates/units. This is tied 
to the mapmode of the gridwin
             // attached to the EditView, so we have to change its mapmode too 
(temporarily). We save the

Reply via email to