[Libreoffice-commits] core.git: 2 commits - sc/source

Andrzej Hunt andrzej at ahunt.org
Fri Nov 13 02:35:51 PST 2015


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

New commits:
commit 54e54c381fc067b700514b6305f0fe4a1ac7f0c4
Author: Andrzej Hunt <andrzej at ahunt.org>
Date:   Fri Nov 13 11:31:52 2015 +0100

    Remove outdated comment
    
    This has now been merged as:
    LOK: setClientZoom() - sets the client zoom level
    96cd2abd748ed24e5aba50cc4c300cf06e512db3
    
    Change-Id: I519a752dd9f18bb719a43f75f1ad3105f58418d9

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index e001e06..5eca603 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5824,8 +5824,6 @@ void ScGridWindow::updateLibreOfficeKitCellCursor()
 {
     ScDocument* pDoc = pViewData->GetDocument();
     ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
-    // TODO: the zoom levels here should be replaced by the setClientZoom values
-    // in a patch currently in gerrit (https://gerrit.libreoffice.org/#/c/19822/)
     OString aCursor = getCellCursor(pViewData->GetZoomX(), pViewData->GetZoomY());
     pDrawLayer->libreOfficeKitCallback(LOK_CALLBACK_CELL_CURSOR, aCursor.getStr());
 }
commit e77668eb1e7abe522493235dadfca08ca451ad99
Author: Andrzej Hunt <andrzej at ahunt.org>
Date:   Fri Nov 13 11:17:43 2015 +0100

    sc lok: during tiled rendering the cell-cursor is always visible
    
    Change-Id: Ia802c19f5bfd2fe2e9909e3c611047c529a64200

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 94b0be9..e001e06 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6010,7 +6010,9 @@ void ScGridWindow::UpdateCursorOverlay()
 
     const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab);
 
-    if (!maVisibleRange.isInside(nX, nY))
+    ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
+
+    if (!pDrawLayer->isTiledRendering() && !maVisibleRange.isInside(nX, nY))
     {
         if (maVisibleRange.mnCol2 < nX || maVisibleRange.mnRow2 < nY)
             return;     // no further check needed, nothing visible
@@ -6029,13 +6031,11 @@ void ScGridWindow::UpdateCursorOverlay()
     }
 
     //  don't show the cursor in overlapped cells
-
     const ScMergeFlagAttr& rMergeFlag = static_cast<const ScMergeFlagAttr&>( pPattern->GetItem(ATTR_MERGE_FLAG) );
     bool bOverlapped = rMergeFlag.IsOverlapped();
 
     //  left or above of the screen?
-
-    bool bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) );
+    bool bVis = pDrawLayer->isTiledRendering() || ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) );
     if (!bVis)
     {
         SCCOL nEndX = nX;
@@ -6065,7 +6065,7 @@ void ScGridWindow::UpdateCursorOverlay()
         }
 
         // in the tiled rendering case, don't limit to the screen size
-        if (bMaybeVisible)
+        if (bMaybeVisible || pDrawLayer->isTiledRendering())
         {
             long nSizeXPix;
             long nSizeYPix;
@@ -6108,8 +6108,6 @@ void ScGridWindow::UpdateCursorOverlay()
         }
     }
 
-    ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
-
     if ( !aPixelRects.empty() )
     {
         if (pDrawLayer->isTiledRendering()) {


More information about the Libreoffice-commits mailing list