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

#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 HasExtraRedlineTable () const 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 void CompressRedlines () 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)
 
virtual ~DocumentRedlineManager () override
 

Private Member Functions

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

Private Attributes

SwDocm_rDoc
 
RedlineFlags meRedlineFlags
 
std::unique_ptr< SwRedlineTablempRedlineTable
 
std::unique_ptr< SwExtraRedlineTablempExtraRedlineTable
 
std::unique_ptr< OUString > mpAutoFormatRedlnComment
 
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  AppendResult {
  AppendResult::IGNORED,
  AppendResult::MERGED,
  AppendResult::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 31 of file DocumentRedlineManager.hxx.

Constructor & Destructor Documentation

sw::DocumentRedlineManager::DocumentRedlineManager ( SwDoc i_rSwdoc)

Definition at line 895 of file DocumentRedlineManager.cxx.

References m_rDoc, ShowDelete, and ShowInsert.

sw::DocumentRedlineManager::~DocumentRedlineManager ( )
overridevirtual

Definition at line 3120 of file DocumentRedlineManager.cxx.

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

Member Function Documentation

void sw::DocumentRedlineManager::AcceptAllRedline ( bool  bAcceptReject)
overridevirtual
bool sw::DocumentRedlineManager::AcceptRedline ( SwRedlineTable::size_type  nPos,
bool  bCallDelete 
)
overridevirtual
bool sw::DocumentRedlineManager::AcceptRedline ( const SwPaM rPam,
bool  bCallDelete 
)
overridevirtual
void sw::DocumentRedlineManager::AcceptRedlineParagraphFormatting ( const SwPaM rPam)
overridevirtual
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 1076 of file DocumentRedlineManager.cxx.

References SwRangeRedline::Add, IDocumentRedlineAccess::APPENDED, Before, Behind, SwRangeRedline::CanCombine(), CHECK_REDLINE, CollideEnd, CollideStart, ComparePosition(), CompressRedlines(), Delete, IDocumentContentOperations::DeleteAndJoin(), IDocumentContentOperations::DelFullPara(), DontCombineRedlines, SwPaM::End(), Equal, FmtColl, Format, SwRangeRedline::GetContentIdx(), SwNode::GetContentNode(), SwDoc::getIDocumentContentOperations(), SwNode::GetIndex(), SwPaM::GetMark(), SwNodeIndex::GetNode(), SwPaM::GetPoint(), GetRedline(), SwNode::GetTextNode(), SwRangeRedline::GetType(), SwNodes::GoPrevious(), SwRangeRedline::HasValidRange(), SwRangeRedline::Hide(), Ignore, IDocumentRedlineAccess::IGNORED, Insert, Inside, SwRangeRedline::InvalidateRange(), SwDoc::IsAutoFormatRedline(), IDocumentRedlineAccess::IsHideChanges(), SwRangeRedline::IsOwnRedline(), IsRedlineOn(), IDocumentRedlineAccess::IsShowOriginal(), SwTextNode::Len(), m_rDoc, meRedlineFlags, IDocumentRedlineAccess::MERGED, mnAutoFormatRedlnCommentNo, mpAutoFormatRedlnComment, mpRedlineTable, SwPosition::nContent, SwPosition::nNode, On, Outside, OverlapBefore, OverlapBehind, SwRangeRedline::PushData(), SwRangeRedline::SetAutoFormat(), SwRangeRedline::SetComment(), SwRangeRedline::SetEnd(), SwRangeRedline::SetExtraData(), SwRedlineExtraData_FormatColl::SetFormatAll(), SwRangeRedline::SetSeqNo(), SwRangeRedline::SetStart(), SwRangeRedline::Show(), SwPaM::Start(), and u.

bool sw::DocumentRedlineManager::AppendTableCellRedline ( SwTableCellRedline pPtr)
overridevirtual
bool sw::DocumentRedlineManager::AppendTableRowRedline ( SwTableRowRedline pPtr)
overridevirtual
void sw::DocumentRedlineManager::CompressRedlines ( )
overridevirtual
bool sw::DocumentRedlineManager::DeleteRedline ( const SwPaM rPam,
bool  bSaveInUndo,
RedlineType  nDelType 
)
overridevirtual
bool sw::DocumentRedlineManager::DeleteRedline ( const SwStartNode rSection,
bool  bSaveInUndo,
RedlineType  nDelType 
)
overridevirtual

Implements IDocumentRedlineAccess.

Definition at line 2403 of file DocumentRedlineManager.cxx.

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

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

Implements IDocumentRedlineAccess.

Definition at line 1016 of file DocumentRedlineManager.cxx.

References mpExtraRedlineTable.

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

Implements IDocumentRedlineAccess.

Definition at line 1021 of file DocumentRedlineManager.cxx.

References mpExtraRedlineTable.

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

Implements IDocumentRedlineAccess.

Definition at line 2432 of file DocumentRedlineManager.cxx.

References End, Format, Insert, mpRedlineTable, and Start.

Referenced by AppendRedline(), DeleteRedline(), and SplitRedline().

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

Implements IDocumentRedlineAccess.

Definition at line 3066 of file DocumentRedlineManager.cxx.

References SW_MOD.

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

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

Implements IDocumentRedlineAccess.

Definition at line 905 of file DocumentRedlineManager.cxx.

References meRedlineFlags.

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

Implements IDocumentRedlineAccess.

Definition at line 3089 of file DocumentRedlineManager.cxx.

References maRedlinePasswd.

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

Implements IDocumentRedlineAccess.

Definition at line 1011 of file DocumentRedlineManager.cxx.

References mpRedlineTable.

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

Implements IDocumentRedlineAccess.

Definition at line 1026 of file DocumentRedlineManager.cxx.

References mpExtraRedlineTable.

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 3072 of file DocumentRedlineManager.cxx.

References SW_MOD.

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

Definition at line 127 of file DocumentRedlineManager.hxx.

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

Implements IDocumentRedlineAccess.

Definition at line 996 of file DocumentRedlineManager.cxx.

References Ignore, and meRedlineFlags.

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

Implements IDocumentRedlineAccess.

Definition at line 1041 of file DocumentRedlineManager.cxx.

References mbIsRedlineMove.

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

Query if redlining is on.

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

Implements IDocumentRedlineAccess.

Definition at line 991 of file DocumentRedlineManager.cxx.

References IDocumentRedlineAccess::IsRedlineOn(), and meRedlineFlags.

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

DocumentRedlineManager& sw::DocumentRedlineManager::operator= ( DocumentRedlineManager const &  )
privatedelete
bool sw::DocumentRedlineManager::RejectRedline ( SwRedlineTable::size_type  nPos,
bool  bCallDelete 
)
overridevirtual
bool sw::DocumentRedlineManager::RejectRedline ( const SwPaM rPam,
bool  bCallDelete 
)
overridevirtual
const SwRangeRedline * sw::DocumentRedlineManager::SelNextRedline ( SwPaM rPam) const
overridevirtual
const SwRangeRedline * sw::DocumentRedlineManager::SelPrevRedline ( SwPaM rPam) const
overridevirtual
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 3105 of file DocumentRedlineManager.cxx.

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

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

void sw::DocumentRedlineManager::SetHideRedlines ( bool const  bHideRedlines)
inline
bool sw::DocumentRedlineManager::SetRedlineComment ( const SwPaM rPam,
const OUString &  rComment 
)
overridevirtual
void sw::DocumentRedlineManager::SetRedlineFlags ( RedlineFlags  eMode)
overridevirtual
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 1001 of file DocumentRedlineManager.cxx.

References meRedlineFlags.

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

Implements IDocumentRedlineAccess.

Definition at line 1046 of file DocumentRedlineManager.cxx.

References mbIsRedlineMove.

void sw::DocumentRedlineManager::SetRedlinePassword ( const css::uno::Sequence< sal_Int8 > &  rNewPassword)
overridevirtual
bool sw::DocumentRedlineManager::SplitRedline ( const SwPaM rPam)
overridevirtual
void sw::DocumentRedlineManager::UpdateRedlineAttr ( )
overridevirtual

Member Data Documentation

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 150 of file DocumentRedlineManager.hxx.

SwDoc& sw::DocumentRedlineManager::m_rDoc
private
css::uno::Sequence<sal_Int8 > sw::DocumentRedlineManager::maRedlinePasswd
private

Definition at line 146 of file DocumentRedlineManager.hxx.

Referenced by GetRedlinePassword(), and SetRedlinePassword().

bool sw::DocumentRedlineManager::mbIsRedlineMove
private

Definition at line 143 of file DocumentRedlineManager.hxx.

Referenced by IsRedlineMove(), and SetRedlineMove().

RedlineFlags sw::DocumentRedlineManager::meRedlineFlags
private
sal_uInt16 sw::DocumentRedlineManager::mnAutoFormatRedlnCommentNo
private

SeqNo for conjoining of AutoFormat-Redlines.

by the UI. Managed by SwAutoFormat!

Definition at line 144 of file DocumentRedlineManager.hxx.

Referenced by AppendRedline(), and SetAutoFormatRedlineComment().

std::unique_ptr<OUString> sw::DocumentRedlineManager::mpAutoFormatRedlnComment
private

Definition at line 142 of file DocumentRedlineManager.hxx.

Referenced by AppendRedline(), and SetAutoFormatRedlineComment().

std::unique_ptr<SwExtraRedlineTable> sw::DocumentRedlineManager::mpExtraRedlineTable
private
std::unique_ptr<SwRedlineTable> sw::DocumentRedlineManager::mpRedlineTable
private

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