summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/mergeclasses.results1
-rw-r--r--sw/inc/docary.hxx32
-rw-r--r--sw/source/core/doc/docredln.cxx26
3 files changed, 28 insertions, 31 deletions
diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index f947b77f7b02..125840e1a61d 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -83,7 +83,6 @@ merge XFDate with XFDateStart
merge XFDateTimePart with XFTimePart
merge XMLTransformer with XMLTransformerBase
merge XclDebugObjCounter with XclRootData
-merge _SwRedlineTable with SwRedlineTable
merge abp::OModuleResourceClient with abp::OABSPilotUno
merge accessibility::IComboListBoxHelper with VCLListBoxHelper
merge basctl::docs::IDocumentDescriptorFilter with basctl::(anonymous namespace)::FilterDocuments
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...
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 1cbb2b55caa7..3a870a9f981a 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -295,7 +295,7 @@ bool SwRedlineTable::Insert( SwRangeRedline* p, bool bIns )
{
if( p->HasValidRange() )
{
- std::pair<_SwRedlineTable::const_iterator, bool> rv = insert( p );
+ std::pair<vector_type::const_iterator, bool> rv = maVector.insert( p );
size_t nP = rv.first - begin();
p->CallDisplayFunc(0, nP);
return rv.second;
@@ -311,7 +311,7 @@ bool SwRedlineTable::Insert( SwRangeRedline* p, sal_uInt16& rP, bool bIns )
{
if( p->HasValidRange() )
{
- std::pair<_SwRedlineTable::const_iterator, bool> rv = insert( p );
+ std::pair<vector_type::const_iterator, bool> rv = maVector.insert( p );
rP = rv.first - begin();
p->CallDisplayFunc(0, rP);
return rv.second;
@@ -439,17 +439,17 @@ bool CompareSwRedlineTable::operator()(SwRangeRedline* const &lhs, SwRangeRedlin
return *lhs < *rhs;
}
-_SwRedlineTable::~_SwRedlineTable()
+SwRedlineTable::~SwRedlineTable()
{
- DeleteAndDestroyAll();
+ maVector.DeleteAndDestroyAll();
}
sal_uInt16 SwRedlineTable::GetPos(const SwRangeRedline* p) const
{
- const_iterator it = find(const_cast<SwRangeRedline* const>(p));
- if( it == end() )
+ vector_type::const_iterator it = maVector.find(const_cast<SwRangeRedline* const>(p));
+ if( it == maVector.end() )
return USHRT_MAX;
- return it - begin();
+ return it - maVector.begin();
}
bool SwRedlineTable::Remove( const SwRangeRedline* p )
@@ -465,9 +465,9 @@ void SwRedlineTable::Remove( sal_uInt16 nP )
{
SwDoc* pDoc = 0;
if( !nP && 1 == size() )
- pDoc = front()->GetDoc();
+ pDoc = maVector.front()->GetDoc();
- erase( begin() + nP );
+ maVector.erase( maVector.begin() + nP );
SwViewShell* pSh;
if( pDoc && !pDoc->IsInDtor() &&
@@ -484,11 +484,11 @@ void SwRedlineTable::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
SwDoc* pDoc = 0;
if( !nP && nL && nL == size() )
- pDoc = front()->GetDoc();
+ pDoc = maVector.front()->GetDoc();
- for( const_iterator it = begin() + nP; it != begin() + nP + nL; ++it )
+ for( vector_type::const_iterator it = maVector.begin() + nP; it != maVector.begin() + nP + nL; ++it )
delete *it;
- erase( begin() + nP, begin() + nP + nL );
+ maVector.erase( maVector.begin() + nP, maVector.begin() + nP + nL );
SwViewShell* pSh;
if( pDoc && !pDoc->IsInDtor() &&
@@ -563,7 +563,7 @@ const SwRangeRedline* SwRedlineTable::FindAtPosition( const SwPosition& rSttPos,
bool bNext ) const
{
const SwRangeRedline* pFnd = 0;
- for( ; rPos < size() ; ++rPos )
+ for( ; rPos < maVector.size() ; ++rPos )
{
const SwRangeRedline* pTmp = (*this)[ rPos ];
if( pTmp->HasMark() && pTmp->IsVisible() )