[Libreoffice-commits] .: sc/inc sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Dec 10 13:32:23 PST 2010
sc/inc/rangelst.hxx | 2 +-
sc/source/core/data/documen3.cxx | 2 +-
sc/source/core/tool/compiler.cxx | 8 ++++----
sc/source/core/tool/rangelst.cxx | 15 +++++----------
sc/source/filter/excel/xecontent.cxx | 2 +-
sc/source/ui/unoobj/nameuno.cxx | 4 ++--
6 files changed, 14 insertions(+), 19 deletions(-)
New commits:
commit 79ef07ec3c2d93f6f5f9fab057518647c4ce73a7
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Dec 10 16:31:56 2010 -0500
Removed ScRangePairList::at() also, in favor of operator[].
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx
index a055588..9faa533 100644
--- a/sc/inc/rangelst.hxx
+++ b/sc/inc/rangelst.hxx
@@ -120,7 +120,7 @@ public:
ScRangePair* Remove(ScRangePair* pAdr);
size_t size() const;
- ScRangePair* at( size_t idx );
+ ScRangePair* operator[](size_t idx);
const ScRangePair* operator[](size_t idx) const;
private:
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index af972c0..053533e 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1494,7 +1494,7 @@ BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
if (pList)
for ( size_t i = 0, nPairs = pList->size(); i < nPairs; ++i )
{
- ScRangePair* pPair = pList->at( i );
+ ScRangePair* pPair = (*pList)[i];
ScRange aRange = pPair->GetRange(0);
ScCellIterator aIter( this, aRange );
for ( ScBaseCell* pCell = aIter.GetFirst(); pCell; pCell = aIter.GetNext() )
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f9da403..5d5f0e4 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3068,7 +3068,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
pRL = pDoc->GetRowNameRanges();
for ( size_t iPair = 0, nPairs = pRL->size(); iPair < nPairs && !bInList; ++iPair )
{
- ScRangePair* pR = pRL->at( iPair );
+ ScRangePair* pR = (*pRL)[iPair];
const ScRange& rNameRange = pR->GetRange(0);
if ( jThisTab && !(rNameRange.aStart.Tab() <= nThisTab &&
nThisTab <= rNameRange.aEnd.Tab()) )
@@ -5265,7 +5265,7 @@ BOOL ScCompiler::HandleSingleRef()
ScRange aRange;
for ( size_t i = 0, nPairs = pRL->size(); i < nPairs; ++i )
{
- ScRangePair* pR = pRL->at( i );
+ ScRangePair* pR = (*pRL)[i];
if ( pR->GetRange(0).In( aLook ) )
{
bInList = bValidName = TRUE;
@@ -5312,7 +5312,7 @@ BOOL ScCompiler::HandleSingleRef()
}
for ( size_t i = 0, nPairs = pRL->size(); i < nPairs; ++i )
{ // next defined ColNameRange below limits row
- ScRangePair* pR = pRL->at( i );
+ ScRangePair* pR = (*pRL)[i];
const ScRange& rRange = pR->GetRange(1);
if ( rRange.aStart.Col() <= nCol && nCol <= rRange.aEnd.Col() )
{ // identical column range
@@ -5345,7 +5345,7 @@ BOOL ScCompiler::HandleSingleRef()
}
for ( size_t i = 0, nPairs = pRL->size(); i < nPairs; ++i )
{ // next defined RowNameRange to the right limits column
- ScRangePair* pR = pRL->at( i );
+ ScRangePair* pR = (*pRL)[i];
const ScRange& rRange = pR->GetRange(1);
if ( rRange.aStart.Row() <= nRow && nRow <= rRange.aEnd.Row() )
{ // identical row range
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 79fc382..bab815e 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -557,7 +557,6 @@ ScRangePair* ScRangePairList::Remove( ScRangePair* Adr)
return p;
}
-//-----------------------------------------------------------------------------
bool ScRangePairList::operator==( const ScRangePairList& r ) const
{
if ( this == &r )
@@ -572,25 +571,21 @@ bool ScRangePairList::operator==( const ScRangePairList& r ) const
return true;
}
-//-----------------------------------------------------------------------------
-const ScRangePair* ScRangePairList::operator [](size_t idx) const
+ScRangePair* ScRangePairList::operator [](size_t idx)
{
return maPairs[idx];
}
-//-----------------------------------------------------------------------------
-size_t ScRangePairList::size() const
+const ScRangePair* ScRangePairList::operator [](size_t idx) const
{
- return maPairs.size();
+ return maPairs[idx];
}
-//-----------------------------------------------------------------------------
-ScRangePair* ScRangePairList::at( size_t idx )
+size_t ScRangePairList::size() const
{
- return maPairs.at( idx );
+ return maPairs.size();
}
-//-----------------------------------------------------------------------------
bool ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode,
ScDocument* pDoc, const ScRange& rWhere,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 8ce08e4..8687500 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -594,7 +594,7 @@ void XclExpLabelranges::FillRangeList( ScRangeList& rScRanges,
{
for ( size_t i = 0, nPairs = xLabelRangesRef->size(); i < nPairs; ++i )
{
- ScRangePair* pRangePair = xLabelRangesRef->at( i );
+ ScRangePair* pRangePair = (*xLabelRangesRef)[i];
const ScRange& rScRange = pRangePair->GetRange( 0 );
if( rScRange.aStart.Tab() == nScTab )
rScRanges.Append( rScRange );
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 7a5ffe1..d4081db 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -1050,7 +1050,7 @@ ScLabelRangeObj* ScLabelRangesObj::GetObjectByIndex_Impl(size_t nIndex)
ScRangePairList* pList = bColumn ? pDoc->GetColNameRanges() : pDoc->GetRowNameRanges();
if ( pList && nIndex < pList->size() )
{
- ScRangePair* pData = pList->at( nIndex );
+ ScRangePair* pData = (*pList)[nIndex];
if (pData)
return new ScLabelRangeObj( pDocShell, bColumn, pData->GetRange(0) );
}
@@ -1105,7 +1105,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex )
{
ScRangePairListRef xNewList(pOldList->Clone());
- ScRangePair* pEntry = xNewList->at( nIndex );
+ ScRangePair* pEntry = (*xNewList)[nIndex];
if (pEntry)
{
xNewList->Remove( pEntry );
More information about the Libreoffice-commits
mailing list