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

#include <UndoAttribute.hxx>

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

Public Member Functions

 SwUndoFormatAttr (SfxItemSet &&rOldSet, SwFormat &rFormat, bool bSaveDrawPt)
 
 SwUndoFormatAttr (const SfxPoolItem &rItem, SwFormat &rFormat, bool bSaveDrawPt)
 
virtual ~SwUndoFormatAttr () 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 object. More...
 
void PutAttr (const SfxPoolItem &rItem, const SwDoc &rDoc)
 
SwFormatGetFormat (const SwDoc &rDoc)
 
- 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 SaveFlyAnchor (const SwFormat *pFormat, bool bSaveDrawPt=false)
 
bool RestoreFlyAnchor (::sw::UndoRedoContext &rContext)
 
void Init (const SwFormat &rFormat)
 

Private Attributes

OUString m_sFormatName
 
std::optional< SfxItemSetm_oOldSet
 
sal_Int32 m_nAnchorContentOffset
 
SwNodeOffset m_nNodeIndex
 
const sal_uInt16 m_nFormatWhich
 
const bool m_bSaveDrawPt
 

Friends

class SwUndoDefaultAttr
 

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 85 of file UndoAttribute.hxx.

Constructor & Destructor Documentation

◆ SwUndoFormatAttr() [1/2]

SwUndoFormatAttr::SwUndoFormatAttr ( SfxItemSet &&  rOldSet,
SwFormat rFormat,
bool  bSaveDrawPt 
)

Definition at line 116 of file unattr.cxx.

References GetName(), Init(), INSFMTATTR, and m_sFormatName.

◆ SwUndoFormatAttr() [2/2]

SwUndoFormatAttr::SwUndoFormatAttr ( const SfxPoolItem rItem,
SwFormat rFormat,
bool  bSaveDrawPt 
)

Definition at line 133 of file unattr.cxx.

References GetName(), Init(), INSFMTATTR, m_oOldSet, and m_sFormatName.

◆ ~SwUndoFormatAttr()

SwUndoFormatAttr::~SwUndoFormatAttr ( )
overridevirtual

Definition at line 179 of file unattr.cxx.

Member Function Documentation

◆ GetFormat()

SwFormat * SwUndoFormatAttr::GetFormat ( const SwDoc rDoc)

◆ GetRewriter()

SwRewriter SwUndoFormatAttr::GetRewriter ( ) const
overridevirtual

Returns the rewriter for this object.

Returns
the rewriter for this object

Reimplemented from SwUndo.

Definition at line 361 of file unattr.cxx.

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

◆ Init()

void SwUndoFormatAttr::Init ( const SwFormat rFormat)
private

◆ PutAttr()

void SwUndoFormatAttr::PutAttr ( const SfxPoolItem rItem,
const SwDoc rDoc 
)

◆ RedoImpl()

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

Implements SwUndo.

Definition at line 298 of file unattr.cxx.

References UndoImpl().

◆ RepeatImpl()

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

◆ RestoreFlyAnchor()

bool SwUndoFormatAttr::RestoreFlyAnchor ( ::sw::UndoRedoContext rContext)
private

◆ SaveFlyAnchor()

void SwUndoFormatAttr::SaveFlyAnchor ( const SwFormat pFormat,
bool  bSaveDrawPt = false 
)
private

◆ UndoImpl()

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

Friends And Related Function Documentation

◆ SwUndoDefaultAttr

friend class SwUndoDefaultAttr
friend

Definition at line 87 of file UndoAttribute.hxx.

Member Data Documentation

◆ m_bSaveDrawPt

const bool SwUndoFormatAttr::m_bSaveDrawPt
private

Definition at line 93 of file UndoAttribute.hxx.

Referenced by Init(), PutAttr(), RestoreFlyAnchor(), and UndoImpl().

◆ m_nAnchorContentOffset

sal_Int32 SwUndoFormatAttr::m_nAnchorContentOffset
private

Definition at line 90 of file UndoAttribute.hxx.

Referenced by RestoreFlyAnchor(), and SaveFlyAnchor().

◆ m_nFormatWhich

const sal_uInt16 SwUndoFormatAttr::m_nFormatWhich
private

Definition at line 92 of file UndoAttribute.hxx.

Referenced by GetFormat(), Init(), RepeatImpl(), and UndoImpl().

◆ m_nNodeIndex

SwNodeOffset SwUndoFormatAttr::m_nNodeIndex
private

Definition at line 91 of file UndoAttribute.hxx.

Referenced by GetFormat(), Init(), RestoreFlyAnchor(), and SaveFlyAnchor().

◆ m_oOldSet

std::optional<SfxItemSet> SwUndoFormatAttr::m_oOldSet
private

◆ m_sFormatName

OUString SwUndoFormatAttr::m_sFormatName
private

Definition at line 88 of file UndoAttribute.hxx.

Referenced by GetFormat(), GetRewriter(), and SwUndoFormatAttr().


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