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

#include <redline.hxx>

Inheritance diagram for SwRangeRedline:
[legend]
Collaboration diagram for SwRangeRedline:
[legend]

Public Types

enum class  Invalidation {
  Add ,
  Remove
}
 
- Public Types inherited from sw::Ring< SwPaM >
typedef std::add_const< SwPaM >::type const_value_type
 
typedef RingContainer< SwPaMring_container
 
typedef RingContainer< const_value_typeconst_ring_container
 

Public Member Functions

 SwRangeRedline (RedlineType eType, const SwPaM &rPam)
 
 SwRangeRedline (const SwRedlineData &rData, const SwPaM &rPam)
 
 SwRangeRedline (const SwRedlineData &rData, const SwPosition &rPos)
 
 SwRangeRedline (SwRedlineData *pData, const SwPosition &rPos, bool bDelLP)
 
 SwRangeRedline (const SwRangeRedline &)
 
virtual ~SwRangeRedline () override
 
sal_uInt32 GetId () const
 
const SwNodeIndexGetContentIdx () const
 
void SetContentIdx (const SwNodeIndex &)
 
void ClearContentIdx ()
 
bool IsVisible () const
 
bool IsDelLastPara () const
 
void SetStart (const SwPosition &rPos, SwPosition *pSttPtr=nullptr)
 
void SetEnd (const SwPosition &rPos, SwPosition *pEndPtr=nullptr)
 
bool HasValidRange () const
 Do we have a valid selection? More...
 
const SwRedlineDataGetRedlineData (sal_uInt16 nPos=0) const
 
bool operator!= (const SwRedlineData &rCmp) const
 
void SetAutoFormat ()
 
bool IsAutoFormat () const
 
sal_uInt16 GetStackCount () const
 
std::size_t GetAuthor (sal_uInt16 nPos=0) const
 
OUString const & GetAuthorString (sal_uInt16 nPos=0) const
 
const DateTimeGetTimeStamp (sal_uInt16 nPos=0) const
 
RedlineType GetType (sal_uInt16 nPos=0) const
 
bool IsAnnotation () const
 
const OUString & GetComment (sal_uInt16 nPos=0) const
 
void SetComment (const OUString &rS)
 
void SetExtraData (const SwRedlineExtraData *pData)
 ExtraData gets copied, the pointer is therefore not taken over by the RedLineObject. More...
 
const SwRedlineExtraDataGetExtraData () const
 
sal_uInt16 GetSeqNo () const
 
void SetSeqNo (sal_uInt16 nNo)
 
void CallDisplayFunc (size_t nMyPos)
 
void Show (sal_uInt16 nLoop, size_t nMyPos, bool bForced=false)
 
void Hide (sal_uInt16 nLoop, size_t nMyPos, bool bForced=false)
 
void ShowOriginal (sal_uInt16 nLoop, size_t nMyPos, bool bForced=false)
 
void CalcStartEnd (SwNodeOffset nNdIdx, sal_Int32 &rStart, sal_Int32 &rEnd) const
 Calculates the intersection with text node number nNdIdx. More...
 
void InvalidateRange (Invalidation)
 Initiate the layout. More...
 
bool IsOwnRedline (const SwRangeRedline &rRedl) const
 
bool CanCombine (const SwRangeRedline &rRedl) const
 
void PushData (const SwRangeRedline &rRedl, bool bOwnAsNext=true)
 
bool PopData ()
 
OUString GetDescr (bool bSimplified=false)
 Returns textual description of a redline data element of this redline. More...
 
bool operator< (const SwRangeRedline &) const
 
void dumpAsXml (xmlTextWriterPtr pWriter) const
 
void MaybeNotifyRedlinePositionModification (tools::Long nTop)
 
void SetMoved ()
 
bool IsMoved () const
 
- Public Member Functions inherited from SwPaM
 SwPaM (const SwPosition &rPos, SwPaM *pRing=nullptr)
 
 SwPaM (const SwPosition &rMk, const SwPosition &rPt, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNodeIndex &rMk, const SwNodeIndex &rPt, SwNodeOffset nMkOffset=SwNodeOffset(0), SwNodeOffset nPtOffset=SwNodeOffset(0), SwPaM *pRing=nullptr)
 
 SwPaM (const SwNode &rMk, const SwNode &rPt, SwNodeOffset nMkOffset=SwNodeOffset(0), SwNodeOffset nPtOffset=SwNodeOffset(0), SwPaM *pRing=nullptr)
 
 SwPaM (const SwNodeIndex &rMk, sal_Int32 nMkContent, const SwNodeIndex &rPt, sal_Int32 nPtContent, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNode &rMk, sal_Int32 nMkContent, const SwNode &rPt, sal_Int32 nPtContent, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNode &rMk, SwNodeOffset nMkOffset, sal_Int32 nMkContent, const SwNode &rPt, SwNodeOffset nPtOffset, sal_Int32 nPtContent, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNode &rNd, SwNodeOffset nNdOffset, sal_Int32 nContent=0, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNode &rNd, sal_Int32 nContent=0, SwPaM *pRing=nullptr)
 
 SwPaM (const SwNodeIndex &rNd, sal_Int32 nContent=0, SwPaM *pRing=nullptr)
 
 SwPaM (SwNodes &rNds, SwNodeOffset nMkOffset=SwNodeOffset(0), SwPaM *pRing=nullptr)
 
virtual ~SwPaM () override
 
 SwPaM (SwPaM const &rPaM, SwPaM *pRing)
 this takes a second parameter, which indicates the Ring that the new PaM should be part of (may be null) More...
 
SwPaMoperator= (const SwPaM &)
 @@ semantic: no copy assignment for super class Ring. More...
 
bool Move (SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
 Movement of cursor. More...
 
bool IsInFrontOfLabel () const
 
void SetInFrontOfLabel_ (bool bNew)
 
virtual void SetMark ()
 Unless this is called, the getter method of Mark will return Point. More...
 
void DeleteMark ()
 
void Exchange ()
 
bool HasMark () const
 A PaM marks a selection if Point and Mark are distinct positions. More...
 
const SwPositionGetPoint () const
 
SwPositionGetPoint ()
 
const SwPositionGetMark () const
 
SwPositionGetMark ()
 
const SwPositionStart () const
 
SwPositionStart ()
 
const SwPositionEnd () const
 
SwPositionEnd ()
 
std::pair< const SwPosition *, const SwPosition * > StartEnd () const
 Because sometimes the cost of the operator<= can add up. More...
 
std::pair< SwPosition *, SwPosition * > StartEnd ()
 
SwNodeGetPointNode () const
 
SwNodeGetMarkNode () const
 
SwContentNodeGetPointContentNode () const
 
SwContentNodeGetMarkContentNode () const
 
void Normalize (bool bPointFirst=true)
 Normalizes PaM, i.e. More...
 
SwDocGetDoc () const
 
SwPositionGetBound (bool bOne=true)
 
const SwPositionGetBound (bool bOne=true) const
 
sal_uInt16 GetPageNum (bool bAtPoint=true, const Point *pLayPos=nullptr)
 Get number of page which contains cursor. More...
 
bool HasReadonlySel (bool bFormView, bool isReplace) const
 Is in something protected (readonly) or selection contains something protected. More...
 
bool HasHiddenSections () const
 Is there hidden sections in the selected area. More...
 
bool ContainsPosition (const SwPosition &rPos) const
 
OUString GetText () const
 
void InvalidatePaM ()
 
SwPaMGetNext ()
 
const SwPaMGetNext () const
 
SwPaMGetPrev ()
 
const SwPaMGetPrev () const
 
bool IsMultiSelection () const
 
void dumpAsXml (xmlTextWriterPtr pWriter) const
 
- Public Member Functions inherited from sw::Ring< SwPaM >
virtual ~Ring () COVERITY_NOEXCEPT_FALSE
 
void unlink ()
 algo::unlink is buggy! don't call it directly! More...
 
void MoveTo (SwPaM *pDestRing)
 Removes this item from its current ring container and adds it to another ring container. More...
 
ring_container GetRingContainer ()
 
const_ring_container GetRingContainer () const
 

Static Public Attributes

static sal_uInt32 s_nLastId = 1
 

Private Member Functions

void MoveToSection ()
 
void CopyToSection ()
 
void DelCopyOfSection (size_t nMyPos)
 
void MoveFromSection (size_t nMyPos)
 

Private Attributes

SwRedlineDatam_pRedlineData
 
std::optional< SwNodeIndexm_oContentSect
 
std::optional< tools::Longm_oLOKLastNodeTop
 
sal_uInt32 m_nId
 
bool m_bDelLastPara: 1
 
bool m_bIsVisible: 1
 

Additional Inherited Members

- Protected Member Functions inherited from sw::Ring< SwPaM >
 Ring ()
 Creates a new item in a ring container all by itself. More...
 
 Ring (SwPaM *pRing)
 Creates a new item and add it to an existing ring container. More...
 
SwPaMGetNextInRing ()
 
const_value_typeGetNextInRing () const
 
SwPaMGetPrevInRing ()
 
const_value_typeGetPrevInRing () const
 
bool unique () const
 

Detailed Description

Definition at line 162 of file redline.hxx.

Member Enumeration Documentation

◆ Invalidation

enum class SwRangeRedline::Invalidation
strong
Enumerator
Add 
Remove 

Definition at line 252 of file redline.hxx.

Constructor & Destructor Documentation

◆ SwRangeRedline() [1/5]

SwRangeRedline::SwRangeRedline ( RedlineType  eType,
const SwPaM rPam 
)

◆ SwRangeRedline() [2/5]

SwRangeRedline::SwRangeRedline ( const SwRedlineData rData,
const SwPaM rPam 
)

◆ SwRangeRedline() [3/5]

SwRangeRedline::SwRangeRedline ( const SwRedlineData rData,
const SwPosition rPos 
)

◆ SwRangeRedline() [4/5]

SwRangeRedline::SwRangeRedline ( SwRedlineData pData,
const SwPosition rPos,
bool  bDelLP 
)
inline

Definition at line 183 of file redline.hxx.

References pData.

◆ SwRangeRedline() [5/5]

SwRangeRedline::SwRangeRedline ( const SwRangeRedline rCpy)

◆ ~SwRangeRedline()

SwRangeRedline::~SwRangeRedline ( )
overridevirtual

Member Function Documentation

◆ CalcStartEnd()

void SwRangeRedline::CalcStartEnd ( SwNodeOffset  nNdIdx,
sal_Int32 &  rStart,
sal_Int32 &  rEnd 
) const

Calculates the intersection with text node number nNdIdx.

Calculates the start and end position of the intersection rTmp and text node nNdIdx.

Definition at line 1470 of file docredln.cxx.

References COMPLETE_STRING, and SwPaM::StartEnd().

Referenced by SwCursorShell::GetContentAtPos(), SwRedlineItr::GetNextRedln(), lcl_CollectDeletedRedlines(), lcl_MaskDeletedRedlines(), lcl_MaskRedlines(), SwRedlineItr::Seek(), and SwScriptInfo::selectRedLineDeleted().

◆ CallDisplayFunc()

void SwRangeRedline::CallDisplayFunc ( size_t  nMyPos)

◆ CanCombine()

bool SwRangeRedline::CanCombine ( const SwRangeRedline rRedl) const

◆ ClearContentIdx()

void SwRangeRedline::ClearContentIdx ( )

Definition at line 1908 of file docredln.cxx.

References m_oContentSect.

Referenced by SwRedlineSaveData::SwRedlineSaveData().

◆ CopyToSection()

void SwRangeRedline::CopyToSection ( )
private

◆ DelCopyOfSection()

void SwRangeRedline::DelCopyOfSection ( size_t  nMyPos)
private

◆ dumpAsXml()

void SwRangeRedline::dumpAsXml ( xmlTextWriterPtr  pWriter) const

◆ GetAuthor()

std::size_t SwRangeRedline::GetAuthor ( sal_uInt16  nPos = 0) const

◆ GetAuthorString()

OUString const & SwRangeRedline::GetAuthorString ( sal_uInt16  nPos = 0) const

◆ GetComment()

const OUString & SwRangeRedline::GetComment ( sal_uInt16  nPos = 0) const

◆ GetContentIdx()

const SwNodeIndex * SwRangeRedline::GetContentIdx ( ) const
inline

◆ GetDescr()

OUString SwRangeRedline::GetDescr ( bool  bSimplified = false)

Returns textual description of a redline data element of this redline.

The textual description of the selected element contains the kind of redline and the possibly shortened text of the redline.

Returns
textual description of the selected redline data element

bSimplified = simplified shortened text to show deletions on margin

Definition at line 2016 of file docredln.cxx.

References SwRewriter::AddRule(), SwRewriter::Apply(), sw::Default, DenoteSpecialCharacters(), SwPosition::GetContentIndex(), SwRedlineData::GetDescr(), getLength(), SwPaM::GetPoint(), SwPaM::GetPointNode(), GetRedlineData(), SwPaM::GetText(), SwNode::GetTextNode(), m_oContentSect, nPos, nUndoStringLength, ShortenString(), SwPaM::SwPaM(), SwResId(), and UndoArg1.

Referenced by sw::DocumentRedlineManager::AcceptRedline(), dumpAsXml(), SwRedlineTable::LOKRedlineNotification(), and sw::DocumentRedlineManager::RejectRedline().

◆ GetExtraData()

const SwRedlineExtraData * SwRangeRedline::GetExtraData ( ) const
inline

Definition at line 231 of file redline.hxx.

References SwRedlineData::GetExtraData().

◆ GetId()

sal_uInt32 SwRangeRedline::GetId ( ) const
inline

◆ GetRedlineData()

const SwRedlineData & SwRangeRedline::GetRedlineData ( sal_uInt16  nPos = 0) const

◆ GetSeqNo()

sal_uInt16 SwRangeRedline::GetSeqNo ( ) const
inline

◆ GetStackCount()

sal_uInt16 SwRangeRedline::GetStackCount ( ) const

◆ GetTimeStamp()

const DateTime & SwRangeRedline::GetTimeStamp ( sal_uInt16  nPos = 0) const

◆ GetType()

RedlineType SwRangeRedline::GetType ( sal_uInt16  nPos = 0) const

Definition at line 1975 of file docredln.cxx.

References GetRedlineData(), SwRedlineData::m_eType, and nPos.

Referenced by SwAccessibleParagraph::_correctValues(), sw::DocumentRedlineManager::AcceptRedlineParagraphFormatting(), SwRedlineAcceptDlg::Activate(), sw::DocumentRedlineManager::AppendRedline(), SwLineLayout::CalcLine(), SwRedlineAcceptDlg::CallAcceptReject(), SwRedlineItr::CheckLine(), SwXRedlinePortion::CreateRedlineProperties(), sw::DocumentRedlineManager::DeleteRedline(), dumpAsXml(), SwDocShell::Execute(), SwUndo::FillSaveDataForFormat(), SwRedlineAcceptDlg::GetActionImage(), SwRedlineAcceptDlg::GetActionText(), SwCursorShell::GetContentAtPos(), SwPostItHelper::getLayoutInfos(), SwRedlineItr::GetNextRedln(), SwXRedlinePortion::GetPropertyValue(), sw::GetRanges(), sw::DocumentRedlineManager::GetRedlinePos(), SwTextNode::GetRedlineText(), SwTableBox::GetRedlineType(), SwWW8AttrIter::GetRunLevelRedline(), SwCursorShell::GotoRedline_(), sw::DocumentRedlineManager::HasRedline(), SwDoc::HasRowNotTracked(), Hide(), sw::DocumentRedlineManager::HideAll(), IMPL_LINK(), IMPL_LINK_NOARG(), SwRedlineAcceptDlg::InitAuthors(), SwRedlineAcceptDlg::InsertChildren(), InsertCnt_(), SwRedlineAcceptDlg::InsertParents(), SwNodes::InsertTextSection(), InvalidateRange(), sw::IsFieldDeletedInModel(), sw::IsFootnoteDeleted(), SwRedlineTable::isMoved(), lcl_BuildTitleWithRedline(), lcl_CollectDeletedRedlines(), lcl_GetRedlineAtNodeInsertionOrDeletion(), lcl_GetRedlineHelp(), lcl_MaskDeletedRedlines(), lcl_MaskRedlines(), lcl_setRedlineAttr(), SwTextFrame::MakePos(), SwDoc::MergeDoc(), SwDoc::MoveParagraphImpl(), SwTextFormatter::NewFootnoteNumPortion(), SwTextFrame::PaintEmpty(), sw::ReplaceImpl(), SwRedlineItr::Seek(), SwScriptInfo::selectRedLineDeleted(), sw::DocumentRedlineManager::SelNextRedline(), sw::DocumentRedlineManager::SelPrevRedline(), SwDoc::SetRowNotTracked(), Show(), DocxAttributeOutput::TableCellRedline(), DocxAttributeOutput::TableRowRedline(), UnHideRedlines(), and SwTableLine::UpdateTextChangesOnly().

◆ HasValidRange()

bool SwRangeRedline::HasValidRange ( ) const

◆ Hide()

void SwRangeRedline::Hide ( sal_uInt16  nLoop,
size_t  nMyPos,
bool  bForced = false 
)

◆ InvalidateRange()

void SwRangeRedline::InvalidateRange ( Invalidation  eWhy)

◆ IsAnnotation()

bool SwRangeRedline::IsAnnotation ( ) const

Definition at line 1980 of file docredln.cxx.

References CH_TXTATR_INWORD, and SwPaM::GetText().

Referenced by SwRedlineAcceptDlg::GetActionImage(), and SwRangeRedline().

◆ IsAutoFormat()

bool SwRangeRedline::IsAutoFormat ( ) const
inline

Definition at line 213 of file redline.hxx.

References SwRedlineData::IsAutoFormat().

Referenced by SwRedlineAcceptDlg::InsertChildren().

◆ IsDelLastPara()

bool SwRangeRedline::IsDelLastPara ( ) const
inline

◆ IsMoved()

bool SwRangeRedline::IsMoved ( ) const
inline

◆ IsOwnRedline()

bool SwRangeRedline::IsOwnRedline ( const SwRangeRedline rRedl) const
inline

Definition at line 256 of file redline.hxx.

References GetAuthor().

Referenced by sw::DocumentRedlineManager::AppendRedline(), and SwDoc::MoveParagraphImpl().

◆ IsVisible()

bool SwRangeRedline::IsVisible ( ) const
inline

◆ MaybeNotifyRedlinePositionModification()

void SwRangeRedline::MaybeNotifyRedlinePositionModification ( tools::Long  nTop)

Definition at line 1236 of file docredln.cxx.

References SwRedlineTable::LOKRedlineNotification(), m_oLOKLastNodeTop, and Modify.

Referenced by SwTextFrame::MakePos().

◆ MoveFromSection()

void SwRangeRedline::MoveFromSection ( size_t  nMyPos)
private

◆ MoveToSection()

void SwRangeRedline::MoveToSection ( )
private

◆ operator!=()

bool SwRangeRedline::operator!= ( const SwRedlineData rCmp) const
inline

Definition at line 210 of file redline.hxx.

◆ operator<()

bool SwRangeRedline::operator< ( const SwRangeRedline rCmp) const

Definition at line 1990 of file docredln.cxx.

References SwPaM::End(), and SwPaM::Start().

◆ PopData()

bool SwRangeRedline::PopData ( )

Definition at line 1941 of file docredln.cxx.

References SwRedlineData::m_pNext, and m_pRedlineData.

◆ PushData()

void SwRangeRedline::PushData ( const SwRangeRedline rRedl,
bool  bOwnAsNext = true 
)

Definition at line 1926 of file docredln.cxx.

References SwRedlineData::m_pNext, and m_pRedlineData.

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

◆ SetAutoFormat()

void SwRangeRedline::SetAutoFormat ( )
inline

Definition at line 212 of file redline.hxx.

References SwRedlineData::SetAutoFormat().

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

◆ SetComment()

void SwRangeRedline::SetComment ( const OUString &  rS)
inline

◆ SetContentIdx()

void SwRangeRedline::SetContentIdx ( const SwNodeIndex rIdx)

◆ SetEnd()

void SwRangeRedline::SetEnd ( const SwPosition rPos,
SwPosition pEndPtr = nullptr 
)

◆ SetExtraData()

void SwRangeRedline::SetExtraData ( const SwRedlineExtraData pData)
inline

ExtraData gets copied, the pointer is therefore not taken over by the RedLineObject.

Definition at line 229 of file redline.hxx.

References pData, and SwRedlineData::SetExtraData().

Referenced by sw::DocumentRedlineManager::AppendRedline(), SwUnoCursorHelper::makeRedline(), SwDoc::SetFormatItemByAutoFormat(), SwEditShell::SetTextFormatColl(), and SwDoc::SetTextFormatCollByAutoFormat().

◆ SetMoved()

void SwRangeRedline::SetMoved ( )
inline

Definition at line 281 of file redline.hxx.

References SwRedlineData::SetMoved().

Referenced by SwRedlineTable::isMoved(), and SwUnoCursorHelper::makeRedline().

◆ SetSeqNo()

void SwRangeRedline::SetSeqNo ( sal_uInt16  nNo)
inline

Definition at line 238 of file redline.hxx.

References SwRedlineData::SetSeqNo().

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

◆ SetStart()

void SwRangeRedline::SetStart ( const SwPosition rPos,
SwPosition pSttPtr = nullptr 
)

◆ Show()

void SwRangeRedline::Show ( sal_uInt16  nLoop,
size_t  nMyPos,
bool  bForced = false 
)

◆ ShowOriginal()

void SwRangeRedline::ShowOriginal ( sal_uInt16  nLoop,
size_t  nMyPos,
bool  bForced = false 
)

Member Data Documentation

◆ m_bDelLastPara

bool SwRangeRedline::m_bDelLastPara
private

Definition at line 168 of file redline.hxx.

Referenced by DelCopyOfSection(), MoveFromSection(), MoveToSection(), and SwRangeRedline().

◆ m_bIsVisible

bool SwRangeRedline::m_bIsVisible
private

Definition at line 169 of file redline.hxx.

Referenced by Hide(), SetContentIdx(), Show(), ShowOriginal(), and SwRangeRedline().

◆ m_nId

sal_uInt32 SwRangeRedline::m_nId
private

Definition at line 167 of file redline.hxx.

◆ m_oContentSect

std::optional<SwNodeIndex> SwRangeRedline::m_oContentSect
private

◆ m_oLOKLastNodeTop

std::optional<tools::Long> SwRangeRedline::m_oLOKLastNodeTop
private

Definition at line 166 of file redline.hxx.

Referenced by MaybeNotifyRedlinePositionModification().

◆ m_pRedlineData

SwRedlineData* SwRangeRedline::m_pRedlineData
private

◆ s_nLastId

sal_uInt32 SwRangeRedline::s_nLastId = 1
static

Definition at line 177 of file redline.hxx.


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