summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-11-07 10:52:24 +0300
committerEike Rathke <erack@redhat.com>2020-11-17 19:29:24 +0100
commitfed6c4c70da6b35d72b670c8f4d8e866cdac21e4 (patch)
tree1316e292fbe15a9bce951e8fdfdafb507c5d8b9f
parenta46cb5dc607d1d1af402ff3e8fce731e7427854d (diff)
tdf#47349 sc ui: bPosVisible only for fully visible
So this is a regression-inviting guess at a wrong impl. And I am not a calc guy, so I shouldn't be making this kind of a change. The problem was that editingActive couldn't select cells from other sheets for some cells near the frozen border. The reason was that multiple splits are considered active at the same time, and so the editActive can be monkeyed with. Everything is all so interconnected that I get rather confused. This fix does not solve a same problem with a true window split, only with a window freeze. The freeze problem is that the left column was looking at the column (outside its view) and asked whether it fit inside the start X (0) + visible cells +1. So pretending typical freeze of row 0 and col 0, which means left starts at 0 and has 1 visible col. Left activates if col is 0, or 1, or 2. Since the only possible column in left is 0, it should only activate in that case. So visible cells should be --, not ++. Right? Of course, something probably depends on the editing view being turned on for partially visible cells on the right or bottom side, or perhaps even for the first invisible col/row, and so this will probably cause a regression. An alternative would be to -- for the left side and ++ for the right side (to increase confusion, but decrease regression potential). Change-Id: I946512bc7b3994f1750527a1a8c55954234b0d69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105429 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/ui/view/tabview3.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 11290711ab60..214f5a02ca3d 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2103,8 +2103,8 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW
SCROW nScrY = aViewData.GetPosY( eVWhich );
bool bPosVisible =
- ( nCol >= nScrX && nCol <= nScrX + aViewData.VisibleCellsX(eHWhich) + 1 &&
- nRow >= nScrY && nRow <= nScrY + aViewData.VisibleCellsY(eVWhich) + 1 );
+ ( nCol >= nScrX && nCol <= nScrX + aViewData.VisibleCellsX(eHWhich) - 1 &&
+ nRow >= nScrY && nRow <= nScrY + aViewData.VisibleCellsY(eVWhich) - 1 );
// for the active part, create edit view even if outside the visible area,
// so input isn't lost (and the edit view may be scrolled into the visible area)