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 <fitojb@ubuntu.com>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 1b7c16f..2762929 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();