diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index d00e60d12cfa..c91bad553478 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -745,10 +745,10 @@ static BOOL lcl_GetCellContent( ScBaseCell* pCell, BOOL bIsStr1, double& rArg, S static BOOL lcl_IsDuplicate( ScDocument *pDoc, double nArg, const String& rStr, const ScAddress& rAddr, const ScRangeListRef& rRanges ) { - ULONG nListCount = rRanges->Count(); - for( ULONG i = 0; i < nListCount; i++ ) + size_t nListCount = rRanges->size(); + for( size_t i = 0; i < nListCount; i++ ) { - ScRange *aRange = rRanges->GetObject(i); + const ScRange *aRange = (*rRanges)[i]; SCROW nRow = aRange->aEnd.Row(); SCCOL nCol = aRange->aEnd.Col(); for( SCROW r = aRange->aStart.Row(); r <= nRow; r++ ) diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 71480dce5670..90d03fa7236e 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -98,10 +98,9 @@ static void lcl_PostRepaintCondFormat( const ScConditionalFormat *pCondFmt, ScDo if( pCondFmt ) { const ScRangeListRef& aRanges = pCondFmt->GetRangeInfo(); - ULONG nCount = aRanges->Count(); - ULONG n; - for( n = 0 ; n < nCount; n++ ) - pDocSh->PostPaint( *aRanges->GetObject( n ), PAINT_ALL ); + size_t nCount = aRanges->size(); + for( size_t n = 0 ; n < nCount; n++ ) + pDocSh->PostPaint( *((*aRanges)[n]), PAINT_ALL ); } }