LibreOffice Module sw (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
SwRedlineTable Class Reference

#include <docary.hxx>

Collaboration diagram for SwRedlineTable:

Public Types

typedef o3tl::sorted_vector< SwRangeRedline *, CompareSwRedlineTable, o3tl::find_partialorder_ptrequalsvector_type
typedef vector_type::size_type size_type

Public Member Functions

 ~SwRedlineTable ()
bool Contains (const SwRangeRedline *p) const
size_type GetPos (const SwRangeRedline *p) const
bool Insert (SwRangeRedline *&p)
bool Insert (SwRangeRedline *&p, size_type &rInsPos)
bool InsertWithValidRanges (SwRangeRedline *&p, size_type *pInsPos=nullptr)
bool HasOverlappingElements () const
void Remove (size_type nPos)
void Remove (const SwRangeRedline *p)
void DeleteAndDestroy (size_type nPos)
void DeleteAndDestroyAll ()
void dumpAsXml (xmlTextWriterPtr pWriter) const
size_type FindNextOfSeqNo (size_type nSttPos) const
size_type FindPrevOfSeqNo (size_type nSttPos) const
size_type FindNextSeqNo (sal_uInt16 nSeqNo, size_type nSttPos) const
 Search next or previous Redline with the same Seq. More...
size_type FindPrevSeqNo (sal_uInt16 nSeqNo, size_type nSttPos) const
const SwRangeRedlineFindAtPosition (const SwPosition &startPosition, size_type &tableIndex, bool next=true) const
 Find the redline at the given position. More...
bool isMoved (size_type tableIndex) const
bool empty () const
size_type size () const
SwRangeRedlineoperator[] (size_type idx) const
vector_type::const_iterator begin () const
vector_type::const_iterator end () const
void Resort ()

Static Public Member Functions

static void LOKRedlineNotification (RedlineNotification eType, SwRangeRedline *pRedline)
 Emits LOK notification about one addition / removal of a redline item. More...

Static Public Attributes

static constexpr size_type npos = SAL_MAX_INT32

Private Member Functions

void CheckOverlapping (vector_type::const_iterator it)

Private Attributes

vector_type maVector
bool m_bHasOverlappingElements = false
 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. More...

Detailed Description

Definition at line 217 of file docary.hxx.

Member Typedef Documentation

◆ size_type

Definition at line 222 of file docary.hxx.

◆ vector_type

Definition at line 221 of file docary.hxx.

Constructor & Destructor Documentation

◆ ~SwRedlineTable()

SwRedlineTable::~SwRedlineTable ( )

Member Function Documentation

◆ begin()

vector_type::const_iterator SwRedlineTable::begin ( ) const

◆ CheckOverlapping()

void SwRedlineTable::CheckOverlapping ( vector_type::const_iterator  it)

◆ Contains()

bool SwRedlineTable::Contains ( const SwRangeRedline p) const

◆ DeleteAndDestroy()

void SwRedlineTable::DeleteAndDestroy ( size_type  nPos)

◆ DeleteAndDestroyAll()

void SwRedlineTable::DeleteAndDestroyAll ( )

◆ dumpAsXml()

void SwRedlineTable::dumpAsXml ( xmlTextWriterPtr  pWriter) const

Definition at line 849 of file docredln.cxx.

References size().

Referenced by SwDoc::dumpAsXml().

◆ empty()

bool SwRedlineTable::empty ( ) const

◆ end()

vector_type::const_iterator SwRedlineTable::end ( ) const

◆ FindAtPosition()

const SwRangeRedline * SwRedlineTable::FindAtPosition ( const SwPosition startPosition,
size_type tableIndex,
bool  next = true 
) const

Find the redline at the given position.

tableIndexposition in SwRedlineTable to start searching at, will be updated with the index of the returned redline (or the next redline after the given position if not found)
nexttrue: redline starts at position and ends after, false: redline starts before position and ends at or after

Definition at line 730 of file docredln.cxx.

References SwPaM::HasMark(), SwRangeRedline::IsVisible(), maVector, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size(), and SwPaM::StartEnd().

Referenced by SwLineLayout::CalcLine(), SwTextFormatter::NewFootnoteNumPortion(), sw::DocumentRedlineManager::SelNextRedline(), and sw::DocumentRedlineManager::SelPrevRedline().

◆ FindNextOfSeqNo()

SwRedlineTable::size_type SwRedlineTable::FindNextOfSeqNo ( size_type  nSttPos) const

Definition at line 671 of file docredln.cxx.

References FindNextSeqNo(), npos, and size().

Referenced by SwCursorShell::GotoRedline().

◆ FindNextSeqNo()

SwRedlineTable::size_type SwRedlineTable::FindNextSeqNo ( sal_uInt16  nSeqNo,
size_type  nSttPos 
) const

Search next or previous Redline with the same Seq.

Find the next or preceding Redline with the same

No. Search can be restricted via Lookahead. Using 0 makes search the whole array.

We can limit the search using look ahead (0 searches the whole array).

Definition at line 686 of file docredln.cxx.

References npos, and size().

Referenced by sw::DocumentRedlineManager::AcceptRedline(), FindNextOfSeqNo(), and sw::DocumentRedlineManager::RejectRedline().

◆ FindPrevOfSeqNo()

SwRedlineTable::size_type SwRedlineTable::FindPrevOfSeqNo ( size_type  nSttPos) const

Definition at line 678 of file docredln.cxx.

References FindPrevSeqNo(), and npos.

Referenced by SwCursorShell::GotoRedline().

◆ FindPrevSeqNo()

SwRedlineTable::size_type SwRedlineTable::FindPrevSeqNo ( sal_uInt16  nSeqNo,
size_type  nSttPos 
) const

◆ GetPos()

SwRedlineTable::size_type SwRedlineTable::GetPos ( const SwRangeRedline p) const

◆ HasOverlappingElements()

bool SwRedlineTable::HasOverlappingElements ( ) const

Definition at line 237 of file docary.hxx.

References m_bHasOverlappingElements.

Referenced by sw::DocumentRedlineManager::GetRedlinePos().

◆ Insert() [1/2]

bool SwRedlineTable::Insert ( SwRangeRedline *&  p)

◆ Insert() [2/2]

bool SwRedlineTable::Insert ( SwRangeRedline *&  p,
size_type rInsPos 

◆ InsertWithValidRanges()

bool SwRedlineTable::InsertWithValidRanges ( SwRangeRedline *&  p,
size_type pInsPos = nullptr 

Definition at line 584 of file docredln.cxx.

References sw::GetAllValidRanges(), Insert(), and p.

Referenced by Insert().

◆ isMoved()

bool SwRedlineTable::isMoved ( size_type  tableIndex) const

◆ LOKRedlineNotification()

void SwRedlineTable::LOKRedlineNotification ( RedlineNotification  eType,
SwRangeRedline pRedline 

◆ operator[]()

SwRangeRedline * SwRedlineTable::operator[] ( size_type  idx) const

Definition at line 268 of file docary.hxx.

References idx, and maVector.

◆ Remove() [1/2]

void SwRedlineTable::Remove ( const SwRangeRedline p)

Definition at line 626 of file docredln.cxx.

References GetPos(), nPos, npos, p, and Remove().

◆ Remove() [2/2]

void SwRedlineTable::Remove ( size_type  nPos)

◆ Resort()

void SwRedlineTable::Resort ( )

◆ size()

size_type SwRedlineTable::size ( ) const

Definition at line 267 of file docary.hxx.

References maVector, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().

Referenced by sw::DocumentRedlineManager::AcceptAllRedline(), sw::DocumentRedlineManager::AcceptRedlineParagraphFormatting(), sw::DocumentRedlineManager::AppendRedline(), sw::DocumentRedlineManager::CompressRedlines(), SwDoc::CorrAbs(), sw::DocumentRedlineManager::DeleteRedline(), dumpAsXml(), SwTextShell::ExecField(), SwDocShell::Execute(), SwView::Execute(), SwUndo::FillSaveData(), SwUndo::FillSaveDataForFormat(), FindNextOfSeqNo(), FindNextSeqNo(), FindPrevSeqNo(), SwEditShell::FindRedlineOfData(), SwXRedlines::getByIndex(), SwXRedlines::getCount(), SwRedlineItr::GetNextRedln(), SwXText::getPropertyValue(), sw::DocumentRedlineManager::GetRedline(), SwEditShell::GetRedlineCount(), sw::DocumentRedlineManager::GetRedlinePos(), SwXTextDocument::getTrackedChanges(), SwXRedlineEnumeration::hasMoreElements(), sw::DocumentRedlineManager::HasRedline(), sw::DocumentRedlineManager::HideAll(), SwNodes::InsertTextSection(), isMoved(), lcl_FillRedlineArray(), lcl_getFormatCollection(), lcl_GetRedlineAtNodeInsertionOrDeletion(), lcl_MaskRedlines(), SwTextFrame::MakePos(), MaybeNotifyRedlineModification(), SwRangeRedline::MoveFromSection(), sw::DocumentContentOperationsManager::MoveNodeRange(), SwDoc::MoveParagraphImpl(), SwTextFormatter::NewNumberPortion(), SwXRedlineEnumeration::nextElement(), SwTextFrame::PaintEmpty(), Remove(), sw::ReplaceImpl(), SwWW8AttrIter::SearchNext(), SwRedlineItr::Seek(), sw::DocumentRedlineManager::SelNextRedline(), sw::DocumentRedlineManager::SetRedlineComment(), sw::DocumentRedlineManager::SetRedlineFlags(), SwUndo::SetSaveData(), sw::DocumentRedlineManager::ShowAll(), sw::DocumentRedlineManager::SplitRedline(), sw_DebugRedline(), SwRedlineSaveData::SwRedlineSaveData(), SwUndoRedline::UndoImpl(), SwUndoRedlineSort::UndoRedlineImpl(), SwTextNode::Update(), SwTableLine::UpdateTextChangesOnly(), SwXRedlinePortion::Validate(), and RtfExport::WriteRevTab().

Member Data Documentation

◆ m_bHasOverlappingElements

bool SwRedlineTable::m_bHasOverlappingElements = false

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.

Definition at line 228 of file docary.hxx.

Referenced by CheckOverlapping(), DeleteAndDestroyAll(), and HasOverlappingElements().

◆ maVector

vector_type SwRedlineTable::maVector

◆ npos

constexpr size_type SwRedlineTable::npos = SAL_MAX_INT32

The documentation for this class was generated from the following files: