summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewdata.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-01-29 14:52:48 +0000
committerRüdiger Timm <rt@openoffice.org>2008-01-29 14:52:48 +0000
commitad2606ab3577c586be54d1dd965d524d50ce199d (patch)
treed83d0d8ada4ee6870f15f6ae27467be568999e70 /sc/source/ui/view/viewdata.cxx
parent8782cdcb10b4cb79665075fd2a7c1202eb5770a3 (diff)
INTEGRATION: CWS dr58_SRC680 (1.60.24); FILE MERGED
2008/01/14 13:07:06 nn 1.60.24.4: #i84689# handle hidden rows at the end of the sheet correctly 2008/01/11 13:25:30 dr 1.60.24.3: RESYNC: (1.60-1.61); FILE MERGED 2008/01/10 19:59:41 nn 1.60.24.2: #i84689# skip multiple hidden rows also in GetScrPos 2008/01/09 19:45:45 nn 1.60.24.1: #i84689# improve performance of repaint notifications from conditional formats
Diffstat (limited to 'sc/source/ui/view/viewdata.cxx')
-rw-r--r--sc/source/ui/view/viewdata.cxx26
1 files changed, 24 insertions, 2 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index bc2e0e891dc1..d38d59ebe21e 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: viewdata.cxx,v $
*
- * $Revision: 1.62 $
+ * $Revision: 1.63 $
*
- * last change: $Author: obo $ $Date: 2008-01-10 13:21:14 $
+ * last change: $Author: rt $ $Date: 2008-01-29 15:52:48 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1562,6 +1562,15 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
long nSizeYPix = ToPixel( nTSize, nPPTY );
nScrPosY += nSizeYPix;
}
+ else if ( nY < MAXROW )
+ {
+ // skip multiple hidden rows (forward only for now)
+ SCROW nNext = pDoc->FastGetFirstNonHiddenRow( nY + 1, nTabNo );
+ if ( nNext > MAXROW )
+ nY = MAXROW;
+ else
+ nY = nNext - 1; // +=nDir advances to next visible row
+ }
}
}
else if (bAllowNeg)
@@ -1665,6 +1674,19 @@ SCROW ScViewData::CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, USHO
long nSizeYPix = ToPixel( nTSize, nPPTY );
nScrPosY = sal::static_int_cast<USHORT>( nScrPosY + (USHORT) nSizeYPix );
}
+ else if ( nDir == 1 && nRowNo < MAXROW )
+ {
+ // skip multiple hidden rows (forward only for now)
+ SCROW nNext = pDoc->FastGetFirstNonHiddenRow( nRowNo + 1, nTabNo );
+ if ( nNext > MAXROW )
+ {
+ // same behavior as without the optimization: set bOut with nY=MAXROW+1
+ nY = MAXROW+1;
+ bOut = TRUE;
+ }
+ else
+ nY = nNext - 1; // +=nDir advances to next visible row
+ }
}
}