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

Eike Rathke erack at redhat.com
Fri Nov 28 10:35:07 PST 2014


 sc/source/ui/view/tabview4.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit d042bef351af4649e656bfb8c60273149e5daeb5
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Nov 28 19:31:35 2014 +0100

    sanitize viewdata col/row values
    
    Change-Id: Iec51b032c96189b20cd43934c477b587da3011a7

diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 5ddd896..fba9ede 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -483,13 +483,10 @@ void ScTabView::InterpretVisible()
             ScHSplitPos eHWhich = WhichH( ScSplitPos(i) );
             ScVSplitPos eVWhich = WhichV( ScSplitPos(i) );
 
-            SCCOL   nX1 = aViewData.GetPosX( eHWhich );
-            SCROW   nY1 = aViewData.GetPosY( eVWhich );
-            SCCOL   nX2 = nX1 + aViewData.VisibleCellsX( eHWhich );
-            SCROW   nY2 = nY1 + aViewData.VisibleCellsY( eVWhich );
-
-            if (nX2 > MAXCOL) nX2 = MAXCOL;
-            if (nY2 > MAXROW) nY2 = MAXROW;
+            SCCOL   nX1 = SanitizeCol( aViewData.GetPosX( eHWhich ));
+            SCROW   nY1 = SanitizeRow( aViewData.GetPosY( eVWhich ));
+            SCCOL   nX2 = SanitizeCol( nX1 + aViewData.VisibleCellsX( eHWhich ));
+            SCROW   nY2 = SanitizeRow( nY1 + aViewData.VisibleCellsY( eVWhich ));
 
             pDoc->InterpretDirtyCells(ScRange(nX1, nY1, nTab, nX2, nY2, nTab));
         }


More information about the Libreoffice-commits mailing list