[Libreoffice-commits] .: sc/inc sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Dec 10 13:08:31 PST 2010
sc/inc/rangelst.hxx | 2 --
sc/source/core/data/conditio.cxx | 2 +-
sc/source/core/data/documen5.cxx | 4 ++--
sc/source/core/data/document.cxx | 6 +++---
sc/source/core/data/table2.cxx | 2 +-
sc/source/core/tool/chartpos.cxx | 8 ++++----
sc/source/core/tool/rangelst.cxx | 10 ----------
sc/source/core/tool/rangeutl.cxx | 2 +-
sc/source/filter/html/htmlpars.cxx | 2 +-
sc/source/filter/xcl97/xcl97rec.cxx | 2 +-
sc/source/filter/xml/XMLStylesImportHelper.cxx | 4 ++--
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 2 +-
sc/source/ui/app/inputwin.cxx | 8 ++++----
sc/source/ui/docshell/docsh3.cxx | 2 +-
sc/source/ui/undo/undoblk.cxx | 6 +++---
sc/source/ui/unoobj/cellsuno.cxx | 2 +-
sc/source/ui/unoobj/chartuno.cxx | 4 ++--
sc/source/ui/view/cellsh.cxx | 2 +-
sc/source/ui/view/dbfunc3.cxx | 2 +-
sc/source/ui/view/gridwin.cxx | 4 ++--
sc/source/ui/view/gridwin4.cxx | 5 ++---
sc/source/ui/view/hdrcont.cxx | 6 +-----
sc/source/ui/view/tabview3.cxx | 2 +-
sc/source/ui/view/viewfun2.cxx | 16 ++++++----------
sc/source/ui/view/viewfun3.cxx | 4 ++--
sc/source/ui/view/viewfun4.cxx | 4 ++--
sc/source/ui/view/viewfun6.cxx | 4 ++--
sc/source/ui/view/viewfunc.cxx | 2 +-
28 files changed, 49 insertions(+), 70 deletions(-)
New commits:
commit 05992aa93f1534a94f9428aef456a638352f2768
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Dec 10 16:07:50 2010 -0500
Removed ScRangeList::at() in favor of operator[].
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx
index 0e4314f..a055588 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 2a7f8f1..c52717a 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 0d4ccee..f483a29 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 78f021f..abacb00 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 bf02dce..3947753 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 70c33da..b6c1f41 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 971d910..79fc382 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 7c32e67..76ca370 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 88bf47f..2686f1f 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 faf87b4..3801414 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 b22beed..05b86d6 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 b10becb..d4fb8fb 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 7ec14c7..70bb16b 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 7cb19d4..31f04a5 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 c4604f6..17795fd 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 faa3ead..c67cf11 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 264b2ee..d5cf9b4 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 c17a1c7..a3104a1 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 f9cec5e..75ab8d0 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 72086a6..adea7a0 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 e6e01b4..b0e4127 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 846d0f3..b964d78 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 0dad8e3..873b1ad 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 1e93515..fd053ec 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 88db7a9..42f75c6 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 95c44e6..ec9056c 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 4e18ca4..2aa8aaa 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 72d4b3e..70530b3 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 )
More information about the Libreoffice-commits
mailing list