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:
Collaboration diagram for SwRangeRedline:

Public Types

enum  Invalidation {
- 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
SwNodeIndexGetContentIdx () const
void SetContentIdx (const SwNodeIndex *)
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 &rNd, sal_Int32 nContent=0, SwPaM *pRing=nullptr)
 SwPaM (const SwNodeIndex &rNd, sal_Int32 nContent=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 ()
SwNodeGetNode (bool bPoint=true) const
SwContentNodeGetContentNode (bool bPoint=true) 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) const
 Is in something protected (readonly) or selection contains something protected. 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 >
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

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

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 156 of file redline.hxx.

Member Enumeration Documentation


Definition at line 243 of file redline.hxx.

Constructor & Destructor Documentation

SwRangeRedline::SwRangeRedline ( RedlineType  eType,
const SwPaM rPam 
SwRangeRedline::SwRangeRedline ( const SwRedlineData rData,
const SwPaM rPam 

Definition at line 1127 of file docredln.cxx.

References SwPaM::DeleteMark(), SwPaM::HasMark(), m_bDelLastPara, and m_bIsVisible.

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

Definition at line 1139 of file docredln.cxx.

References m_bDelLastPara, and m_bIsVisible.

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

Definition at line 178 of file redline.hxx.

SwRangeRedline::SwRangeRedline ( const SwRangeRedline rCpy)

Definition at line 1149 of file docredln.cxx.

References SwPaM::DeleteMark(), SwPaM::HasMark(), m_bDelLastPara, and m_bIsVisible.

SwRangeRedline::~SwRangeRedline ( )

Member Function Documentation

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 1422 of file docredln.cxx.

References COMPLETE_STRING, SwPaM::End(), SwIndex::GetIndex(), SwPosition::nContent, SwPosition::nNode, and SwPaM::Start().

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

void SwRangeRedline::CallDisplayFunc ( size_t  nMyPos)
bool SwRangeRedline::CanCombine ( const SwRangeRedline rRedl) const
void SwRangeRedline::CopyToSection ( )
void SwRangeRedline::DelCopyOfSection ( size_t  nMyPos)
void SwRangeRedline::dumpAsXml ( xmlTextWriterPtr  pWriter) const
std::size_t SwRangeRedline::GetAuthor ( sal_uInt16  nPos = 0) const
OUString const & SwRangeRedline::GetAuthorString ( sal_uInt16  nPos = 0) const
const OUString & SwRangeRedline::GetComment ( sal_uInt16  nPos = 0) const
SwNodeIndex* SwRangeRedline::GetContentIdx ( ) const
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.

textual description of the selected redline data element

bSimplified = simplified shortened text to show deletions on margin

Definition at line 1970 of file docredln.cxx.

References SwRewriter::AddRule(), SwRewriter::Apply(), DenoteSpecialCharacters(), SwNode::EndOfSectionNode(), SwRedlineData::GetDescr(), SwIndex::GetIndex(), getLength(), SwNodeIndex::GetNode(), SwPaM::GetNode(), SwPaM::GetPoint(), GetRedlineData(), SwPaM::GetText(), SwNode::GetTextNode(), m_pContentSect, SwPosition::nContent, nPos, nUndoStringLength, ShortenString(), SwPaM::SwPaM(), SwResId(), and UndoArg1.

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

const SwRedlineExtraData* SwRangeRedline::GetExtraData ( ) const

Definition at line 222 of file redline.hxx.

References SwRedlineData::GetExtraData().

sal_uInt32 SwRangeRedline::GetId ( ) const
const SwRedlineData & SwRangeRedline::GetRedlineData ( sal_uInt16  nPos = 0) const
sal_uInt16 SwRangeRedline::GetSeqNo ( ) const
sal_uInt16 SwRangeRedline::GetStackCount ( ) const
const DateTime & SwRangeRedline::GetTimeStamp ( sal_uInt16  nPos = 0) const
RedlineType SwRangeRedline::GetType ( sal_uInt16  nPos = 0) const

Definition at line 1929 of file docredln.cxx.

References GetRedlineData(), and SwRedlineData::m_eType.

Referenced by SwAccessibleParagraph::_correctValues(), sw::DocumentRedlineManager::AcceptRedlineParagraphFormatting(), SwRedlineAcceptDlg::Activate(), sw::DocumentRedlineManager::AppendRedline(), SwLineLayout::CalcLine(), SwRedlineAcceptDlg::CallAcceptReject(), SwXRedlinePortion::CreateRedlineProperties(), sw::DocumentRedlineManager::DeleteRedline(), dumpAsXml(), SwDocShell::Execute(), SwUndo::FillSaveDataForFormat(), SwRedlineAcceptDlg::GetActionImage(), SwRedlineAcceptDlg::GetActionText(), SwPostItHelper::getLayoutInfos(), SwRedlineItr::GetNextRedln(), SwXRedlinePortion::GetPropertyValue(), sw::DocumentRedlineManager::GetRedlinePos(), SwTextNode::GetRedlineText(), SwWW8AttrIter::GetRunLevelRedline(), SwCursorShell::GotoRedline_(), sw::DocumentRedlineManager::HasRedline(), Hide(), sw::DocumentRedlineManager::HideAll(), IMPL_LINK(), IMPL_LINK_NOARG(), SwRedlineAcceptDlg::InitAuthors(), SwRedlineAcceptDlg::InsertChildren(), SwRedlineAcceptDlg::InsertParents(), InvalidateRange(), 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(), SwRedlineItr::Seek(), SwScriptInfo::selectRedLineDeleted(), sw::DocumentRedlineManager::SelNextRedline(), sw::DocumentRedlineManager::SelPrevRedline(), Show(), DocxAttributeOutput::TableRowRedline(), and SwTableLine::UpdateTextChangesOnly().

bool SwRangeRedline::HasValidRange ( ) const
void SwRangeRedline::Hide ( sal_uInt16  nLoop,
size_t  nMyPos,
bool  bForced = false 
void SwRangeRedline::InvalidateRange ( Invalidation  eWhy)
bool SwRangeRedline::IsAnnotation ( ) const

Definition at line 1934 of file docredln.cxx.

References CH_TXTATR_INWORD, and SwPaM::GetText().

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

bool SwRangeRedline::IsAutoFormat ( ) const

Definition at line 204 of file redline.hxx.

References SwRedlineData::IsAutoFormat().

Referenced by SwRedlineAcceptDlg::InsertChildren().

bool SwRangeRedline::IsDelLastPara ( ) const
bool SwRangeRedline::IsMoved ( ) const
bool SwRangeRedline::IsOwnRedline ( const SwRangeRedline rRedl) const

Definition at line 247 of file redline.hxx.

References GetAuthor().

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

bool SwRangeRedline::IsVisible ( ) const
void SwRangeRedline::MaybeNotifyRedlinePositionModification ( tools::Long  nTop)

Definition at line 1189 of file docredln.cxx.

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

Referenced by SwTextFrame::MakePos().

void SwRangeRedline::MoveFromSection ( size_t  nMyPos)
void SwRangeRedline::MoveToSection ( )
bool SwRangeRedline::operator!= ( const SwRedlineData rCmp) const

Definition at line 201 of file redline.hxx.

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

Definition at line 1944 of file docredln.cxx.

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

bool SwRangeRedline::PopData ( )

Definition at line 1895 of file docredln.cxx.

References SwRedlineData::m_pNext, and m_pRedlineData.

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

Definition at line 1880 of file docredln.cxx.

References SwRedlineData::m_pNext, and m_pRedlineData.

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

void SwRangeRedline::SetAutoFormat ( )

Definition at line 203 of file redline.hxx.

References SwRedlineData::SetAutoFormat().

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

void SwRangeRedline::SetComment ( const OUString &  rS)
void SwRangeRedline::SetContentIdx ( const SwNodeIndex pIdx)
void SwRangeRedline::SetEnd ( const SwPosition rPos,
SwPosition pEndPtr = nullptr 
void SwRangeRedline::SetExtraData ( const SwRedlineExtraData pData)

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

Definition at line 220 of file redline.hxx.

References SwRedlineData::SetExtraData().

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

void SwRangeRedline::SetMoved ( )

Definition at line 272 of file redline.hxx.

References SwRedlineData::SetMoved().

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

void SwRangeRedline::SetSeqNo ( sal_uInt16  nNo)

Definition at line 229 of file redline.hxx.

References SwRedlineData::SetSeqNo().

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

void SwRangeRedline::SetStart ( const SwPosition rPos,
SwPosition pSttPtr = nullptr 
void SwRangeRedline::Show ( sal_uInt16  nLoop,
size_t  nMyPos,
bool  bForced = false 
void SwRangeRedline::ShowOriginal ( sal_uInt16  nLoop,
size_t  nMyPos,
bool  bForced = false 

Member Data Documentation

bool SwRangeRedline::m_bDelLastPara

Definition at line 160 of file redline.hxx.

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

bool SwRangeRedline::m_bIsVisible

Definition at line 161 of file redline.hxx.

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

sal_uInt32 SwRangeRedline::m_nId

Definition at line 162 of file redline.hxx.

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

Definition at line 164 of file redline.hxx.

Referenced by MaybeNotifyRedlinePositionModification().

SwNodeIndex* SwRangeRedline::m_pContentSect
SwRedlineData* SwRangeRedline::m_pRedlineData
sal_uInt32 SwRangeRedline::s_nLastId = 1

Definition at line 172 of file redline.hxx.

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