diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-10-29 17:42:57 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-10-29 21:33:17 -0400 |
commit | 2a44d1068f4af081f68a876ee3dc2f4ec61f3393 (patch) | |
tree | d54e21e3854ae9c9434d786f5aaac47c2292d367 /svtools/source/contnr | |
parent | 51ec031fe7a6a54a54f84fe77e17fd2f09d87bb7 (diff) |
Remove remaining use of SvTreeEntryList.
Change-Id: Id29111b0dd9a14fc2dbb18447293b2ac01e20df4
Diffstat (limited to 'svtools/source/contnr')
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 4da5fae47819..5bfa13e45999 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -689,7 +689,7 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry* DBG_CHKTHIS(SvTreeListBox,0); nCurEntrySelPos = 0; // selection counter for NotifyMoving/Copying sal_Bool bSuccess = sal_True; - SvTreeEntryList aList; + std::vector<SvTreeListEntry*> aList; sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() ); Link aCloneLink( pModel->GetCloneLink() ); pModel->SetCloneLink( LINK(this, SvTreeListBox, CloneHdl_Impl )); @@ -705,10 +705,10 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry* pSourceEntry = pSource->NextSelected( pSourceEntry ); } - SvTreeEntryList::iterator it = aList.begin(), itEnd = aList.end(); + std::vector<SvTreeListEntry*>::const_iterator it = aList.begin(), itEnd = aList.end(); for (; it != itEnd; ++it) { - pSourceEntry = static_cast<SvTreeListEntry*>(*it); + pSourceEntry = *it; SvTreeListEntry* pNewParent = 0; sal_uLong nInsertionPos = ULONG_MAX; sal_Bool bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos); @@ -718,14 +718,12 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry* { sal_uLong nCloneCount = 0; pSourceEntry = (SvTreeListEntry*) - pModel->Clone( (SvTreeListEntry*)pSourceEntry, nCloneCount ); - pModel->InsertTree( (SvTreeListEntry*)pSourceEntry, - (SvTreeListEntry*)pNewParent, nInsertionPos ); + pModel->Clone(pSourceEntry, nCloneCount); + pModel->InsertTree(pSourceEntry, pNewParent, nInsertionPos); } else { - sal_uLong nListPos = pModel->Copy( (SvTreeListEntry*)pSourceEntry, - (SvTreeListEntry*)pNewParent, nInsertionPos ); + sal_uLong nListPos = pModel->Copy(pSourceEntry, pNewParent, nInsertionPos); pSourceEntry = GetEntry( pNewParent, nListPos ); } } @@ -750,7 +748,7 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc DBG_CHKTHIS(SvTreeListBox,0); nCurEntrySelPos = 0; // selection counter for NotifyMoving/Copying sal_Bool bSuccess = sal_True; - SvTreeEntryList aList; + std::vector<SvTreeListEntry*> aList; sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() ); Link aCloneLink( pModel->GetCloneLink() ); if ( bClone ) @@ -765,10 +763,10 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc pSourceEntry = pSource->NextSelected( pSourceEntry ); } - SvTreeEntryList::iterator it = aList.begin(), itEnd = aList.end(); + std::vector<SvTreeListEntry*>::const_iterator it = aList.begin(), itEnd = aList.end(); for (; it != itEnd; ++it) { - pSourceEntry = static_cast<SvTreeListEntry*>(*it); + pSourceEntry = *it; SvTreeListEntry* pNewParent = 0; sal_uLong nInsertionPos = ULONG_MAX; @@ -785,19 +783,15 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc if ( bClone ) { sal_uLong nCloneCount = 0; - pSourceEntry = (SvTreeListEntry*) - pModel->Clone( (SvTreeListEntry*)pSourceEntry, nCloneCount ); - pModel->InsertTree( (SvTreeListEntry*)pSourceEntry, - (SvTreeListEntry*)pNewParent, nInsertionPos ); + pSourceEntry = pModel->Clone(pSourceEntry, nCloneCount); + pModel->InsertTree(pSourceEntry, pNewParent, nInsertionPos); } else { if ( bOk ) - pModel->Move( (SvTreeListEntry*)pSourceEntry, - (SvTreeListEntry*)pNewParent, nInsertionPos ); + pModel->Move(pSourceEntry, pNewParent, nInsertionPos); else - pModel->Copy( (SvTreeListEntry*)pSourceEntry, - (SvTreeListEntry*)pNewParent, nInsertionPos ); + pModel->Copy(pSourceEntry, pNewParent, nInsertionPos); } } else |