LibreOffice Module sw (master) 1
|
#include <docary.hxx>
Public Types | |
typedef o3tl::sorted_vector< SwRangeRedline *, CompareSwRedlineTable, o3tl::find_partialorder_ptrequals > | vector_type |
typedef vector_type::size_type | size_type |
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... | |
Definition at line 218 of file docary.hxx.
Definition at line 223 of file docary.hxx.
typedef o3tl::sorted_vector<SwRangeRedline*, CompareSwRedlineTable, o3tl::find_partialorder_ptrequals> SwRedlineTable::vector_type |
Definition at line 222 of file docary.hxx.
SwRedlineTable::~SwRedlineTable | ( | ) |
Definition at line 648 of file docredln.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::DeleteAndDestroyAll(), and maVector.
|
inline |
Definition at line 270 of file docary.hxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::begin(), and maVector.
Referenced by sw::DocumentRedlineManager::GetRedlinePos(), and Insert().
|
private |
Definition at line 442 of file docredln.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::begin(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), m_bHasOverlappingElements, maVector, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
Referenced by Insert().
|
inline |
Definition at line 232 of file docary.hxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), maVector, and p.
Referenced by sw::DocumentContentOperationsManager::MoveNodeRange().
void SwRedlineTable::DeleteAndDestroy | ( | size_type | nPos | ) |
Definition at line 698 of file docredln.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::begin(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::erase(), LOKRedlineNotification(), maVector, and Remove.
Referenced by sw::DocumentRedlineManager::AppendRedline(), sw::DocumentRedlineManager::CompressRedlines(), SwDoc::CorrAbs(), sw::DocumentRedlineManager::DeleteRedline(), and sw::DocumentRedlineManager::SplitRedline().
void SwRedlineTable::DeleteAndDestroyAll | ( | ) |
Definition at line 686 of file docredln.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::back(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::empty(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::erase_at(), LOKRedlineNotification(), m_bHasOverlappingElements, maVector, Remove, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
Referenced by SwDoc::ClearDoc(), and SwDoc::~SwDoc().
void SwRedlineTable::dumpAsXml | ( | xmlTextWriterPtr | pWriter | ) | const |
|
inline |
Definition at line 267 of file docary.hxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::empty(), and maVector.
Referenced by sw::DocumentRedlineManager::AcceptAllRedline(), sw::DocumentContentOperationsManager::AppendTextNode(), SwUndoInsert::CanGrouping(), ChgTextToNum(), sw::DocumentContentOperationsManager::CopyRange(), sw::DocumentContentOperationsManager::DeleteAndJoinImpl(), sw::DocumentContentOperationsManager::DeleteDummyChar(), sw::DocumentContentOperationsManager::DeleteRange(), sw::DocumentContentOperationsManager::DeleteRangeImplImpl(), sw::DocumentContentOperationsManager::DelFullPara(), SwDocShell::Execute(), MSWordExportBase::ExportDocument(), SwTableBox::GetRedline(), SwTableLine::GetRedlineType(), SwTable::HasDeletedRowOrCell(), SwXRedlines::hasElements(), sw::DocumentContentOperationsManager::InsertString(), SwTable::IsDeleted(), IsExtraData(), sw::DocumentContentOperationsManager::MoveNodeRange(), sw::DocumentContentOperationsManager::MoveRange(), sw::DocumentContentOperationsManager::Overwrite(), SwUndoInserts::RedoImpl(), SwUndoInsert::RedoImpl(), SwUndoCompDoc::RedoImpl(), SwUndoInsSection::RedoImpl(), SwUndoSplitNode::RedoImpl(), SwUndoInsTable::RedoImpl(), sw::DocumentContentOperationsManager::ReplaceRangeImpl(), SaveRedlEndPosForRestore::SaveRedlEndPosForRestore(), sw::DocumentContentOperationsManager::SplitNode(), SwRowFrame::SwRowFrame(), SwTabFrame::SwTabFrame(), SwUndoDelete::SwUndoDelete(), SwUndoOverwrite::SwUndoOverwrite(), SwWW8AttrIter::SwWW8AttrIter(), and UnHide().
|
inline |
Definition at line 271 of file docary.hxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), and maVector.
Referenced by sw::DocumentRedlineManager::GetRedlinePos().
const SwRangeRedline * SwRedlineTable::FindAtPosition | ( | const SwPosition & | startPosition, |
size_type & | tableIndex, | ||
bool | next = true |
||
) | const |
Find the redline at the given position.
tableIndex | position 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) |
next | true: redline starts at position and ends after, false: redline starts before position and ends at or after |
Definition at line 765 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(), SwCursorShell::GetContentAtPos(), SwTableLine::GetTableRedline(), SwTextFormatter::NewFootnoteNumPortion(), sw::DocumentRedlineManager::SelNextRedline(), and sw::DocumentRedlineManager::SelPrevRedline().
SwRedlineTable::size_type SwRedlineTable::FindNextOfSeqNo | ( | size_type | nSttPos | ) | const |
Definition at line 706 of file docredln.cxx.
References FindNextSeqNo(), npos, and size().
Referenced by SwCursorShell::GotoRedline().
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 seq.no.
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 721 of file docredln.cxx.
Referenced by sw::DocumentRedlineManager::AcceptRedline(), FindNextOfSeqNo(), and sw::DocumentRedlineManager::RejectRedline().
SwRedlineTable::size_type SwRedlineTable::FindPrevOfSeqNo | ( | size_type | nSttPos | ) | const |
Definition at line 713 of file docredln.cxx.
References FindPrevSeqNo(), and npos.
Referenced by SwCursorShell::GotoRedline().
SwRedlineTable::size_type SwRedlineTable::FindPrevSeqNo | ( | sal_uInt16 | nSeqNo, |
size_type | nSttPos | ||
) | const |
Definition at line 744 of file docredln.cxx.
Referenced by sw::DocumentRedlineManager::AcceptRedline(), FindPrevOfSeqNo(), and sw::DocumentRedlineManager::RejectRedline().
SwRedlineTable::size_type SwRedlineTable::GetPos | ( | const SwRangeRedline * | p | ) | const |
Definition at line 653 of file docredln.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::begin(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), maVector, npos, and p.
Referenced by sw::DocumentRedlineManager::AcceptRedline(), sw::DocumentRedlineManager::AppendRedline(), sw::DocumentRedlineManager::HideAll(), sw::DocumentRedlineManager::RejectRedline(), Remove(), sw::DocumentRedlineManager::ShowAll(), and SwUndoRedline::UndoImpl().
|
inline |
Definition at line 238 of file docary.hxx.
References m_bHasOverlappingElements.
Referenced by sw::DocumentRedlineManager::GetRedlinePos().
bool SwRedlineTable::Insert | ( | SwRangeRedline *& | p | ) |
Definition at line 416 of file docredln.cxx.
References Add, begin(), CheckOverlapping(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), InsertWithValidRanges(), isMoved(), LOKRedlineNotification(), maVector, and p.
Referenced by sw::DocumentRedlineManager::AppendRedline(), sw::DocumentRedlineManager::DeleteRedline(), InsertWithValidRanges(), SwDoc::MoveParagraphImpl(), SwUndoCompDoc::RedoImpl(), and sw::DocumentRedlineManager::SplitRedline().
bool SwRedlineTable::Insert | ( | SwRangeRedline *& | p, |
size_type & | rInsPos | ||
) |
Definition at line 467 of file docredln.cxx.
References begin(), CheckOverlapping(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), InsertWithValidRanges(), maVector, and p.
bool SwRedlineTable::InsertWithValidRanges | ( | SwRangeRedline *& | p, |
size_type * | pInsPos = nullptr |
||
) |
Definition at line 608 of file docredln.cxx.
References sw::GetAllValidRanges(), Insert(), lcl_setRowNotTracked(), and p.
Referenced by Insert().
bool SwRedlineTable::isMoved | ( | size_type | tableIndex | ) | const |
Definition at line 791 of file docredln.cxx.
References abs(), SwRangeRedline::Add, SwNode::EndOfSectionNode(), SwRangeRedline::GetAuthor(), SwRangeRedline::GetContentIdx(), SwNodeIndex::GetNode(), SwPaM::GetText(), SwRangeRedline::GetType(), SwRangeRedline::InvalidateRange(), SwRangeRedline::SetMoved(), size(), and o3tl::trim().
Referenced by sw::DocumentRedlineManager::AppendRedline(), and Insert().
|
static |
Emits LOK notification about one addition / removal of a redline item.
Definition at line 344 of file docredln.cxx.
References Add, SfxViewShell::Current(), SwShellCursor::FillRects(), SwContentNode::FindLayoutRect(), SwRangeRedline::GetAuthorString(), SwRedlineData::GetComment(), SwNode::GetContentNode(), IDocumentLayoutAccess::GetCurrentViewShell(), SwRangeRedline::GetDescr(), SwPaM::GetDoc(), SfxViewShell::GetDocId(), SfxViewShell::GetFirst(), SwRangeRedline::GetId(), SwDoc::getIDocumentLayoutAccess(), SwPaM::GetMark(), SfxViewShell::GetNext(), GetNode(), SwPaM::GetPointContentNode(), SwRangeRedline::GetRedlineData(), SwRedlineData::GetTimeStamp(), SwRedlineData::GetType(), DateTime::GetUNODateTime(), SwView::GetWrtShell(), SwViewShell::InvalidateWindows(), SwDoc::IsInDtor(), comphelper::string::join(), SfxViewShell::libreOfficeKitViewCallback(), Modify, nType, Remove, SwShellCursor::SetMark(), SwPaM::StartEnd(), SwRedlineTypeToOUString(), and utl::toISO8601().
Referenced by DeleteAndDestroy(), DeleteAndDestroyAll(), Insert(), MaybeNotifyRedlineModification(), SwRangeRedline::MaybeNotifyRedlinePositionModification(), Remove(), and SwTextNode::Update().
|
inline |
Definition at line 269 of file docary.hxx.
void SwRedlineTable::Remove | ( | const SwRangeRedline * | p | ) |
void SwRedlineTable::Remove | ( | size_type | nPos | ) |
Definition at line 669 of file docredln.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::begin(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::erase(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::front(), IDocumentLayoutAccess::GetCurrentViewShell(), SwDoc::getIDocumentLayoutAccess(), SwViewShell::InvalidateWindows(), SwDoc::IsInDtor(), LOKRedlineNotification(), maVector, Remove, SAL_MAX_INT32, and size().
Referenced by sw::DocumentRedlineManager::AppendRedline(), sw::DocumentRedlineManager::DeleteRedline(), XMLRedlineImportHelper::InsertIntoDocument(), SwDoc::MoveParagraphImpl(), Remove(), and sw::DocumentRedlineManager::SplitRedline().
|
inline |
Definition at line 272 of file docary.hxx.
References maVector, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::Resort().
Referenced by SwTable::ConvertSubtables(), and sw::DocumentRedlineManager::SetRedlineFlags().
|
inline |
Definition at line 268 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(), SwTableBox::GetRedline(), 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().
|
private |
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 229 of file docary.hxx.
Referenced by CheckOverlapping(), DeleteAndDestroyAll(), and HasOverlappingElements().
|
private |
Definition at line 226 of file docary.hxx.
Referenced by begin(), CheckOverlapping(), Contains(), DeleteAndDestroy(), DeleteAndDestroyAll(), empty(), end(), FindAtPosition(), GetPos(), Insert(), operator[](), Remove(), Resort(), size(), and ~SwRedlineTable().
|
staticconstexpr |
Definition at line 224 of file docary.hxx.
Referenced by sw::DocumentRedlineManager::AcceptRedline(), SwRedlineAcceptDlg::Activate(), SwTextNode::AddToList(), SwRedlineAcceptDlg::CalcDiff(), SwRedlineAcceptDlg::CallAcceptReject(), SwRedlineItr::CheckLine(), SwAttrIter::CtorInitAttrIter(), SwTextFrame::EmptyHeight(), SwView::Execute(), FindNextOfSeqNo(), FindNextSeqNo(), FindPrevOfSeqNo(), FindPrevSeqNo(), SwEditShell::FindRedlineOfData(), SwCursorShell::GetContentAtPos(), SwAttrIter::GetNextAttr(), SwRedlineItr::GetNextRedln(), GetPos(), SwTableBox::GetRedline(), sw::DocumentRedlineManager::GetRedlinePos(), SwRedlineAcceptDlg::GetRedlinePos(), SwTextNode::GetRedlineText(), SwTableLine::GetRedlineType(), SwTableBox::GetRedlineType(), SwTableLine::GetTableRedline(), SwCursorShell::GotoRedline(), SwDoc::HasRowNotTracked(), IMPL_LINK(), IMPL_LINK_NOARG(), SwRedlineAcceptDlg::InitAuthors(), SwRedlineAcceptDlg::InsertParents(), SwTableLine::IsTracked(), lcl_GetRedlineAtNodeInsertionOrDeletion(), sw::DocumentContentOperationsManager::MoveNodeRange(), SwDoc::MoveParagraphImpl(), SwTextFrame::PaintEmpty(), SwTextFrame::PaintExtraData(), SwTextFrame::RegisterToNode(), sw::DocumentRedlineManager::RejectRedline(), Remove(), SwRedlineItr::Reset(), SwRedlineItr::Seek(), SwDoc::SetRowNotTracked(), DocxAttributeOutput::TableCellRedline(), DocxAttributeOutput::TableRowRedline(), SwUndoRedlineSort::UndoRedlineImpl(), and SwTableLine::UpdateTextChangesOnly().