diff options
Diffstat (limited to 'sw/inc/docary.hxx')
-rw-r--r-- | sw/inc/docary.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 64635347f631..08e2d8b761dd 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -224,6 +224,9 @@ public: static constexpr size_type npos = SAL_MAX_INT32; private: vector_type maVector; + /// Sometimes we load bad data, and we need to know if we can use + /// fast binary search, or if we have to fall back to a linear search + bool m_bHasOverlappingElements; public: ~SwRedlineTable(); bool Contains(const SwRangeRedline* p) const { return maVector.find(const_cast<SwRangeRedline*>(p)) != maVector.end(); } @@ -232,6 +235,7 @@ public: bool Insert(SwRangeRedline*& p); bool Insert(SwRangeRedline*& p, size_type& rInsPos); bool InsertWithValidRanges(SwRangeRedline*& p, size_type* pInsPos = nullptr); + bool HasOverlappingElements() const { return m_bHasOverlappingElements; } void Remove( size_type nPos ); void Remove( const SwRangeRedline* p ); @@ -266,6 +270,9 @@ public: // Notifies all LOK clients when redlines are added/modified/removed static void LOKRedlineNotification(RedlineNotification eType, SwRangeRedline* pRedline); + +private: + void CheckOverlapping(vector_type::const_iterator it); }; /// Table that holds 'extra' redlines, such as 'table row insert/delete', 'paragraph moves' etc... |