diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-10-29 17:35:44 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-10-29 21:33:17 -0400 |
commit | 51ec031fe7a6a54a54f84fe77e17fd2f09d87bb7 (patch) | |
tree | e2bbd023fd82ebcbdd49a00ee1aa367d9cfd6e47 /svtools/source | |
parent | 9d131fd36373af5f693355d006e2e9b6c02a7793 (diff) |
Remove use of SvTreeEntryList from RemoveSelection.
Change-Id: I8ed7ed76536cb71eff9f7a362220462f0ec112e3
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 9b773e52536b..4da5fae47819 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -49,6 +49,7 @@ #include <set> #include <string.h> +#include <vector> using namespace ::com::sun::star::accessibility; @@ -812,7 +813,7 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc void SvTreeListBox::RemoveSelection() { DBG_CHKTHIS(SvTreeListBox,0); - SvTreeEntryList aList; + std::vector<const SvTreeListEntry*> aList; // cache selection, as the implementation deselects everything on the first // remove SvTreeListEntry* pEntry = FirstSelected(); @@ -821,16 +822,13 @@ void SvTreeListBox::RemoveSelection() aList.push_back( pEntry ); if ( pEntry->HasChildren() ) // remove deletes all children automatically - SelectChildren( pEntry, sal_False ); + SelectChildren(pEntry, false); pEntry = NextSelected( pEntry ); } - SvTreeEntryList::iterator it = aList.begin(), itEnd = aList.end(); + std::vector<const SvTreeListEntry*>::const_iterator it = aList.begin(), itEnd = aList.end(); for (; it != itEnd; ++it) - { - pEntry = static_cast<SvTreeListEntry*>(*it); - pModel->Remove(pEntry); - } + pModel->Remove(*it); } SvTreeListBox* SvTreeListBox::GetSourceView() const |