diff options
author | Henry Castro <hcvcastro@gmail.com> | 2015-01-09 09:12:40 -0400 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-01-12 13:44:23 +0000 |
commit | 9efcdb9ef5e7a45d48b07bd91f2fe000baaf5fd6 (patch) | |
tree | 41873777086fe3f5858bed2e314089e18d77de10 | |
parent | b460414bcd1dfd2f260696e306c49c56585c6464 (diff) |
fdo#87382 Improper display of selected merged
When left most cell is not in the visible window, Visible Range
was not checked merged cells.
Change-Id: I3c375c0f584e29444472224c74442bbd3d97b3ac
Reviewed-on: https://gerrit.libreoffice.org/13832
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit d987ed29051b184aeb5151c1e080ad22c4637835)
Reviewed-on: https://gerrit.libreoffice.org/13873
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 7b27f0caae98..9ea1d21bdbf3 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5740,12 +5740,17 @@ void ScGridWindow::UpdateCursorOverlay() SCCOL nX = pViewData->GetCurX(); SCROW nY = pViewData->GetCurY(); - if (!maVisibleRange.isInside(nX, nY)) + ScDocument* pDoc = pViewData->GetDocument(); + const ScMergeAttr* pMerge = (const ScMergeAttr*) pDoc->GetAttr(nX, nY, nTab, ATTR_MERGE); + + // fdo#87382 Also display the cell cursor for the visible part of merged + // cells if the cell position is part of merged cells. + if (!(maVisibleRange.isInside(nX, nY) || + maVisibleRange.isInside(nX + pMerge->GetColMerge(), nY + pMerge->GetRowMerge()))) return; // don't show the cursor in overlapped cells - ScDocument* pDoc = pViewData->GetDocument(); const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab); const ScMergeFlagAttr& rMergeFlag = static_cast<const ScMergeFlagAttr&>( pPattern->GetItem(ATTR_MERGE_FLAG) ); bool bOverlapped = rMergeFlag.IsOverlapped(); |