summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-12-10 16:07:50 -0500
committerKohei Yoshida <kyoshida@novell.com>2010-12-10 16:08:27 -0500
commit75c0b752865ac42b9c70c9588f995a86a0e62a22 (patch)
treee49689b021486a899914e05355553e9fecdcf4ba /sc
parentf6136ef422ae27f536629e128dff2bf34daa01d5 (diff)
Removed ScRangeList::at() in favor of operator[].
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/rangelst.hxx2
-rw-r--r--sc/source/core/data/conditio.cxx2
-rw-r--r--sc/source/core/data/documen5.cxx4
-rw-r--r--sc/source/core/data/document.cxx6
-rw-r--r--sc/source/core/data/table2.cxx2
-rw-r--r--sc/source/core/tool/chartpos.cxx8
-rw-r--r--sc/source/core/tool/rangelst.cxx10
-rw-r--r--sc/source/core/tool/rangeutl.cxx2
-rw-r--r--sc/source/filter/html/htmlpars.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx2
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx8
-rw-r--r--sc/source/ui/docshell/docsh3.cxx2
-rw-r--r--sc/source/ui/undo/undoblk.cxx6
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx4
-rw-r--r--sc/source/ui/view/cellsh.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx4
-rw-r--r--sc/source/ui/view/gridwin4.cxx5
-rw-r--r--sc/source/ui/view/hdrcont.cxx6
-rw-r--r--sc/source/ui/view/tabview3.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx16
-rw-r--r--sc/source/ui/view/viewfun3.cxx4
-rw-r--r--sc/source/ui/view/viewfun4.cxx4
-rw-r--r--sc/source/ui/view/viewfun6.cxx4
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
28 files changed, 49 insertions, 70 deletions
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx
index ddedc9fe419d..4c65e31e9e36 100644
--- a/sc/inc/rangelst.hxx
+++ b/sc/inc/rangelst.hxx
@@ -80,8 +80,6 @@ public:
bool empty() const;
size_t size() const;
- ScRange* at(size_t idx);
- const ScRange* at(size_t idx) const;
ScRange* operator[](size_t idx);
const ScRange* operator[](size_t idx) const;
ScRange* front();
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 0312df468feb..334d5868e883 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1372,7 +1372,7 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
}
for (size_t i = 0, nCount = pAreas->size(); i < nCount; i++ )
{
- ScRange aRange = *pAreas->at( i );
+ ScRange aRange = *(*pAreas)[i];
BOOL bDo = TRUE;
if ( pModified )
{
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index c0509466566b..4a6136fa2e3c 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -397,7 +397,7 @@ void ScDocument::UpdateChartArea( const String& rChartName,
aNewRanges->Parse( aRangesStr, this );
for ( size_t nAdd = 0, nAddCount = rNewList->size(); nAdd < nAddCount; ++nAdd )
- aNewRanges->Append( *rNewList->at( nAdd ) );
+ aNewRanges->Append( *(*rNewList)[nAdd] );
}
else
{
@@ -514,7 +514,7 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
BOOL bDataChanged = FALSE;
for ( size_t i = 0, nListSize = aRLR->size(); i < nListSize; ++i )
{
- ScRange* pR = aRLR->at( i );
+ ScRange* pR = (*aRLR)[i];
SCCOL theCol1 = pR->aStart.Col();
SCROW theRow1 = pR->aStart.Row();
SCTAB theTab1 = pR->aStart.Tab();
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 7a9b32dfbb6c..83e6db4988f7 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -754,7 +754,7 @@ void ScDocument::LimitChartIfAll( ScRangeListRef& rRangeList )
{
for ( size_t i = 0, nCount = rRangeList->size(); i < nCount; i++ )
{
- ScRange aRange( *rRangeList->at( i ) );
+ ScRange aRange( *(*rRangeList)[i] );
if ( ( aRange.aStart.Col() == 0 && aRange.aEnd.Col() == MAXCOL ) ||
( aRange.aStart.Row() == 0 && aRange.aEnd.Row() == MAXROW ) )
{
@@ -1909,7 +1909,7 @@ void ScDocument::UpdateRangeNamesInFormulas(
// then update the formulas, they might need just the updated range names
for ( size_t nRange = 0, n = rDestRanges.size(); nRange < n; ++nRange )
{
- const ScRange* pRange = rDestRanges.at( nRange);
+ const ScRange* pRange = rDestRanges[nRange];
SCCOL nCol1 = pRange->aStart.Col();
SCROW nRow1 = pRange->aStart.Row();
SCCOL nCol2 = pRange->aEnd.Col();
@@ -2242,7 +2242,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
SCROW nClipEndRow = aClipRange.aEnd.Row();
for ( size_t nRange = 0; nRange < pDestRanges->size(); ++nRange )
{
- const ScRange* pRange = pDestRanges->at( nRange);
+ const ScRange* pRange = (*pDestRanges)[nRange];
SCCOL nCol1 = pRange->aStart.Col();
SCROW nRow1 = pRange->aStart.Row();
SCCOL nCol2 = pRange->aEnd.Col();
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 73bb04155fd9..be8430e3efe9 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -926,7 +926,7 @@ BOOL ScTable::HasScenarioRange( const ScRange& rRange ) const
{
for ( size_t j = 0, n = pList->size(); j < n; j++ )
{
- const ScRange* pR = pList->at( j );
+ const ScRange* pR = (*pList)[j];
if ( pR->Intersects( aTabRange ) )
return TRUE;
}
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index e689546968a9..06d508308981 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -144,7 +144,7 @@ void ScChartPositioner::GlueState()
if ( (n2 = pR->aEnd.Row() ) > nEndRow ) nEndRow = static_cast<SCROW>(n2 );
if ( (nTmp = n2 - n1 + 1 ) > nMaxRows ) nMaxRows = static_cast<SCROW>(nTmp);
if ( i < nRanges ) // in last pass; i = nRanges so don't use at()
- pR = aRangeListRef->at( i );
+ pR = (*aRangeListRef)[i];
}
SCCOL nC = nEndCol - nStartCol + 1;
if ( nC == 1 )
@@ -196,7 +196,7 @@ void ScChartPositioner::GlueState()
SCROW nRow, nRow1, nRow2;
for ( size_t i = 0, nRanges = aRangeListRef->size(); i < nRanges; ++i )
{ // Selektionen 2D als belegt markieren
- pR = aRangeListRef->at( i );
+ pR = (*aRangeListRef)[i];
nCol1 = pR->aStart.Col() - nStartCol;
nCol2 = pR->aEnd.Col() - nStartCol;
nRow1 = pR->aStart.Row() - nStartRow;
@@ -326,7 +326,7 @@ void ScChartPositioner::CheckColRowHeaders()
++i
)
{
- ScRange* pR = aRangeListRef->at( i );
+ ScRange* pR = (*aRangeListRef)[i];
pR->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
BOOL bTopRow = (nRow1 == nStartRow);
if ( bRowStrings && (bVert || nCol1 == nStartCol) )
@@ -397,7 +397,7 @@ void ScChartPositioner::CreatePositionMap()
SCROW nNoGlueRow = 0;
for ( size_t i = 0, nRanges = aRangeListRef->size(); i < nRanges; ++i )
{
- ScRange* pR = aRangeListRef->at( i );
+ ScRange* pR = (*aRangeListRef)[i];
pR->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
for ( nTab = nTab1; nTab <= nTab2; nTab++ )
{
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 35d9b3d77c2f..62196b11f4dc 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -482,16 +482,6 @@ size_t ScRangeList::size() const
return maRanges.size();
}
-ScRange* ScRangeList::at(size_t idx)
-{
- return maRanges.at(idx);
-}
-
-const ScRange* ScRangeList::at(size_t idx) const
-{
- return maRanges.at(idx);
-}
-
ScRange* ScRangeList::operator [](size_t idx)
{
return maRanges[idx];
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 1697edcd8979..c5199519bf12 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -725,7 +725,7 @@ void ScRangeStringConverter::GetStringFromRangeList(
{
for( size_t nIndex = 0, nCount = pRangeList->size(); nIndex < nCount; nIndex++ )
{
- const ScRange* pRange = pRangeList->at( nIndex );
+ const ScRange* pRange = (*pRangeList)[nIndex];
if( pRange )
GetStringFromRange( sRangeListStr, *pRange, pDocument, eConv, cSeperator, sal_True, nFormatFlags );
}
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 88bf47f5d7c1..2686f1f9ac52 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -372,7 +372,7 @@ void ScHTMLLayoutParser::SkipLocked( ScEEParseEntry* pE, BOOL bJoin )
bAgain = FALSE;
for ( size_t i = 0, nRanges = xLockedList->size(); i < nRanges; ++i )
{
- ScRange* pR = xLockedList->at( i );
+ ScRange* pR = (*xLockedList)[i];
if ( pR->Intersects( aRange ) )
{
pE->nCol = pR->aEnd.Col() + 1;
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 84e305ca43ab..b72eaf1563ff 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1218,7 +1218,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
for( size_t nRange = 0; (nRange < pRList->size()) && bContLoop; nRange++ )
{
- const ScRange* pRange = pRList->at( nRange );
+ const ScRange* pRange = (*pRList)[nRange];
for( nRow = pRange->aStart.Row(); (nRow <= pRange->aEnd.Row()) && bContLoop; nRow++ )
for( nCol = pRange->aStart.Col(); (nCol <= pRange->aEnd.Col()) && bContLoop; nCol++ )
{
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index 37f925e36682..bc0063fd07df 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -223,7 +223,7 @@ void ScMyStyleRanges::SetStylesToRanges(ScRangeList* pList,
const rtl::OUString* pCurrency, ScXMLImport& rImport)
{
for ( size_t i = 0, nCount = pList->size(); i < nCount; ++i)
- rImport.SetStyleToRange( *pList->at(i), pStyleName, nCellType, pCurrency );
+ rImport.SetStyleToRange( *(*pList)[i], pStyleName, nCellType, pCurrency );
}
void ScMyStyleRanges::SetStylesToRanges(ScRangeListRef xList,
@@ -231,7 +231,7 @@ void ScMyStyleRanges::SetStylesToRanges(ScRangeListRef xList,
const rtl::OUString* pCurrency, ScXMLImport& rImport)
{
for (size_t i = 0, nCount = xList->size(); i < nCount; ++i)
- rImport.SetStyleToRange( *xList->at(i), pStyleName, nCellType, pCurrency );
+ rImport.SetStyleToRange( *(*xList)[i], pStyleName, nCellType, pCurrency );
}
void ScMyStyleRanges::SetStylesToRanges(const rtl::OUString* pStyleName, ScXMLImport& rImport)
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 3b9ab105ce56..8fc350f439bb 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -766,7 +766,7 @@ void ScAccessibleSpreadsheet::CreateSortedMarkedCells()
mpSortedMarkedCells->reserve(mpMarkedRanges->GetCellCount());
for ( size_t i = 0, ListSize = mpMarkedRanges->size(); i < ListSize; ++i )
{
- ScRange* pRange = mpMarkedRanges->at( i );
+ ScRange* pRange = (*mpMarkedRanges)[i];
if (pRange->aStart.Tab() != pRange->aEnd.Tab())
{
if ((maActiveCell.Tab() >= pRange->aStart.Tab()) ||
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index e9c6fe03433f..c41ea89f4b86 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -277,7 +277,7 @@ sal_Bool ScInputWindow::UseSubTotal(ScRangeList* pRangeList) const
size_t nRangeIndex (0);
while (!bSubTotal && nRangeIndex < nRangeCount)
{
- const ScRange* pRange = pRangeList->at( nRangeIndex );
+ const ScRange* pRange = (*pRangeList)[nRangeIndex];
if( pRange )
{
SCTAB nTabEnd(pRange->aEnd.Tab());
@@ -310,7 +310,7 @@ sal_Bool ScInputWindow::UseSubTotal(ScRangeList* pRangeList) const
nRangeIndex = 0;
while (!bSubTotal && nRangeIndex < nRangeCount)
{
- const ScRange* pRange = pRangeList->at( nRangeIndex );
+ const ScRange* pRange = (*pRangeList)[nRangeIndex];
if( pRange )
{
ScRange aDBArea;
@@ -378,7 +378,7 @@ void __EXPORT ScInputWindow::Select()
const size_t nCount = aMarkRangeList.size();
for ( size_t i = 0; i < nCount; ++i )
{
- const ScRange aRange( *aMarkRangeList.at( i ) );
+ const ScRange aRange( *aMarkRangeList[i] );
if ( pDoc->IsBlockEmpty( aRange.aStart.Tab(),
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row() ) )
@@ -405,7 +405,7 @@ void __EXPORT ScInputWindow::Select()
const sal_Bool bSubTotal( UseSubTotal( &aMarkRangeList ) );
for ( size_t i = 0; i < nCount; ++i )
{
- const ScRange aRange( *aMarkRangeList.at( i ) );
+ const ScRange aRange( *aMarkRangeList[i] );
const bool bSetCursor = ( i == nCount - 1 ? true : false );
const bool bContinue = ( i != 0 ? true : false );
if ( !pViewSh->AutoSum( aRange, bSubTotal, bSetCursor, bContinue ) )
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 94c10ae7b8df..2818c9ea2d8e 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -264,7 +264,7 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc)
for ( size_t i = 0, nCount = xRangeList->size(); i < nCount; i++ )
{
//! nExtFlags ???
- ScRange aRange = *xRangeList->at( i );
+ ScRange aRange = *(*xRangeList)[i];
PostPaint( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aStart.Tab(),
aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab(),
nParts );
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index c9d7afe17f53..0f8d9dcf3261 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -2229,7 +2229,7 @@ void __EXPORT ScUndoBorder::Undo()
EndUndo();
}
-void __EXPORT ScUndoBorder::Redo()
+void ScUndoBorder::Redo()
{
BeginRedo();
@@ -2237,7 +2237,7 @@ void __EXPORT ScUndoBorder::Redo()
size_t nCount = pRanges->size();
for (size_t i = 0; i < nCount; ++i )
{
- ScRange aRange = *pRanges->at( i );
+ ScRange aRange = *(*pRanges)[i];
SCTAB nTab = aRange.aStart.Tab();
ScMarkData aMark;
@@ -2247,7 +2247,7 @@ void __EXPORT ScUndoBorder::Redo()
pDoc->ApplySelectionFrame( aMark, pOuter, pInner );
}
for (size_t i = 0; i < nCount; ++i)
- pDocShell->PostPaint( *pRanges->at( i ), PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
+ pDocShell->PostPaint( *(*pRanges)[i], PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndRedo();
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index ddce9f984952..8bb81bdfb0f2 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -8140,7 +8140,7 @@ uno::Sequence< table::CellRangeAddress > SAL_CALL ScTableSheetObj::getRanges( )
table::CellRangeAddress* pAry = aRetRanges.getArray();
for( size_t nIndex = 0; nIndex < nCount; nIndex++ )
{
- const ScRange* pRange = pRangeList->at( nIndex );
+ const ScRange* pRange = (*pRangeList)[nIndex];
pAry->StartColumn = pRange->aStart.Col();
pAry->StartRow = pRange->aStart.Row();
pAry->EndColumn = pRange->aEnd.Col();
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index d84753cadf3b..0b0b500402c5 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -632,7 +632,7 @@ void ScChartObj::getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) con
table::CellRangeAddress* pCellRanges = aCellRanges.getArray();
for ( size_t i = 0; i < nCount; ++i )
{
- ScRange aRange( *rRangeList->at( i ) );
+ ScRange aRange( *(*rRangeList)[i] );
table::CellRangeAddress aCellRange;
ScUnoConversion::FillApiRange( aCellRange, aRange );
pCellRanges[ i ] = aCellRange;
@@ -732,7 +732,7 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScChartObj::getRanges() throw(un
table::CellRangeAddress* pAry = aSeq.getArray();
for (size_t i = 0; i < nCount; i++)
{
- ScRange aRange( *xRanges->at( i ) );
+ ScRange aRange( *(*xRanges)[i] );
aRangeAddress.Sheet = aRange.aStart.Tab();
aRangeAddress.StartColumn = aRange.aStart.Col();
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 06dea2767291..800198003a64 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -899,7 +899,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
size_t nCount = aRanges.size();
for (size_t nPos = 0; nPos < nCount && !bEnable; ++nPos)
{
- ScCellIterator aCellIter( pDoc, *aRanges.at(nPos) );
+ ScCellIterator aCellIter(pDoc, *aRanges[nPos]);
for( ScBaseCell* pCell = aCellIter.GetFirst(); pCell && !bEnable; pCell = aCellIter.GetNext() )
if ( pCell->HasNote() )
bEnable = TRUE; // note found
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 37c48ba4c1bf..51ac65ecbda5 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -779,7 +779,7 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio
for (size_t nRangePos=0; nRangePos < nRangeCount && bContinue; nRangePos++)
{
- ScRange aRange = *xRanges->at(nRangePos);
+ ScRange aRange = *(*xRanges)[nRangePos];
SCCOL nStartCol = aRange.aStart.Col();
SCROW nStartRow = aRange.aStart.Row();
SCCOL nEndCol = aRange.aEnd.Col();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d17641f4e565..72f47182b080 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5130,7 +5130,7 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
size_t nRangeCount = aRanges.size();
for (size_t j=0; j< nRangeCount; ++j)
{
- ScRange aRange = *aRanges.at( j );
+ ScRange aRange = *aRanges[j];
// Szenario-Rahmen immer dann auf zusammengefasste Zellen erweitern, wenn
// dadurch keine neuen nicht-ueberdeckten Zellen mit umrandet werden
pDoc->ExtendTotalMerge( aRange );
@@ -5253,7 +5253,7 @@ void ScGridWindow::UpdateCopySourceOverlay()
mpOOSelectionBorder = new ::sdr::overlay::OverlayObjectList;
for ( size_t i = 0; i < rClipParam.maRanges.size(); ++i )
{
- ScRange* p = rClipParam.maRanges.at( i );
+ ScRange* p = rClipParam.maRanges[i];
if (p->aStart.Tab() != nCurTab)
continue;
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 46b705b7d4c2..30cfbe22ce12 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -218,10 +218,9 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP
BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
- size_t nRangeCount = xRanges->size();
- for (size_t j=0; j < nRangeCount; j++)
+ for (size_t j = 0, n = xRanges->size(); j < n; ++j)
{
- ScRange aRange = *xRanges->at( j );
+ ScRange aRange = *(*xRanges)[j];
// Szenario-Rahmen immer dann auf zusammengefasste Zellen erweitern, wenn
// dadurch keine neuen nicht-ueberdeckten Zellen mit umrandet werden
pDoc->ExtendTotalMerge( aRange );
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 9df88088436a..2a98c670156a 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -893,13 +893,9 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt )
sal::static_int_cast<SCCOL>(nPos), MAXROW, nTab );
// see if any part of the range is already selected
- BOOL bSelected = FALSE;
ScRangeList aRanges;
pViewData->GetMarkData().FillRangeListWithMarks( &aRanges, FALSE );
- size_t nRangeCount = aRanges.size();
- for (size_t i=0; i < nRangeCount && !bSelected; ++i)
- if ( aRanges.at( i )->Intersects( aNewRange ) )
- bSelected = TRUE;
+ bool bSelected = aRanges.Intersects(aNewRange);
// select the range if no part of it was selected
if ( !bSelected )
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index cb6259e6cac3..bf807a1b59e4 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2152,7 +2152,7 @@ void ScTabView::DoChartSelection(
size_t nListSize = aRangeList.size();
for ( size_t j = 0; j < nListSize; ++j )
{
- ScRange* p = aRangeList.at( j );
+ ScRange* p = aRangeList[j];
if( rHilightRanges[i].Index == - 1 )
AddHighlightRange( *p, aSelColor );
else
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 661c25ae4273..55dfb6ab30d2 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -745,7 +745,7 @@ String ScViewFunc::GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTo
size_t ListSize = aRangeList.size();
for ( size_t i = 0; i < ListSize; ++i )
{
- const ScRange* p = aRangeList.at( i );
+ const ScRange* p = aRangeList[i];
if (p != pFirst)
pArray->AddOpCode(ocSep);
ScComplexRefData aRef;
@@ -991,16 +991,12 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
else if ( rMark.IsMultiMarked() )
{
rMark.MarkToMulti();
- ScRangeListRef aList( new ScRangeList );
- rMark.FillRangeListWithMarks( aList, FALSE );
- if ( !aList->empty() )
+ ScRangeListRef pList( new ScRangeList );
+ rMark.FillRangeListWithMarks( pList, FALSE );
+ for (size_t i = 0, n = pList->size(); i < n; ++i)
{
- size_t nListSize = aList->size();
- for ( size_t i = 0; i < nListSize; ++i )
- {
- ScRange* pR = aList->at( i );
- pDoc->AddPrintRange( nTab, *pR );
- }
+ ScRange* pR = (*pList)[i];
+ pDoc->AddPrintRange(nTab, *pR);
}
}
}
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 723b36b4f99c..be6e77b4610e 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -382,7 +382,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
SCROW nPrevRowSize = p->aEnd.Row() - p->aStart.Row() + 1;
for ( size_t i = 1; i < aClipParam.maRanges.size(); ++i )
{
- p = aClipParam.maRanges.at( i );
+ p = aClipParam.maRanges[i];
if (pDoc->HasSelectedBlockMatrixFragment(
p->aStart.Col(), p->aStart.Row(), p->aEnd.Col(), p->aEnd.Row(), rMark))
{
@@ -1079,7 +1079,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
size_t ListSize = aRangeList.size();
for ( size_t i = 0; i < ListSize; ++i )
{
- ScRange* p = aRangeList.at( i );
+ ScRange* p = aRangeList[i];
nUnfilteredRows += p->aEnd.Row() - p->aStart.Row() + 1;
}
#if 0
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 50327e7bb286..a2f85fa594b1 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -245,9 +245,9 @@ void ScViewFunc::DoRefConversion( BOOL bRecord )
{
if (rMark.GetTableSelect(i))
{
- for (size_t j=0; j<nCount; j++)
+ for (size_t j = 0; j < nCount; ++j)
{
- ScRange aRange = *xRanges->at(j);
+ ScRange aRange = *(*xRanges)[j];
aRange.aStart.SetTab(i);
aRange.aEnd.SetTab(i);
ScCellIterator aIter( pDoc, aRange );
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 6ea238b62ee2..49a147bb7b2d 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -173,7 +173,7 @@ void ScViewFunc::MarkAndJumpToRanges(const ScRangeList& rRanges)
size_t ListSize = aRanges.size();
for ( size_t i = 0; i < ListSize; ++i )
{
- p = aRanges.at( i );
+ p = aRanges[i];
// Collect only those ranges that are on the same sheet as the current
// cursor.
if (p->aStart.Tab() == aCurPos.Tab())
@@ -190,7 +190,7 @@ void ScViewFunc::MarkAndJumpToRanges(const ScRangeList& rRanges)
ListSize = aRangesToMark.size();
for ( size_t i = 0; i < ListSize; ++i )
{
- p = aRangesToMark.at( i );
+ p = aRangesToMark[i];
MarkRange(*p, false, true);
}
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 7473f86c057f..e5170b49c2ba 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -946,7 +946,7 @@ BYTE ScViewFunc::GetSelectionScriptType()
size_t nCount = aRanges.size();
for ( size_t i=0; i < nCount; i++ )
{
- ScRange aRange = *aRanges.at( i );
+ ScRange aRange = *aRanges[i];
ScCellIterator aIter( pDoc, aRange );
ScBaseCell* pCell = aIter.GetFirst();
while ( pCell )