diff options
-rw-r--r-- | svx/source/form/fmexpl.cxx | 1 | ||||
-rw-r--r-- | svx/source/form/navigatortree.cxx | 12 | ||||
-rw-r--r-- | svx/source/inc/fmexpl.hxx | 8 |
3 files changed, 10 insertions, 11 deletions
diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index 95ae0a8e04a7..3c4dbaf992de 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -85,7 +85,6 @@ using namespace ::com::sun::star::container; //======================================================================== -SV_IMPL_PTRARR_SORT( FmEntryDataArray, FmEntryDataPtr ) SV_IMPL_PTRARR_SORT( SvLBoxEntrySortedArray, SvLBoxEntryPtr ) //======================================================================== diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 2c664376abe7..1bcfbe94ec9b 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -1926,7 +1926,7 @@ namespace svxform { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::SynchronizeSelection" ); LockSelectionHandling(); - if (arredToSelect.Count() == 0) + if (arredToSelect.empty()) { SelectAll(sal_False); } @@ -1939,11 +1939,11 @@ namespace svxform FmEntryData* pCurrent = (FmEntryData*)pSelection->GetUserData(); if (pCurrent != NULL) { - sal_uInt16 nPosition; - if ( arredToSelect.Seek_Entry(pCurrent, &nPosition) ) + FmEntryDataArray::iterator it = arredToSelect.find(pCurrent); + if ( it != arredToSelect.end() ) { // der Entry ist schon selektiert, steht aber auch in der SelectList -> er kann aus letzterer // raus - arredToSelect.Remove(nPosition, 1); + arredToSelect.erase(it); } else { // der Entry ist selektiert, aber steht nicht in der SelectList -> Selektion rausnehmen Select(pSelection, sal_False); @@ -1971,8 +1971,8 @@ namespace svxform while( pLoop ) { FmEntryData* pCurEntryData = (FmEntryData*)pLoop->GetUserData(); - sal_uInt16 nPosition; - if ( arredToSelect.Seek_Entry(pCurEntryData, &nPosition) ) + FmEntryDataArray::iterator it = arredToSelect.find(pCurEntryData); + if ( it != arredToSelect.end() ) { Select(pLoop, sal_True); MakeVisible(pLoop); diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx index 7bbee532a59a..d4a6ce18d27b 100644 --- a/svx/source/inc/fmexpl.hxx +++ b/svx/source/inc/fmexpl.hxx @@ -61,6 +61,7 @@ #include "fmexch.hxx" #include <vector> +#include <set> class SdrObjListIter; class FmFormShell; @@ -228,8 +229,7 @@ public: //======================================================================== // FmNavRequestSelectHint - jemand teilt dem NavigatorTree mit, dass er bestimmte Eintraege selektieren soll -typedef FmEntryData* FmEntryDataPtr; -SV_DECL_PTRARR_SORT( FmEntryDataArray, FmEntryDataPtr, 16 ) +typedef std::set<FmEntryData*> FmEntryDataArray; class FmNavRequestSelectHint : public SfxHint { @@ -242,8 +242,8 @@ public: void SetMixedSelection(sal_Bool bMixedSelection) { m_bMixedSelection = bMixedSelection; } sal_Bool IsMixedSelection() { return m_bMixedSelection; } - void AddItem(FmEntryData* pEntry) { m_arredToSelect.Insert(pEntry); } - void ClearItems() { m_arredToSelect.Remove(sal_uInt16(0), m_arredToSelect.Count()); } + void AddItem(FmEntryData* pEntry) { m_arredToSelect.insert(pEntry); } + void ClearItems() { m_arredToSelect.clear(); } FmEntryDataArray& GetItems() { return m_arredToSelect; } }; |