[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sc/source

Henry Castro hcvcastro at gmail.com
Mon Jan 12 05:44:50 PST 2015


 sc/source/ui/view/gridwin.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 9efcdb9ef5e7a45d48b07bd91f2fe000baaf5fd6
Author: Henry Castro <hcvcastro at gmail.com>
Date:   Fri Jan 9 09:12:40 2015 -0400

    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 at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit d987ed29051b184aeb5151c1e080ad22c4637835)
    Reviewed-on: https://gerrit.libreoffice.org/13873

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 7b27f0c..9ea1d21 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();


More information about the Libreoffice-commits mailing list