LibreOffice Module sw (master)  1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SwUndo Class Referenceabstract

#include <undobj.hxx>

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

Public Member Functions

virtual void UndoImpl (::sw::UndoRedoContext &)=0
 
virtual void RedoImpl (::sw::UndoRedoContext &)=0
 
 SwUndo (SwUndoId const nId, const SwDoc *pDoc)
 
virtual ~SwUndo () override
 
SwUndoId GetId () const
 
virtual OUString GetComment () const override
 Returns textual comment for this undo object. More...
 
ViewShellId GetViewShellId () const override
 See SfxUndoAction::GetViewShellId(). More...
 
RedlineFlags GetRedlineFlags () const
 
void SetRedlineFlags (RedlineFlags eMode)
 
bool IsDelBox () const
 
void IgnoreRepeat ()
 
- Public Member Functions inherited from SfxUndoAction
 SfxUndoAction ()
 
virtual ~SfxUndoAction () COVERITY_NOEXCEPT_FALSE
 
virtual bool Merge (SfxUndoAction *pNextAction)
 
virtual OUString GetRepeatComment (SfxRepeatTarget &) const
 
const DateTimeGetDateTime () const
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 

Static Public Member Functions

static bool FillSaveData (const SwPaM &rRange, SwRedlineSaveDatas &rSData, bool bDelRange=true, bool bCopyNext=true)
 
static bool FillSaveDataForFormat (const SwPaM &, SwRedlineSaveDatas &)
 
static void SetSaveData (SwDoc &rDoc, SwRedlineSaveDatas &rSData)
 
static bool HasHiddenRedlines (const SwRedlineSaveDatas &rSData)
 

Protected Member Functions

virtual SwRewriter GetRewriter () const
 Returns the rewriter for this object. More...
 
virtual void RepeatImpl (::sw::RepeatContext &)
 

Static Protected Member Functions

static void RemoveIdxFromSection (SwDoc &, sal_uLong nSttIdx, const sal_uLong *pEndIdx=nullptr)
 
static void RemoveIdxFromRange (SwPaM &rPam, bool bMoveNext)
 
static void RemoveIdxRel (sal_uLong, const SwPosition &)
 
static bool CanRedlineGroup (SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd)
 

Protected Attributes

bool m_bCacheComment
 
boost::optional< OUString > maComment
 

Private Member Functions

virtual void Undo () override
 
virtual void Redo () override
 
virtual void UndoWithContext (SfxUndoContext &) override
 
virtual void RedoWithContext (SfxUndoContext &) override
 
virtual void Repeat (SfxRepeatTarget &) override
 
virtual bool CanRepeat (SfxRepeatTarget &) const override
 

Static Private Member Functions

static ViewShellId CreateViewShellId (const SwDoc *pDoc)
 Try to obtain the view shell ID of the current view. More...
 

Private Attributes

SwUndoId const m_nId
 
RedlineFlags m_nOrigRedlineFlags
 
ViewShellId const m_nViewShellId
 
bool m_isRepeatIgnored
 for multi-selection, only repeat 1st selection More...
 

Detailed Description

Definition at line 51 of file undobj.hxx.

Constructor & Destructor Documentation

SwUndo::SwUndo ( SwUndoId const  nId,
const SwDoc pDoc 
)

Definition at line 159 of file undobj.cxx.

SwUndo::~SwUndo ( )
overridevirtual

Definition at line 186 of file undobj.cxx.

Member Function Documentation

bool SwUndo::CanRedlineGroup ( SwRedlineSaveDatas rCurr,
const SwRedlineSaveDatas rCheck,
bool  bCurrIsEnd 
)
staticprotected
bool SwUndo::CanRepeat ( SfxRepeatTarget rContext) const
overrideprivatevirtual

Reimplemented from SfxUndoAction.

Definition at line 253 of file undobj.cxx.

References GetId(), REPEAT_END, REPEAT_START, and void().

ViewShellId SwUndo::CreateViewShellId ( const SwDoc pDoc)
staticprivate

Try to obtain the view shell ID of the current view.

Definition at line 167 of file undobj.cxx.

References SwDoc::GetDocShell().

bool SwUndo::FillSaveData ( const SwPaM rRange,
SwRedlineSaveDatas rSData,
bool  bDelRange = true,
bool  bCopyNext = true 
)
static
bool SwUndo::FillSaveDataForFormat ( const SwPaM rRange,
SwRedlineSaveDatas rSData 
)
static
OUString SwUndo::GetComment ( ) const
overridevirtual

Returns textual comment for this undo object.

The textual comment is created from the resource string corresponding to this object's ID. The rewriter of this object is applied to the resource string to get the final comment.

Returns
textual comment for this undo object

Reimplemented from SfxUndoAction.

Reimplemented in SwUndoInsLayFormat, and SwSdrUndo.

Definition at line 653 of file undobj.cxx.

References SwRewriter::Apply(), GetId(), GetRewriter(), GetUndoComment(), m_bCacheComment, and maComment.

Referenced by SwUndoInsLayFormat::GetComment(), and lcl_dbg_out().

SwUndoId SwUndo::GetId ( ) const
inline
RedlineFlags SwUndo::GetRedlineFlags ( ) const
inline
SwRewriter SwUndo::GetRewriter ( ) const
protectedvirtual
ViewShellId SwUndo::GetViewShellId ( ) const
overridevirtual

See SfxUndoAction::GetViewShellId().

Reimplemented from SfxUndoAction.

Definition at line 682 of file undobj.cxx.

References m_nViewShellId.

bool SwUndo::HasHiddenRedlines ( const SwRedlineSaveDatas rSData)
static

Definition at line 1467 of file undobj.cxx.

References SwRedlineSaveDatas::size().

Referenced by SwUndoRedline::SwUndoRedline().

void SwUndo::IgnoreRepeat ( )
inline

Definition at line 129 of file undobj.hxx.

Referenced by sw::UndoManager::AddUndoAction().

bool SwUndo::IsDelBox ( ) const
void SwUndo::Redo ( )
overrideprivatevirtual

Reimplemented from SfxUndoAction.

Definition at line 218 of file undobj.cxx.

virtual void SwUndo::RedoImpl ( ::sw::UndoRedoContext )
pure virtual

Implemented in SwUndoUpdateSection, SwUndoTableStyleUpdate, SwUndoTableStyleDelete, SwUndoTableStyleMake, SwUndoTableHeadline, SwUndoMergeTable, SwUndoDelSection, SwUndoDelLayFormat, SwUndoSplitTable, SwUndoInsLayFormat, SwUndoCpyTable, SwUndoTableCpyTable, SwUndoTableNumFormat, SwUndoInserts, SwUndoEndNoteInfo, SwUndoNumruleRename, SwUndoFootNoteInfo, SwUndoNumruleDelete, SwUndoTableMerge, SwUndoChangeFootNote, SwUndoNumruleCreate, SwUndoOutlineLeftRight, SwUndoDefaultAttr, SwUndoSetFlyFormat, SwUndoTableNdsChg, SwUndoInsertLabel, SwUndoMoveLeftMargin, SwUndoFormatColl, SwUndoTableAutoFormat, SwUndoDontExpandFormat, SwUndoReRead, SwUndoFormatResetAttr, SwUndoAttrTable, SwUndoNumRuleStart, SwUndoCompDoc, SwUndoDrawDelete, SwUndoInsTextFieldmark, SwUndoFormatAttr, SwUndoNumOrNoNum, SwUndoTableToText, SwUndoInsNoTextFieldmark, SwUndoDrawUnGroupConnectToLayout, SwUndoNumUpDown, SwUndoReplace, SwUndoRenameBookmark, SwUndoRenameFormat, SwUndoDrawUnGroup, SwUndoMoveNum, SwUndoUpdateIndex, SwUndoTextToTable, SwUndoTransliterate, SwUndoDeleteBookmark, SwUndoPageDescDelete, SwUndoFieldFromAPI, SwUndoResetAttr, SwUndoDelNum, SwUndoSort, SwUndoDelete, SwUndoFormatDelete, SwUndoInsBookmark, SwUndoInsert, SwUndoMove, SwUndoInsTable, SwUndoDrawGroup, SwUndoPageDescCreate, SwUndoInsSection, SwUndoFieldFromDoc, SwUndoAttr, SwUndoParagraphSigning, SwUndoFormatCreate, SwUndoOverwrite, SwUndoRedline, SwSdrUndo, SwUndoInsNum, SwUndoPageDesc, SwUndoTOXChange, SwUndoSplitNode, and SwUndoFlyStrAttr.

Referenced by RedoWithContext().

void SwUndo::RedoWithContext ( SfxUndoContext rContext)
overrideprivatevirtual

Reimplemented from SfxUndoAction.

Definition at line 232 of file undobj.cxx.

References RedoImpl().

void SwUndo::RemoveIdxFromRange ( SwPaM rPam,
bool  bMoveNext 
)
staticprotected
void SwUndo::RemoveIdxFromSection ( SwDoc rDoc,
sal_uLong  nSttIdx,
const sal_uLong pEndIdx = nullptr 
)
staticprotected
void SwUndo::RemoveIdxRel ( sal_uLong  nIdx,
const SwPosition rPos 
)
staticprotected
void SwUndo::Repeat ( SfxRepeatTarget rContext)
overrideprivatevirtual

Reimplemented from SfxUndoAction.

Definition at line 241 of file undobj.cxx.

References m_isRepeatIgnored, and RepeatImpl().

void SwUndo::RepeatImpl ( ::sw::RepeatContext )
protectedvirtual
void SwUndo::SetRedlineFlags ( RedlineFlags  eMode)
inline
void SwUndo::SetSaveData ( SwDoc rDoc,
SwRedlineSaveDatas rSData 
)
static
void SwUndo::Undo ( )
overrideprivatevirtual

Reimplemented from SfxUndoAction.

Definition at line 213 of file undobj.cxx.

virtual void SwUndo::UndoImpl ( ::sw::UndoRedoContext )
pure virtual

Implemented in SwUndoUpdateSection, SwUndoTableStyleUpdate, SwUndoTableStyleDelete, SwUndoTableStyleMake, SwUndoTableHeadline, SwUndoMergeTable, SwUndoDelSection, SwUndoDelLayFormat, SwUndoSplitTable, SwUndoInsLayFormat, SwUndoCpyTable, SwUndoTableCpyTable, SwUndoTableNumFormat, SwUndoInserts, SwUndoEndNoteInfo, SwUndoNumruleRename, SwUndoFootNoteInfo, SwUndoNumruleDelete, SwUndoTableMerge, SwUndoChangeFootNote, SwUndoNumruleCreate, SwUndoOutlineLeftRight, SwUndoDefaultAttr, SwUndoSetFlyFormat, SwUndoTableNdsChg, SwUndoInsertLabel, SwUndoMoveLeftMargin, SwUndoFormatColl, SwUndoTableAutoFormat, SwUndoDontExpandFormat, SwUndoReRead, SwUndoFormatResetAttr, SwUndoAttrTable, SwUndoNumRuleStart, SwUndoCompDoc, SwUndoDrawDelete, SwUndoInsTextFieldmark, SwUndoFormatAttr, SwUndoNumOrNoNum, SwUndoTableToText, SwUndoInsNoTextFieldmark, SwUndoDrawUnGroupConnectToLayout, SwUndoNumUpDown, SwUndoReplace, SwUndoRenameBookmark, SwUndoRenameFormat, SwUndoDrawUnGroup, SwUndoMoveNum, SwUndoUpdateIndex, SwUndoTextToTable, SwUndoTransliterate, SwUndoDeleteBookmark, SwUndoPageDescDelete, SwUndoFieldFromAPI, SwUndoResetAttr, SwUndoDelNum, SwUndoSort, SwUndoDelete, SwUndoFormatDelete, SwUndoInsBookmark, SwUndoInsert, SwUndoMove, SwUndoInsTable, SwUndoDrawGroup, SwUndoPageDescCreate, SwUndoInsSection, SwUndoFieldFromDoc, SwUndoAttr, SwUndoParagraphSigning, SwUndoFormatCreate, SwUndoOverwrite, SwUndoRedline, SwSdrUndo, SwUndoInsNum, SwUndoPageDesc, SwUndoTOXChange, SwUndoSplitNode, and SwUndoFlyStrAttr.

Referenced by UndoWithContext().

void SwUndo::UndoWithContext ( SfxUndoContext rContext)
overrideprivatevirtual

Reimplemented from SfxUndoAction.

Definition at line 223 of file undobj.cxx.

References UndoImpl().

Member Data Documentation

bool SwUndo::m_bCacheComment
protected
bool SwUndo::m_isRepeatIgnored
private

for multi-selection, only repeat 1st selection

Definition at line 57 of file undobj.hxx.

Referenced by Repeat().

SwUndoId const SwUndo::m_nId
private

Definition at line 54 of file undobj.hxx.

Referenced by GetId().

RedlineFlags SwUndo::m_nOrigRedlineFlags
private

Definition at line 55 of file undobj.hxx.

Referenced by GetRedlineFlags().

ViewShellId const SwUndo::m_nViewShellId
private

Definition at line 56 of file undobj.hxx.

Referenced by GetViewShellId().

boost::optional<OUString> SwUndo::maComment
mutableprotected

Definition at line 61 of file undobj.hxx.

Referenced by GetComment(), and SwUndoInsLayFormat::GetComment().


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