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

New commits:
commit 9e7d70230212ab95cda957a0fe51e37f7ca95021
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Mon Apr 29 16:29:57 2024 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Tue Apr 30 09:21:45 2024 +0200

    Related tdf#143733 - Cell focus must not cover content
    
    This patch moves the cell focus rectangle outside the active cell,
    relative to the zoom factor
    
    Change-Id: I9df98125d5c0e571af841442d4db8f02d3c05487
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166870
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 1b7c16f1884b..2762929ccb9b 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6589,11 +6589,15 @@ void ScGridWindow::UpdateCursorOverlay()
             tools::Long nSizeYPix;
             mrViewData.GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
 
+            const double nAdjustBorder(mrViewData.GetZoomX() * 3);
+            aScrPos.AdjustX(-nAdjustBorder);
+            aScrPos.AdjustY(-nAdjustBorder);
+
             if (bLayoutRTL)
                 aScrPos.AdjustX( -(nSizeXPix - 2) );       // move instead of 
mirroring
 
             // show the cursor as 4 (thin) rectangles
-            tools::Rectangle aRect(aScrPos, Size(nSizeXPix - 1, nSizeYPix - 
1));
+            tools::Rectangle aRect(aScrPos, Size(nSizeXPix + 2*nAdjustBorder, 
nSizeYPix + 2*nAdjustBorder));
 
             float fScaleFactor = GetDPIScaleFactor();
 

Reply via email to