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

#include <undobj.hxx>

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

Public Member Functions

virtual ~SwUndoInserts () override
 
virtual void UndoImpl (::sw::UndoRedoContext &) override
 
virtual void RedoImpl (::sw::UndoRedoContext &) override
 
virtual void RepeatImpl (::sw::RepeatContext &) override
 
void SetInsertRange (const SwPaM &, bool bScanFlys=true, SwNodeOffset nDeleteTextNodes=SwNodeOffset(1))
 
std::vector< SwFrameFormat * > * GetFlysAnchoredAt ()
 
void dumpAsXml (xmlTextWriterPtr pWriter) const override
 
- 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
 
- Public 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
 

Static Public Member Functions

static bool IsCreateUndoForNewFly (SwFormatAnchor const &rAnchor, SwNodeOffset const nStartNode, SwNodeOffset const nEndNode)
 This is not the same as IsDestroyFrameAnchoredAtChar() and intentionally so: because the SwUndoInserts::UndoImpl() must remove the flys at the start/end position that were inserted but not the ones at the start/insert position that were already there; handle all at-char flys at start/end node like this, even if they're not on the start/end position, because it makes it easier to ensure that the Undo/Redo run in inverse order. More...
 
- 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)
 

Protected Member Functions

 SwUndoInserts (SwUndoId nUndoId, const SwPaM &)
 
- Protected Member Functions inherited from SwUndo
virtual SwRewriter GetRewriter () const
 Returns the rewriter for this object. More...
 
virtual void RepeatImpl (::sw::RepeatContext &)
 

Private Attributes

SwTextFormatCollm_pTextFormatColl
 
SwTextFormatCollm_pLastNodeColl
 
std::optional< std::vector< SwFrameFormat * > > m_pFrameFormats
 
std::vector< std::shared_ptr< SwUndoInsLayFormat > > m_FlyUndos
 
std::unique_ptr< SwRedlineDatam_pRedlineData
 
SwNodeOffset m_nDeleteTextNodes
 
SwNodeOffset m_nNodeDiff
 
std::optional< SwNodeIndexm_oUndoNodeIndex
 start of Content in UndoNodes for Redo More...
 
sal_uInt16 m_nSetPos
 
- Private Attributes inherited from SwUndoSaveContent
std::unique_ptr< SwHistorym_pHistory
 

Additional Inherited Members

- Public Attributes inherited from SwUndRng
SwNodeOffset m_nSttNode
 
SwNodeOffset m_nEndNode
 
sal_Int32 m_nSttContent
 
sal_Int32 m_nEndContent
 
- 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
 
- Private Member Functions inherited from SwUndoSaveContent
 SwUndoSaveContent ()
 
virtual ~SwUndoSaveContent () COVERITY_NOEXCEPT_FALSE
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 
void DelContentIndex (const SwPosition &pMark, const SwPosition &pPoint, DelContentType nDelContentType=DelContentType::AllMask)
 
- Static Private Member Functions inherited from SwUndoSaveContent
static void MoveToUndoNds (SwPaM &rPam, SwNodeIndex *pNodeIdx, SwNodeOffset *pEndNdIdx=nullptr)
 
static void MoveFromUndoNds (SwDoc &rDoc, SwNodeOffset nNodeIdx, SwPosition &rInsPos, const SwNodeOffset *pEndNdIdx=nullptr, bool bForceCreateFrames=false)
 
static bool MovePtBackward (SwPaM &rPam)
 
static void MovePtForward (SwPaM &rPam, bool bMvBkwrd)
 

Detailed Description

Definition at line 253 of file undobj.hxx.

Constructor & Destructor Documentation

◆ SwUndoInserts()

SwUndoInserts::SwUndoInserts ( SwUndoId  nUndoId,
const SwPaM rPam 
)
protected

◆ ~SwUndoInserts()

SwUndoInserts::~SwUndoInserts ( )
overridevirtual

Member Function Documentation

◆ dumpAsXml()

void SwUndoInserts::dumpAsXml ( xmlTextWriterPtr  pWriter) const
overridevirtual

Reimplemented from SwUndoSaveContent.

Definition at line 189 of file untblk.cxx.

References SfxUndoAction::dumpAsXml(), SwUndoSaveContent::dumpAsXml(), m_FlyUndos, and m_pFrameFormats.

◆ GetFlysAnchoredAt()

std::vector< SwFrameFormat * > * SwUndoInserts::GetFlysAnchoredAt ( )
inline

Definition at line 280 of file undobj.hxx.

Referenced by sw::DocumentContentOperationsManager::CopyImplImpl().

◆ IsCreateUndoForNewFly()

bool SwUndoInserts::IsCreateUndoForNewFly ( SwFormatAnchor const &  rAnchor,
SwNodeOffset const  nStartNode,
SwNodeOffset const  nEndNode 
)
static

This is not the same as IsDestroyFrameAnchoredAtChar() and intentionally so: because the SwUndoInserts::UndoImpl() must remove the flys at the start/end position that were inserted but not the ones at the start/insert position that were already there; handle all at-char flys at start/end node like this, even if they're not on the start/end position, because it makes it easier to ensure that the Undo/Redo run in inverse order.

Definition at line 174 of file untblk.cxx.

References SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetAnchorNode(), and SwNode::GetIndex().

Referenced by SwReader::Read(), and SetInsertRange().

◆ RedoImpl()

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

◆ RepeatImpl()

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

◆ SetInsertRange()

void SwUndoInserts::SetInsertRange ( const SwPaM rPam,
bool  bScanFlys = true,
SwNodeOffset  nDeleteTextNodes = SwNodeOffset(1) 
)

◆ UndoImpl()

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

Member Data Documentation

◆ m_FlyUndos

std::vector< std::shared_ptr<SwUndoInsLayFormat> > SwUndoInserts::m_FlyUndos
private

Definition at line 257 of file undobj.hxx.

Referenced by dumpAsXml(), RedoImpl(), SetInsertRange(), and UndoImpl().

◆ m_nDeleteTextNodes

SwNodeOffset SwUndoInserts::m_nDeleteTextNodes
private

Definition at line 259 of file undobj.hxx.

Referenced by RedoImpl(), SetInsertRange(), and UndoImpl().

◆ m_nNodeDiff

SwNodeOffset SwUndoInserts::m_nNodeDiff
private

Definition at line 260 of file undobj.hxx.

Referenced by RedoImpl(), and UndoImpl().

◆ m_nSetPos

sal_uInt16 SwUndoInserts::m_nSetPos
private

Definition at line 263 of file undobj.hxx.

Referenced by RedoImpl(), and UndoImpl().

◆ m_oUndoNodeIndex

std::optional<SwNodeIndex> SwUndoInserts::m_oUndoNodeIndex
private

start of Content in UndoNodes for Redo

Definition at line 262 of file undobj.hxx.

Referenced by RedoImpl(), UndoImpl(), and ~SwUndoInserts().

◆ m_pFrameFormats

std::optional<std::vector<SwFrameFormat*> > SwUndoInserts::m_pFrameFormats
private

Definition at line 256 of file undobj.hxx.

Referenced by dumpAsXml(), SetInsertRange(), SwUndoInserts(), and ~SwUndoInserts().

◆ m_pLastNodeColl

SwTextFormatColl * SwUndoInserts::m_pLastNodeColl
private

Definition at line 255 of file undobj.hxx.

Referenced by RedoImpl(), and UndoImpl().

◆ m_pRedlineData

std::unique_ptr<SwRedlineData> SwUndoInserts::m_pRedlineData
private

Definition at line 258 of file undobj.hxx.

Referenced by RedoImpl(), SwUndoInserts(), and ~SwUndoInserts().

◆ m_pTextFormatColl

SwTextFormatColl* SwUndoInserts::m_pTextFormatColl
private

Definition at line 255 of file undobj.hxx.

Referenced by RedoImpl(), SwUndoInserts(), and UndoImpl().


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