[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sc/source
Eike Rathke
erack at redhat.com
Fri Nov 28 10:55:34 PST 2014
sc/source/ui/view/tabview4.cxx | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
New commits:
commit bdb16ac8f35ab07f9c7ba7344bce8007d4ed0b88
Author: Eike Rathke <erack at redhat.com>
Date: Fri Nov 28 19:31:35 2014 +0100
sanitize viewdata col/row values
Change-Id: Iec51b032c96189b20cd43934c477b587da3011a7
(cherry picked from commit d042bef351af4649e656bfb8c60273149e5daeb5)
Reviewed-on: https://gerrit.libreoffice.org/13179
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index e537080..56d3c22 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -480,13 +480,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