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

#include <UndoCore.hxx>

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

Public Member Functions

 SwUndoFormatColl (const SwPaM &, const SwFormatColl *, const bool bReset, const bool bResetListAttrs)
 
virtual ~SwUndoFormatColl () override
 
virtual void UndoImpl (::sw::UndoRedoContext &) override
 
virtual void RedoImpl (::sw::UndoRedoContext &) override
 
virtual void RepeatImpl (::sw::RepeatContext &) override
 
virtual SwRewriter GetRewriter () const override
 Returns the rewriter for this undo object. More...
 
SwHistoryGetHistory ()
 
- Public Member Functions inherited from SwUndo
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 void Undo ()
 
virtual void UndoWithContext (SfxUndoContext &i_context)
 
virtual void Redo ()
 
virtual void RedoWithContext (SfxUndoContext &i_context)
 
virtual void Repeat (SfxRepeatTarget &)
 
virtual bool CanRepeat (SfxRepeatTarget &) const
 
virtual bool Merge (SfxUndoAction *pNextAction)
 
virtual OUString GetComment () const
 
virtual OUString GetRepeatComment (SfxRepeatTarget &) const
 
virtual ViewShellId GetViewShellId () const
 
const DateTimeGetDateTime () const
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 

Private Member Functions

void DoSetFormatColl (SwDoc &rDoc, SwPaM const &rPaM)
 
- Private Member Functions inherited from SwUndRng
 SwUndRng ()
 
 SwUndRng (const SwPaM &)
 
void SetValues (const SwPaM &rPam)
 
void SetPaM (SwPaM &, bool bCorrToContent=false) const
 
SwPaMAddUndoRedoPaM (::sw::UndoRedoContext &, bool const bCorrToContent=false) const
 

Private Attributes

OUString maFormatName
 
std::unique_ptr< SwHistorympHistory
 
const bool mbReset
 
const bool mbResetListAttrs
 
- Private Attributes inherited from SwUndRng
SwNodeOffset m_nSttNode
 
SwNodeOffset m_nEndNode
 
sal_Int32 m_nSttContent
 
sal_Int32 m_nEndContent
 

Additional Inherited Members

- Static Public Member Functions inherited from SwUndo
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)
 
virtual SwRewriter GetRewriter () const
 Returns the rewriter for this object. More...
 
virtual void RepeatImpl (::sw::RepeatContext &)
 
- Static Protected Member Functions inherited from SwUndo
static void RemoveIdxFromSection (SwDoc &, SwNodeOffset nSttIdx, const SwNodeOffset *pEndIdx=nullptr)
 
static void RemoveIdxFromRange (SwPaM &rPam, bool bMoveNext)
 
static void RemoveIdxRel (SwNodeOffset, const SwPosition &)
 
static bool CanRedlineGroup (SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd)
 
- Protected Attributes inherited from SwUndo
bool m_bCacheComment
 
std::optional< OUString > maComment
 

Detailed Description

Definition at line 150 of file UndoCore.hxx.

Constructor & Destructor Documentation

◆ SwUndoFormatColl()

SwUndoFormatColl::SwUndoFormatColl ( const SwPaM rRange,
const SwFormatColl pColl,
const bool  bReset,
const bool  bResetListAttrs 
)

Definition at line 26 of file unfmco.cxx.

References SwFormat::GetName(), maFormatName, and SETFMTCOLL.

◆ ~SwUndoFormatColl()

SwUndoFormatColl::~SwUndoFormatColl ( )
overridevirtual

Definition at line 41 of file unfmco.cxx.

Member Function Documentation

◆ DoSetFormatColl()

void SwUndoFormatColl::DoSetFormatColl ( SwDoc rDoc,
SwPaM const &  rPaM 
)
private

◆ GetHistory()

SwHistory * SwUndoFormatColl::GetHistory ( )
inline

Definition at line 189 of file UndoCore.hxx.

References mpHistory.

◆ GetRewriter()

SwRewriter SwUndoFormatColl::GetRewriter ( ) const
overridevirtual

Returns the rewriter for this undo object.

The rewriter contains one rule:

$1 -> <name of format collection>

<name of format collection> is the name of the format collection that is applied by the action recorded by this undo object.

Returns
the rewriter for this undo object

Reimplemented from SwUndo.

Definition at line 78 of file unfmco.cxx.

References SwRewriter::AddRule(), maFormatName, and UndoArg1.

◆ RedoImpl()

void SwUndoFormatColl::RedoImpl ( ::sw::UndoRedoContext rContext)
overridevirtual

Implements SwUndo.

Definition at line 55 of file unfmco.cxx.

References SwUndRng::AddUndoRedoPaM(), DoSetFormatColl(), and sw::UndoRedoContext::GetDoc().

◆ RepeatImpl()

void SwUndoFormatColl::RepeatImpl ( ::sw::RepeatContext rContext)
overridevirtual

Reimplemented from SwUndo.

Definition at line 62 of file unfmco.cxx.

References DoSetFormatColl(), sw::RepeatContext::GetDoc(), and sw::RepeatContext::GetRepeatPaM().

◆ UndoImpl()

void SwUndoFormatColl::UndoImpl ( ::sw::UndoRedoContext rContext)
overridevirtual

Implements SwUndo.

Definition at line 45 of file unfmco.cxx.

References SwUndRng::AddUndoRedoPaM(), sw::UndoRedoContext::GetDoc(), and mpHistory.

Member Data Documentation

◆ maFormatName

OUString SwUndoFormatColl::maFormatName
private

Definition at line 152 of file UndoCore.hxx.

Referenced by DoSetFormatColl(), GetRewriter(), and SwUndoFormatColl().

◆ mbReset

const bool SwUndoFormatColl::mbReset
private

Definition at line 157 of file UndoCore.hxx.

Referenced by DoSetFormatColl().

◆ mbResetListAttrs

const bool SwUndoFormatColl::mbResetListAttrs
private

Definition at line 160 of file UndoCore.hxx.

Referenced by DoSetFormatColl().

◆ mpHistory

std::unique_ptr<SwHistory> SwUndoFormatColl::mpHistory
private

Definition at line 153 of file UndoCore.hxx.

Referenced by GetHistory(), and UndoImpl().


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