diff options
author | Daisuke Nishino <niboshi000@gmail.com> | 2011-11-23 13:12:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-23 13:56:37 +0000 |
commit | 858b5b4f36a357fe7192e7c2ed9cc3cdfc81fd8f (patch) | |
tree | 963b3823812f1d3cdb1301036f50c8d194edefcb /sw/inc/tblsel.hxx | |
parent | a9edd1267e42ba4e7814102bcaab6610d14bc3b8 (diff) |
SwSelBoxes: svarray -> std::map
Diffstat (limited to 'sw/inc/tblsel.hxx')
-rw-r--r-- | sw/inc/tblsel.hxx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx index 83c127bfa9ef..314ce4728cfa 100644 --- a/sw/inc/tblsel.hxx +++ b/sw/inc/tblsel.hxx @@ -33,6 +33,8 @@ #include <swrect.hxx> #include "swdllapi.h" +#include <map> + class SwCrsrShell; class SwCursor; class SwTableCursor; @@ -48,7 +50,30 @@ class SwUndoTblMerge; class SwCellFrm; SV_DECL_PTRARR( SwCellFrms, SwCellFrm*, 16, 16 ) -SV_DECL_PTRARR_SORT( SwSelBoxes, SwTableBoxPtr, 10, 20 ) + + +class SwSelBoxes : public std::map<sal_uLong, SwTableBox*> { + typedef std::map<sal_uLong, SwTableBox*> Base; +public: + using Base::insert; + using Base::find; + using Base::count; + + std::pair<iterator, bool> + insert(SwTableBox* pBox) { return Base::insert(std::make_pair(pBox->GetSttIdx(), pBox)); } + + iterator + insert(iterator it, SwTableBox* pBox) { return Base::insert(it, std::make_pair(pBox->GetSttIdx(), pBox)); } + + size_type + count(const SwTableBox* pBox) const { return Base::count(pBox->GetSttIdx()); } + + iterator + find(const SwTableBox* pBox) { return Base::find(pBox->GetSttIdx()); } + + const_iterator + find(const SwTableBox* pBox) const { return Base::find(pBox->GetSttIdx()); } +}; // Collects all boxes in table that are selected. |