diff options
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/control/dbtreelistbox.cxx | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 4faba3f65a1d..0230c5cc8f95 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -3866,13 +3866,12 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const String& _rDataSour SvTreeEntryList* pList = m_pTreeModel->GetChildList( pDataSourceEntry ); if ( pList ) { - SvLBoxEntry* pEntryLoop = static_cast<SvLBoxEntry*>( pList->First() ); - while ( pEntryLoop ) + for ( size_t i = 0, n = pList->size(); i < n; ++i ) { + SvLBoxEntry* pEntryLoop = static_cast<SvLBoxEntry*>((*pList)[ i ]); DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( pEntryLoop->GetUserData() ); pEntryLoop->SetUserData( NULL ); delete pData; - pEntryLoop = static_cast< SvLBoxEntry* >( pList->Next() ); } } diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index fe9da7403ab3..15cd74538c54 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -126,10 +126,10 @@ SvLBoxEntry* DBTreeListBox::GetEntryPosByName( const String& aName, SvLBoxEntry* SvLBoxEntry* pEntry = NULL; if ( pChilds ) { - sal_uLong nCount = pChilds->Count(); - for (sal_uLong i=0; i < nCount; ++i) + size_t nCount = pChilds->size(); + for (size_t i = 0; i < nCount; ++i) { - pEntry = static_cast<SvLBoxEntry*>(pChilds->GetObject(i)); + pEntry = static_cast<SvLBoxEntry*>((*pChilds)[ i ]); SvLBoxString* pItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); if ( pItem->GetText().Equals(aName) ) { |