summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs/anyrefdg.cxx
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2010-12-08 22:38:24 -0800
committerKohei Yoshida <kyoshida@novell.com>2010-12-09 18:05:21 -0500
commit6eefbb4beea48b007e0a6e8ceeaa800319b9f5d8 (patch)
treeb1b9bb47248baf395774fca931443997e23e5c9a /sc/source/ui/miscdlgs/anyrefdg.cxx
parentbf9ed0595b1ec5900523f7a2f322c8310f8b6772 (diff)
Remove another DECLARE_LIST() from Calc
Signed-off-by: Kohei Yoshida <kyoshida@novell.com>
Diffstat (limited to 'sc/source/ui/miscdlgs/anyrefdg.cxx')
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 5f2dea8b187a..7b0bd2ca0ca1 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -131,7 +131,7 @@ void ScFormulaReferenceHelper::enableInput( BOOL bEnable )
// -----------------------------------------------------------------------------
void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr )
{
- if( /*!pRefEdit &&*/ bEnableColorRef )
+ if( bEnableColorRef )
{
bHighLightRef=TRUE;
ScViewData* pViewData=ScDocShell::GetViewData();
@@ -147,16 +147,12 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr )
if( ParseWithNames( aRangeList, rStr, pDoc ) )
{
- ScRange* pRangeEntry = aRangeList.First();
-
- USHORT nIndex=0;
- while(pRangeEntry != NULL)
+ for ( size_t i = 0, nRanges = aRangeList.size(); i < nRanges; ++i )
{
- ColorData aColName = ScRangeFindList::GetColorName(nIndex++);
- pTabViewShell->AddHighlightRange(*pRangeEntry, aColName);
-
- pRangeEntry = aRangeList.Next();
- }
+ ScRangePtr pRangeEntry = aRangeList[ i ];
+ ColorData aColName = ScRangeFindList::GetColorName( i );
+ pTabViewShell->AddHighlightRange( *pRangeEntry, aColName );
+ }
}
}
}
@@ -165,7 +161,7 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr )
bool ScFormulaReferenceHelper::ParseWithNames( ScRangeList& rRanges, const String& rStr, ScDocument* pDoc )
{
bool bError = false;
- rRanges.RemoveAll();
+ rRanges.clear();
ScAddress::Details aDetails(pDoc->GetAddressConvention(), 0, 0);
ScRangeUtil aRangeUtil;
@@ -317,9 +313,9 @@ void ScFormulaReferenceHelper::ReleaseFocus( formula::RefEdit* pEdit, formula::R
ScRangeList aRangeList;
if( ParseWithNames( aRangeList, pRefEdit->GetText(), pDoc ) )
{
- const ScRange* pRange = aRangeList.GetObject( 0 );
- if( pRange )
+ if ( !aRangeList.empty() )
{
+ const ScRangePtr pRange = aRangeList.front();
pViewShell->SetTabNo( pRange->aStart.Tab() );
pViewShell->MoveCursorAbs( pRange->aStart.Col(),
pRange->aStart.Row(), SC_FOLLOW_JUMP, FALSE, FALSE );