LibreOffice Module sw (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sw::DocumentRedlineManager Class Referencefinal

#include <DocumentRedlineManager.hxx>

Inheritance diagram for sw::DocumentRedlineManager:
[legend]
Collaboration diagram for sw::DocumentRedlineManager:
[legend]

Public Member Functions

 DocumentRedlineManager (SwDoc &i_rSwdoc)
 
virtual RedlineFlags GetRedlineFlags () const override
 Replaced by SwRootFrame::IsHideRedlines() (this is model-level redline hiding). More...
 
virtual void SetRedlineFlags_intern (RedlineFlags eMode) override
 Set a new redline mode. More...
 
virtual void SetRedlineFlags (RedlineFlags eMode) override
 Set a new redline mode. More...
 
virtual bool IsRedlineOn () const override
 Query if redlining is on. More...
 
virtual bool IsIgnoreRedline () const override
 
virtual const SwRedlineTableGetRedlineTable () const override
 
virtual SwRedlineTableGetRedlineTable () override
 
virtual const SwExtraRedlineTableGetExtraRedlineTable () const override
 
virtual SwExtraRedlineTableGetExtraRedlineTable () override
 
virtual bool IsInRedlines (const SwNode &rNode) const override
 
virtual AppendResult AppendRedline (SwRangeRedline *pPtr, bool bCallDelete) override
 Append a new redline. More...
 
virtual bool AppendTableRowRedline (SwTableRowRedline *pPtr) override
 
virtual bool AppendTableCellRedline (SwTableCellRedline *pPtr) override
 
virtual bool SplitRedline (const SwPaM &rPam) override
 
virtual bool DeleteRedline (const SwPaM &rPam, bool bSaveInUndo, RedlineType nDelType) override
 
virtual bool DeleteRedline (const SwStartNode &rSection, bool bSaveInUndo, RedlineType nDelType) override
 
virtual SwRedlineTable::size_type GetRedlinePos (const SwNode &rNode, RedlineType nType) const override
 
virtual bool HasRedline (const SwPaM &rPam, RedlineType nType, bool bStartOrEndInRange) const override
 
virtual void CompressRedlines (size_t nStartIdx=0) override
 
virtual const SwRangeRedlineGetRedline (const SwPosition &rPos, SwRedlineTable::size_type *pFndPos) const override
 
virtual bool IsRedlineMove () const override
 
virtual void SetRedlineMove (bool bFlag) override
 
virtual bool AcceptRedline (SwRedlineTable::size_type nPos, bool bCallDelete) override
 
virtual bool AcceptRedline (const SwPaM &rPam, bool bCallDelete) override
 
virtual void AcceptRedlineParagraphFormatting (const SwPaM &rPam) override
 
virtual bool RejectRedline (SwRedlineTable::size_type nPos, bool bCallDelete) override
 
virtual bool RejectRedline (const SwPaM &rPam, bool bCallDelete) override
 
virtual void AcceptAllRedline (bool bAcceptReject) override
 
virtual const SwRangeRedlineSelNextRedline (SwPaM &rPam) const override
 
virtual const SwRangeRedlineSelPrevRedline (SwPaM &rPam) const override
 
virtual void UpdateRedlineAttr () override
 
virtual std::size_t GetRedlineAuthor () override
 
virtual std::size_t InsertRedlineAuthor (const OUString &rAuthor) override
 Insert new author into the Table for the Readers etc. More...
 
virtual bool SetRedlineComment (const SwPaM &rPam, const OUString &rComment) override
 
virtual const css::uno::Sequence< sal_Int8 > & GetRedlinePassword () const override
 
virtual void SetRedlinePassword (const css::uno::Sequence< sal_Int8 > &rNewPassword) override
 
void SetAutoFormatRedlineComment (const OUString *pText, sal_uInt16 nSeqNo=0)
 Set comment-text for Redline. More...
 
bool IsHideRedlines () const
 
void SetHideRedlines (bool const bHideRedlines)
 
void HideAll (bool bDeletion)
 
void ShowAll ()
 
virtual ~DocumentRedlineManager () override
 
virtual RedlineFlags GetRedlineFlags () const =0
 Query the currently set redline mode. More...
 
virtual void SetRedlineFlags_intern (RedlineFlags eMode)=0
 Set a new redline mode. More...
 
virtual void SetRedlineFlags (RedlineFlags eMode)=0
 Set a new redline mode. More...
 
virtual bool IsRedlineOn () const =0
 Query if redlining is on. More...
 
virtual bool IsIgnoreRedline () const =0
 
virtual const SwRedlineTableGetRedlineTable () const =0
 
virtual SwRedlineTableGetRedlineTable ()=0
 
virtual const SwExtraRedlineTableGetExtraRedlineTable () const =0
 
virtual SwExtraRedlineTableGetExtraRedlineTable ()=0
 
virtual bool IsInRedlines (const SwNode &rNode) const =0
 
virtual AppendResult AppendRedline (SwRangeRedline *pNewRedl, bool bCallDelete)=0
 Append a new redline. More...
 
virtual bool AppendTableRowRedline (SwTableRowRedline *pPtr)=0
 
virtual bool AppendTableCellRedline (SwTableCellRedline *pPtr)=0
 
virtual bool SplitRedline (const SwPaM &rPam)=0
 
virtual bool DeleteRedline (const SwPaM &rPam, bool bSaveInUndo, RedlineType nDelType)=0
 
virtual bool DeleteRedline (const SwStartNode &rSection, bool bSaveInUndo, RedlineType nDelType)=0
 
virtual SwRedlineTable::size_type GetRedlinePos (const SwNode &rNode, RedlineType nType) const =0
 
virtual bool HasRedline (const SwPaM &rPam, RedlineType nType, bool bStartOrEndInRange) const =0
 
virtual void CompressRedlines (size_t nStartIndex=0)=0
 
virtual const SwRangeRedlineGetRedline (const SwPosition &rPos, SwRedlineTable::size_type *pFndPos) const =0
 
virtual bool IsRedlineMove () const =0
 
virtual void SetRedlineMove (bool bFlag)=0
 
virtual bool AcceptRedline (SwRedlineTable::size_type nPos, bool bCallDelete)=0
 
virtual bool AcceptRedline (const SwPaM &rPam, bool bCallDelete)=0
 
virtual void AcceptRedlineParagraphFormatting (const SwPaM &rPam)=0
 
virtual bool RejectRedline (SwRedlineTable::size_type nPos, bool bCallDelete)=0
 
virtual bool RejectRedline (const SwPaM &rPam, bool bCallDelete)=0
 
virtual const SwRangeRedlineSelNextRedline (SwPaM &rPam) const =0
 
virtual const SwRangeRedlineSelPrevRedline (SwPaM &rPam) const =0
 
virtual void AcceptAllRedline (bool bAcceptReject)=0
 
virtual void UpdateRedlineAttr ()=0
 
virtual std::size_t GetRedlineAuthor ()=0
 
virtual std::size_t InsertRedlineAuthor (const OUString &rAuthor)=0
 
virtual bool SetRedlineComment (const SwPaM &rPam, const OUString &rComment)=0
 
virtual const css::uno::Sequence< sal_Int8 > & GetRedlinePassword () const =0
 
virtual void SetRedlinePassword (const css::uno::Sequence< sal_Int8 > &rNewPassword)=0
 

Private Member Functions

 DocumentRedlineManager (DocumentRedlineManager const &)=delete
 
DocumentRedlineManageroperator= (DocumentRedlineManager const &)=delete
 

Private Attributes

SwDocm_rDoc
 
RedlineFlags meRedlineFlags
 
SwRedlineTable maRedlineTable
 
SwExtraRedlineTable maExtraRedlineTable
 
std::optional< OUString > moAutoFormatRedlnComment
 
bool mbIsRedlineMove
 
sal_uInt16 mnAutoFormatRedlnCommentNo
 SeqNo for conjoining of AutoFormat-Redlines. More...
 
css::uno::Sequence< sal_Int8maRedlinePasswd
 
bool m_bHideRedlines = false
 this flag is necessary for file import because the ViewShell/layout is created "too late" and the ShowRedlineChanges item is not below "Views" More...
 

Additional Inherited Members

- Public Types inherited from IDocumentRedlineAccess
enum class  AppendResult {
  IGNORED ,
  MERGED ,
  APPENDED
}
 
- Static Public Member Functions inherited from IDocumentRedlineAccess
static bool IsShowChanges (const RedlineFlags eM)
 
static bool IsHideChanges (const RedlineFlags eM)
 
static bool IsShowOriginal (const RedlineFlags eM)
 
static bool IsRedlineOn (const RedlineFlags eM)
 
- Protected Member Functions inherited from IDocumentRedlineAccess
virtual ~IDocumentRedlineAccess ()
 

Detailed Description

Definition at line 30 of file DocumentRedlineManager.hxx.

Constructor & Destructor Documentation

◆ DocumentRedlineManager() [1/2]

sw::DocumentRedlineManager::DocumentRedlineManager ( SwDoc i_rSwdoc)

Definition at line 1082 of file DocumentRedlineManager.cxx.

References ShowDelete, and ShowInsert.

◆ ~DocumentRedlineManager()

sw::DocumentRedlineManager::~DocumentRedlineManager ( )
overridevirtual

Definition at line 3510 of file DocumentRedlineManager.cxx.

◆ DocumentRedlineManager() [2/2]

sw::DocumentRedlineManager::DocumentRedlineManager ( DocumentRedlineManager const &  )
privatedelete

Member Function Documentation

◆ AcceptAllRedline()

void sw::DocumentRedlineManager::AcceptAllRedline ( bool  bAcceptReject)
overridevirtual

◆ AcceptRedline() [1/2]

bool sw::DocumentRedlineManager::AcceptRedline ( const SwPaM rPam,
bool  bCallDelete 
)
overridevirtual

◆ AcceptRedline() [2/2]

bool sw::DocumentRedlineManager::AcceptRedline ( SwRedlineTable::size_type  nPos,
bool  bCallDelete 
)
overridevirtual

◆ AcceptRedlineParagraphFormatting()

void sw::DocumentRedlineManager::AcceptRedlineParagraphFormatting ( const SwPaM rPam)
overridevirtual

◆ AppendRedline()

IDocumentRedlineAccess::AppendResult sw::DocumentRedlineManager::AppendRedline ( SwRangeRedline pNewRedl,
bool  bCallDelete 
)
overridevirtual

Append a new redline.

Parameters
pNewRedlredline to insert
bCallDeleteif set, then for a new DELETE redline that is inserted so that it overlaps an existing INSERT redline with the same author, the overlapping range is deleted, i.e. the new DELETE removes existing INSERT for that range
Returns
APPENDED if pNewRedl is still alive and was appended MERGED if pNewRedl was deleted but has been merged with existing one IGNORED if pNewRedl was deleted and ignored/invalid

Implements IDocumentRedlineAccess.

Definition at line 1256 of file DocumentRedlineManager.cxx.

References SwRangeRedline::Add, IDocumentRedlineAccess::APPENDED, AppendRedline(), Before, Behind, SwRangeRedline::CanCombine(), CHECK_REDLINE, CollideEnd, CollideStart, ComparePosition(), CompressRedlines(), SwRedlineTable::DeleteAndDestroy(), IDocumentContentOperations::DeleteAndJoin(), IDocumentContentOperations::DelFullPara(), DontCombineRedlines, SwPaM::End(), SwNode::EndOfSectionNode(), Equal, SwNode::FindTableNode(), SwRangeRedline::GetContentIdx(), SwPosition::GetContentIndex(), SwNode::GetContentNode(), SwDoc::getIDocumentContentOperations(), SwDoc::GetIDocumentUndoRedo(), SwNodeIndex::GetIndex(), SwNode::GetIndex(), SwNodeIndex::GetNode(), SwPosition::GetNode(), SwRedlineTable::GetPos(), GetRedline(), SwNode::GetTableNode(), SwNode::GetTextNode(), SwRangeRedline::GetType(), SwRangeRedline::HasValidRange(), SwRangeRedline::Hide(), Ignore, IDocumentRedlineAccess::IGNORED, SwRedlineTable::Insert(), Inside, SwRangeRedline::InvalidateRange(), SwDoc::IsAutoFormatRedline(), SwNode::IsContentNode(), SwNode::IsEndNode(), IDocumentRedlineAccess::IsHideChanges(), SwRangeRedline::IsMoved(), SwRedlineTable::isMoved(), SwRangeRedline::IsOwnRedline(), IsRedlineOn(), IDocumentRedlineAccess::IsShowOriginal(), SwNode::IsTableNode(), SwNode::IsTextNode(), SwTextNode::Len(), m_rDoc, maRedlineTable, meRedlineFlags, IDocumentRedlineAccess::MERGED, mnAutoFormatRedlnCommentNo, moAutoFormatRedlnComment, n, On, Outside, OverlapBefore, OverlapBehind, SwRangeRedline::PushData(), SwRedlineTable::Remove(), RES_PRINT(), SwRangeRedline::SetAutoFormat(), SwRangeRedline::SetComment(), SwPosition::SetContent(), SwRangeRedline::SetEnd(), SwRangeRedline::SetExtraData(), SwRedlineExtraData_FormatColl::SetFormatAll(), SwDoc::SetRowNotTracked(), SwRangeRedline::SetSeqNo(), SwRangeRedline::SetStart(), SwRangeRedline::Show(), SwRedlineTable::size(), SwPaM::Start(), SwPaM::StartEnd(), and u.

Referenced by AppendRedline().

◆ AppendTableCellRedline()

bool sw::DocumentRedlineManager::AppendTableCellRedline ( SwTableCellRedline pPtr)
overridevirtual

◆ AppendTableRowRedline()

bool sw::DocumentRedlineManager::AppendTableRowRedline ( SwTableRowRedline pPtr)
overridevirtual

◆ CompressRedlines()

void sw::DocumentRedlineManager::CompressRedlines ( size_t  nStartIdx = 0)
overridevirtual

◆ DeleteRedline() [1/2]

bool sw::DocumentRedlineManager::DeleteRedline ( const SwPaM rPam,
bool  bSaveInUndo,
RedlineType  nDelType 
)
overridevirtual

◆ DeleteRedline() [2/2]

bool sw::DocumentRedlineManager::DeleteRedline ( const SwStartNode rSection,
bool  bSaveInUndo,
RedlineType  nDelType 
)
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 2676 of file DocumentRedlineManager.cxx.

References DeleteRedline(), and SwNode::EndOfSectionNode().

◆ GetExtraRedlineTable() [1/2]

const SwExtraRedlineTable & sw::DocumentRedlineManager::GetExtraRedlineTable ( ) const
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 1201 of file DocumentRedlineManager.cxx.

References maExtraRedlineTable.

◆ GetExtraRedlineTable() [2/2]

SwExtraRedlineTable & sw::DocumentRedlineManager::GetExtraRedlineTable ( )
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 1206 of file DocumentRedlineManager.cxx.

References maExtraRedlineTable.

◆ GetRedline()

const SwRangeRedline * sw::DocumentRedlineManager::GetRedline ( const SwPosition rPos,
SwRedlineTable::size_type pFndPos 
) const
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 2762 of file DocumentRedlineManager.cxx.

References End, maRedlineTable, SwRedlineTable::size(), and Start.

Referenced by AppendRedline(), and DeleteRedline().

◆ GetRedlineAuthor()

std::size_t sw::DocumentRedlineManager::GetRedlineAuthor ( )
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 3407 of file DocumentRedlineManager.cxx.

References SW_MOD.

◆ GetRedlineFlags()

RedlineFlags sw::DocumentRedlineManager::GetRedlineFlags ( ) const
overridevirtual

Replaced by SwRootFrame::IsHideRedlines() (this is model-level redline hiding).

Implements IDocumentRedlineAccess.

Definition at line 1090 of file DocumentRedlineManager.cxx.

References meRedlineFlags.

◆ GetRedlinePassword()

const uno::Sequence< sal_Int8 > & sw::DocumentRedlineManager::GetRedlinePassword ( ) const
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 3430 of file DocumentRedlineManager.cxx.

References maRedlinePasswd.

◆ GetRedlinePos()

SwRedlineTable::size_type sw::DocumentRedlineManager::GetRedlinePos ( const SwNode rNode,
RedlineType  nType 
) const
overridevirtual

◆ GetRedlineTable() [1/2]

const SwRedlineTable & sw::DocumentRedlineManager::GetRedlineTable ( ) const
overridevirtual

◆ GetRedlineTable() [2/2]

SwRedlineTable & sw::DocumentRedlineManager::GetRedlineTable ( )
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 1196 of file DocumentRedlineManager.cxx.

References maRedlineTable.

◆ HasRedline()

bool sw::DocumentRedlineManager::HasRedline ( const SwPaM rPam,
RedlineType  nType,
bool  bStartOrEndInRange 
) const
overridevirtual

◆ HideAll()

void sw::DocumentRedlineManager::HideAll ( bool  bDeletion)

◆ InsertRedlineAuthor()

std::size_t sw::DocumentRedlineManager::InsertRedlineAuthor ( const OUString &  rAuthor)
overridevirtual

Insert new author into the Table for the Readers etc.

Implements IDocumentRedlineAccess.

Definition at line 3413 of file DocumentRedlineManager.cxx.

References SW_MOD.

◆ IsHideRedlines()

bool sw::DocumentRedlineManager::IsHideRedlines ( ) const
inline

Definition at line 130 of file DocumentRedlineManager.hxx.

◆ IsIgnoreRedline()

bool sw::DocumentRedlineManager::IsIgnoreRedline ( ) const
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 1181 of file DocumentRedlineManager.cxx.

References Ignore, and meRedlineFlags.

◆ IsInRedlines()

bool sw::DocumentRedlineManager::IsInRedlines ( const SwNode rNode) const
overridevirtual

◆ IsRedlineMove()

bool sw::DocumentRedlineManager::IsRedlineMove ( ) const
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 1221 of file DocumentRedlineManager.cxx.

References mbIsRedlineMove.

◆ IsRedlineOn()

bool sw::DocumentRedlineManager::IsRedlineOn ( ) const
overridevirtual

Query if redlining is on.

Returns
<TRUE> if redlining is on <FALSE> otherwise

Implements IDocumentRedlineAccess.

Definition at line 1176 of file DocumentRedlineManager.cxx.

References IDocumentRedlineAccess::IsRedlineOn(), and meRedlineFlags.

Referenced by AppendRedline(), AppendTableCellRedline(), and AppendTableRowRedline().

◆ operator=()

DocumentRedlineManager & sw::DocumentRedlineManager::operator= ( DocumentRedlineManager const &  )
privatedelete

◆ RejectRedline() [1/2]

bool sw::DocumentRedlineManager::RejectRedline ( const SwPaM rPam,
bool  bCallDelete 
)
overridevirtual

◆ RejectRedline() [2/2]

bool sw::DocumentRedlineManager::RejectRedline ( SwRedlineTable::size_type  nPos,
bool  bCallDelete 
)
overridevirtual

◆ SelNextRedline()

const SwRangeRedline * sw::DocumentRedlineManager::SelNextRedline ( SwPaM rPam) const
overridevirtual

◆ SelPrevRedline()

const SwRangeRedline * sw::DocumentRedlineManager::SelPrevRedline ( SwPaM rPam) const
overridevirtual

◆ SetAutoFormatRedlineComment()

void sw::DocumentRedlineManager::SetAutoFormatRedlineComment ( const OUString *  pText,
sal_uInt16  nSeqNo = 0 
)

Set comment-text for Redline.

Set comment text for the Redline, which is inserted later on via AppendRedline.

It then comes in via AppendRedLine. Used by AutoFormat. 0-pointer resets mode. Sequence number is for conjoining of Redlines by the UI.

Is used by Autoformat. A null pointer resets the mode. The pointer is not copied, so it needs to stay valid!

Definition at line 3446 of file DocumentRedlineManager.cxx.

References m_rDoc, mnAutoFormatRedlnCommentNo, moAutoFormatRedlnComment, and SwDoc::SetAutoFormatRedline().

Referenced by SwAutoFormat::BuildHeadLine(), SwAutoFormat::ClearRedlineText(), and SwAutoFormat::SetRedlineText_().

◆ SetHideRedlines()

void sw::DocumentRedlineManager::SetHideRedlines ( bool const  bHideRedlines)
inline

◆ SetRedlineComment()

bool sw::DocumentRedlineManager::SetRedlineComment ( const SwPaM rPam,
const OUString &  rComment 
)
overridevirtual

◆ SetRedlineFlags()

void sw::DocumentRedlineManager::SetRedlineFlags ( RedlineFlags  eMode)
overridevirtual

◆ SetRedlineFlags_intern()

void sw::DocumentRedlineManager::SetRedlineFlags_intern ( RedlineFlags  eMode)
overridevirtual

Set a new redline mode.

Parameters
eMode[in] the new redline mode.

Implements IDocumentRedlineAccess.

Definition at line 1186 of file DocumentRedlineManager.cxx.

References eMode, and meRedlineFlags.

◆ SetRedlineMove()

void sw::DocumentRedlineManager::SetRedlineMove ( bool  bFlag)
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 1226 of file DocumentRedlineManager.cxx.

References mbIsRedlineMove.

◆ SetRedlinePassword()

void sw::DocumentRedlineManager::SetRedlinePassword ( const css::uno::Sequence< sal_Int8 > &  rNewPassword)
overridevirtual

◆ ShowAll()

void sw::DocumentRedlineManager::ShowAll ( )

◆ SplitRedline()

bool sw::DocumentRedlineManager::SplitRedline ( const SwPaM rPam)
overridevirtual

◆ UpdateRedlineAttr()

void sw::DocumentRedlineManager::UpdateRedlineAttr ( )
overridevirtual

Member Data Documentation

◆ m_bHideRedlines

bool sw::DocumentRedlineManager::m_bHideRedlines = false
private

this flag is necessary for file import because the ViewShell/layout is created "too late" and the ShowRedlineChanges item is not below "Views"

Definition at line 156 of file DocumentRedlineManager.hxx.

◆ m_rDoc

SwDoc& sw::DocumentRedlineManager::m_rDoc
private

◆ maExtraRedlineTable

SwExtraRedlineTable sw::DocumentRedlineManager::maExtraRedlineTable
private

◆ maRedlinePasswd

css::uno::Sequence<sal_Int8 > sw::DocumentRedlineManager::maRedlinePasswd
private

Definition at line 152 of file DocumentRedlineManager.hxx.

Referenced by GetRedlinePassword(), and SetRedlinePassword().

◆ maRedlineTable

SwRedlineTable sw::DocumentRedlineManager::maRedlineTable
private

◆ mbIsRedlineMove

bool sw::DocumentRedlineManager::mbIsRedlineMove
private

Definition at line 149 of file DocumentRedlineManager.hxx.

Referenced by IsRedlineMove(), and SetRedlineMove().

◆ meRedlineFlags

RedlineFlags sw::DocumentRedlineManager::meRedlineFlags
private

◆ mnAutoFormatRedlnCommentNo

sal_uInt16 sw::DocumentRedlineManager::mnAutoFormatRedlnCommentNo
private

SeqNo for conjoining of AutoFormat-Redlines.

by the UI. Managed by SwAutoFormat!

Definition at line 150 of file DocumentRedlineManager.hxx.

Referenced by AppendRedline(), and SetAutoFormatRedlineComment().

◆ moAutoFormatRedlnComment

std::optional<OUString> sw::DocumentRedlineManager::moAutoFormatRedlnComment
private

Definition at line 148 of file DocumentRedlineManager.hxx.

Referenced by AppendRedline(), and SetAutoFormatRedlineComment().


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