diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-09 11:14:47 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-12 09:13:33 +0200 |
commit | 3e6ff89b5ca9c9b164deae82ab24a7ba1552e89e (patch) | |
tree | 0388efc9b21cfac9974f3aa2d32c2e2483992404 /sw/inc/docary.hxx | |
parent | 14421f20dca120aeee3cdd56cdcb6b25637fda2c (diff) |
loplugin:mergeclasses
Change-Id: Ia4ae4f17fba9775fc53618ab1662c10e37ee4be3
Diffstat (limited to 'sw/inc/docary.hxx')
-rw-r--r-- | sw/inc/docary.hxx | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index dcacc218f592..f690261308b5 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -183,18 +183,18 @@ struct CompareSwRedlineTable { bool operator()(SwRangeRedline* const &lhs, SwRangeRedline* const &rhs) const; }; -class _SwRedlineTable - : public o3tl::sorted_vector<SwRangeRedline*, CompareSwRedlineTable, - o3tl::find_partialorder_ptrequals> -{ -public: - ~_SwRedlineTable(); -}; -class SwRedlineTable : private _SwRedlineTable +class SwRedlineTable { public: - bool Contains(const SwRangeRedline* p) const { return find(const_cast<SwRangeRedline* const>(p)) != end(); } + typedef o3tl::sorted_vector<SwRangeRedline*, CompareSwRedlineTable, + o3tl::find_partialorder_ptrequals> vector_type; + typedef vector_type::size_type size_type; +private: + vector_type maVector; +public: + ~SwRedlineTable(); + bool Contains(const SwRangeRedline* p) const { return maVector.find(const_cast<SwRangeRedline* const>(p)) != maVector.end(); } sal_uInt16 GetPos(const SwRangeRedline* p) const; bool Insert( SwRangeRedline* p, bool bIns = true ); @@ -227,14 +227,12 @@ public: */ const SwRangeRedline* FindAtPosition( const SwPosition& startPosition, sal_uInt16& tableIndex, bool next = true ) const; - using _SwRedlineTable::const_iterator; - using _SwRedlineTable::begin; - using _SwRedlineTable::end; - using _SwRedlineTable::size; - using _SwRedlineTable::size_type; - using _SwRedlineTable::operator[]; - using _SwRedlineTable::empty; - using _SwRedlineTable::Resort; + bool empty() const { return maVector.empty(); } + size_type size() const { return maVector.size(); } + SwRangeRedline* operator[]( size_type idx ) const { return maVector[idx]; } + vector_type::const_iterator begin() const { return maVector.begin(); } + vector_type::const_iterator end() const { return maVector.end(); } + void Resort() { maVector.Resort(); } }; /// Table that holds 'extra' redlines, such as 'table row insert\delete', 'paragraph moves' etc... |