Kaydet (Commit) 2a44d106 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Remove remaining use of SvTreeEntryList.

Change-Id: Id29111b0dd9a14fc2dbb18447293b2ac01e20df4
üst 51ec031f
...@@ -689,7 +689,7 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry* ...@@ -689,7 +689,7 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry*
DBG_CHKTHIS(SvTreeListBox,0); DBG_CHKTHIS(SvTreeListBox,0);
nCurEntrySelPos = 0; // selection counter for NotifyMoving/Copying nCurEntrySelPos = 0; // selection counter for NotifyMoving/Copying
sal_Bool bSuccess = sal_True; sal_Bool bSuccess = sal_True;
SvTreeEntryList aList; std::vector<SvTreeListEntry*> aList;
sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() ); sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() );
Link aCloneLink( pModel->GetCloneLink() ); Link aCloneLink( pModel->GetCloneLink() );
pModel->SetCloneLink( LINK(this, SvTreeListBox, CloneHdl_Impl )); pModel->SetCloneLink( LINK(this, SvTreeListBox, CloneHdl_Impl ));
...@@ -705,10 +705,10 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry* ...@@ -705,10 +705,10 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry*
pSourceEntry = pSource->NextSelected( pSourceEntry ); 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) for (; it != itEnd; ++it)
{ {
pSourceEntry = static_cast<SvTreeListEntry*>(*it); pSourceEntry = *it;
SvTreeListEntry* pNewParent = 0; SvTreeListEntry* pNewParent = 0;
sal_uLong nInsertionPos = ULONG_MAX; sal_uLong nInsertionPos = ULONG_MAX;
sal_Bool bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos); sal_Bool bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
...@@ -718,14 +718,12 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry* ...@@ -718,14 +718,12 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry*
{ {
sal_uLong nCloneCount = 0; sal_uLong nCloneCount = 0;
pSourceEntry = (SvTreeListEntry*) pSourceEntry = (SvTreeListEntry*)
pModel->Clone( (SvTreeListEntry*)pSourceEntry, nCloneCount ); pModel->Clone(pSourceEntry, nCloneCount);
pModel->InsertTree( (SvTreeListEntry*)pSourceEntry, pModel->InsertTree(pSourceEntry, pNewParent, nInsertionPos);
(SvTreeListEntry*)pNewParent, nInsertionPos );
} }
else else
{ {
sal_uLong nListPos = pModel->Copy( (SvTreeListEntry*)pSourceEntry, sal_uLong nListPos = pModel->Copy(pSourceEntry, pNewParent, nInsertionPos);
(SvTreeListEntry*)pNewParent, nInsertionPos );
pSourceEntry = GetEntry( pNewParent, nListPos ); pSourceEntry = GetEntry( pNewParent, nListPos );
} }
} }
...@@ -750,7 +748,7 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc ...@@ -750,7 +748,7 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc
DBG_CHKTHIS(SvTreeListBox,0); DBG_CHKTHIS(SvTreeListBox,0);
nCurEntrySelPos = 0; // selection counter for NotifyMoving/Copying nCurEntrySelPos = 0; // selection counter for NotifyMoving/Copying
sal_Bool bSuccess = sal_True; sal_Bool bSuccess = sal_True;
SvTreeEntryList aList; std::vector<SvTreeListEntry*> aList;
sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() ); sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() );
Link aCloneLink( pModel->GetCloneLink() ); Link aCloneLink( pModel->GetCloneLink() );
if ( bClone ) if ( bClone )
...@@ -765,10 +763,10 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc ...@@ -765,10 +763,10 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc
pSourceEntry = pSource->NextSelected( pSourceEntry ); 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) for (; it != itEnd; ++it)
{ {
pSourceEntry = static_cast<SvTreeListEntry*>(*it); pSourceEntry = *it;
SvTreeListEntry* pNewParent = 0; SvTreeListEntry* pNewParent = 0;
sal_uLong nInsertionPos = ULONG_MAX; sal_uLong nInsertionPos = ULONG_MAX;
...@@ -785,19 +783,15 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc ...@@ -785,19 +783,15 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc
if ( bClone ) if ( bClone )
{ {
sal_uLong nCloneCount = 0; sal_uLong nCloneCount = 0;
pSourceEntry = (SvTreeListEntry*) pSourceEntry = pModel->Clone(pSourceEntry, nCloneCount);
pModel->Clone( (SvTreeListEntry*)pSourceEntry, nCloneCount ); pModel->InsertTree(pSourceEntry, pNewParent, nInsertionPos);
pModel->InsertTree( (SvTreeListEntry*)pSourceEntry,
(SvTreeListEntry*)pNewParent, nInsertionPos );
} }
else else
{ {
if ( bOk ) if ( bOk )
pModel->Move( (SvTreeListEntry*)pSourceEntry, pModel->Move(pSourceEntry, pNewParent, nInsertionPos);
(SvTreeListEntry*)pNewParent, nInsertionPos );
else else
pModel->Copy( (SvTreeListEntry*)pSourceEntry, pModel->Copy(pSourceEntry, pNewParent, nInsertionPos);
(SvTreeListEntry*)pNewParent, nInsertionPos );
} }
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment