summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfunc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/viewfunc.cxx')
-rw-r--r--sc/source/ui/view/viewfunc.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index bf61f22e1fa1..ac9f3a6b7cb1 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2934,11 +2934,11 @@ BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol,
pDoc->CompileNameFormula( TRUE ); // CreateFormulaString
// Eintrag bereits vorhanden? Dann vorher entfernen (=Aendern)
- USHORT nFoundAt;
- if ( pList->SearchName( rName, nFoundAt ) )
+ ScRangeData* pData = pList->findByName(rName);
+ if (pData)
{ // alten Index uebernehmen
- pNewEntry->SetIndex( ((ScRangeData*)pList->At(nFoundAt))->GetIndex() );
- pList->AtFree( nFoundAt );
+ pNewEntry->SetIndex(pData->GetIndex());
+ pList->erase(*pData);
}
if ( pList->Insert( pNewEntry ) )