diff options
author | Noel Grandin <noel@peralex.com> | 2012-01-31 14:16:38 +0000 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-01-31 14:17:33 +0000 |
commit | 5a71069339b3a3c118f3015d978799ef66db7564 (patch) | |
tree | 3244dc4c91e6e2a0cfd70f8edca2e57ab36a5faf /sd/source/ui/dlg/custsdlg.cxx | |
parent | d1a84bdb8065c46d98908bc5caec4a995d4d196f (diff) |
convert SdCustomeShow from tools/list to vector
Diffstat (limited to 'sd/source/ui/dlg/custsdlg.cxx')
-rw-r--r-- | sd/source/ui/dlg/custsdlg.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index 2a56b7e125dd..210c44667e0b 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -356,12 +356,11 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window* pWindow, aEdtName.SetText( aOldName ); // ListBox mit CustomShow-Seiten fuellen - for( pPage = (SdPage*) rpCustomShow->First(); - pPage != NULL; - pPage = (SdPage*) rpCustomShow->Next() ) + for( SdCustomShow::PageVec::iterator it = rpCustomShow->PagesVector().begin(); + it != rpCustomShow->PagesVector().end(); ++it ) { - SvLBoxEntry* pEntry = aLbCustomPages.InsertEntry( pPage->GetName() ); - pEntry->SetUserData( pPage ); + SvLBoxEntry* pEntry = aLbCustomPages.InsertEntry( (*it)->GetName() ); + pEntry->SetUserData( (SdPage*) (*it) ); } } else @@ -473,22 +472,23 @@ void SdDefineCustomShowDlg::CheckCustomShow() SvLBoxEntry* pEntry = NULL; // Anzahl vergleichen - if( rpCustomShow->Count() != aLbCustomPages.GetEntryCount() ) + if( rpCustomShow->PagesVector().size() != aLbCustomPages.GetEntryCount() ) { - rpCustomShow->Clear(); + rpCustomShow->PagesVector().clear(); bDifferent = sal_True; } // Seiten-Pointer vergleichen if( !bDifferent ) { - for( pPage = (SdPage*) rpCustomShow->First(), pEntry = aLbCustomPages.First(); - pPage != NULL && pEntry != NULL && !bDifferent; - pPage = (SdPage*) rpCustomShow->Next(), pEntry = aLbCustomPages.Next( pEntry ) ) + SdCustomShow::PageVec::iterator it1 = rpCustomShow->PagesVector().begin(); + pEntry = aLbCustomPages.First(); + for( ; it1 != rpCustomShow->PagesVector().end() && pEntry != NULL && !bDifferent; + ++it1, pEntry = aLbCustomPages.Next( pEntry ) ) { - if( pPage != pEntry->GetUserData() ) + if( *it1 != pEntry->GetUserData() ) { - rpCustomShow->Clear(); + rpCustomShow->PagesVector().clear(); bDifferent = sal_True; } } @@ -502,7 +502,7 @@ void SdDefineCustomShowDlg::CheckCustomShow() pEntry = aLbCustomPages.Next( pEntry ) ) { pPage = (SdPage*) pEntry->GetUserData(); - rpCustomShow->Insert( pPage, LIST_APPEND ); + rpCustomShow->PagesVector().push_back( pPage ); } bModified = sal_True; } |