sc/source/ui/view/gridwin4.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
New commits: commit 451ed0f27716906f2015f0c063f6c4ab3704ee66 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Tue Jan 10 10:56:18 2023 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Thu Jan 19 11:18:01 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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145769 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 07265d4cf23e..5b41a6227b54 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1176,7 +1176,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 @@ -1308,13 +1310,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