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

#include <UndoDelete.hxx>

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

Public Member Functions

 SwUndoDelete (SwPaM &, SwDeleteFlags flags, bool bFullPara=false, bool bCalledByTableCpy=false)
 
virtual ~SwUndoDelete () 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 rewriter for this undo object. More...
 
bool CanGrouping (SwDoc &, const SwPaM &)
 
void SetTableDelLastNd ()
 
void SetPgBrkFlags (bool bPageBreak, bool bPageDesc)
 
void SetTableName (const OUString &rName)
 
bool IsDelFullPara () const
 
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
 

Private Member Functions

bool SaveContent (const SwPosition *pStt, const SwPosition *pEnd, SwTextNode *pSttTextNd, SwTextNode *pEndTextNd)
 
- 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 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)
 

Private Attributes

std::optional< SwNodeIndexm_oMvStt
 
std::optional< OUString > m_aSttStr
 
std::optional< OUString > m_aEndStr
 
std::unique_ptr< SwRedlineSaveDatasm_pRedlSaveData
 
std::shared_ptr< ::sfx2::MetadatableUndom_pMetadataUndoStart
 
std::shared_ptr< ::sfx2::MetadatableUndom_pMetadataUndoEnd
 
OUString m_sTableName
 
SwNodeOffset m_nNode
 
SwNodeOffset m_nNdDiff
 
SwNodeOffset m_nSectDiff
 
SwNodeOffset m_nReplaceDummy
 
sal_uInt16 m_nSetPos
 
bool m_bGroup: 1
 
bool m_bBackSp: 1
 
bool m_bJoinNext: 1
 
bool m_bTableDelLastNd: 1
 
bool m_bDelFullPara: 1
 
bool m_bResetPgDesc: 1
 
bool m_bResetPgBrk: 1
 
bool m_bFromTableCopy: 1
 
SwDeleteFlags m_DeleteFlags
 
- Private Attributes inherited from SwUndRng
SwNodeOffset m_nSttNode
 
SwNodeOffset m_nEndNode
 
sal_Int32 m_nSttContent
 
sal_Int32 m_nEndContent
 
- Private Attributes inherited from SwUndoSaveContent
std::unique_ptr< SwHistorym_pHistory
 

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
 
- 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 38 of file UndoDelete.hxx.

Constructor & Destructor Documentation

◆ SwUndoDelete()

SwUndoDelete::SwUndoDelete ( SwPaM rPam,
SwDeleteFlags  flags,
bool  bFullPara = false,
bool  bCalledByTableCpy = false 
)

Definition at line 175 of file undel.cxx.

References SwPosition::Adjust(), SwNodeRange::aEnd, AllMask, ArtificialSelection, SwNodeRange::aStart, CheckNoCntnt, SwNodes::Count(), DelBookmarks(), SwUndoSaveContent::DelContentIndex(), DELETE, SwPaM::DeleteMark(), DelFullParaMoveFrames(), SwRedlineTable::empty(), SwNode::EndOfSectionIndex(), SwPaM::Exchange(), SwUndo::FillSaveData(), fnMoveForward, SwPaM::GetDoc(), SwNodes::GetEndOfContent(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentRedlineAccess(), SwDoc::GetIDocumentUndoRedo(), SwNodeIndex::GetIndex(), SwNode::GetIndex(), SwPaM::GetMark(), SwNodeIndex::GetNode(), SwPosition::GetNodeIndex(), SwDoc::GetNodes(), SwPaM::GetPoint(), IDocumentRedlineAccess::GetRedlineTable(), SwDoc::GetSpzFrameFormats(), SwTextNode::GetText(), SwTextNode::GetTextColl(), SwNode::GetTextNode(), SwDoc::GetUndoManager(), sw::UndoManager::GetUndoNodes(), GoInNode(), SwPaM::HasMark(), SwNode::IsContentNode(), IDocumentRedlineAccess::IsIgnoreRedline(), SwNode::IsSectionNode(), lcl_MakeAutoFrames(), m_bBackSp, SwUndo::m_bCacheComment, m_bDelFullPara, m_bFromTableCopy, m_bJoinNext, m_DeleteFlags, SwUndRng::m_nEndContent, SwUndRng::m_nEndNode, m_nNdDiff, m_nNode, m_nReplaceDummy, m_nSectDiff, m_nSetPos, SwUndRng::m_nSttContent, SwUndRng::m_nSttNode, m_oMvStt, SwUndoSaveContent::m_pHistory, m_pRedlSaveData, SwPaM::Move(), SwNodes::MoveNodes(), Replace, RES_BREAK(), RES_PAGEDESC(), SaveContent(), IDocumentContentOperations::SplitNode(), start, SwPaM::StartEnd(), SwNode::StartOfSectionNode(), and Text.

◆ ~SwUndoDelete()

SwUndoDelete::~SwUndoDelete ( )
overridevirtual

Definition at line 599 of file undel.cxx.

References m_nNode, m_oMvStt, and m_pRedlSaveData.

Member Function Documentation

◆ CanGrouping()

bool SwUndoDelete::CanGrouping ( SwDoc rDoc,
const SwPaM rDelPam 
)

◆ dumpAsXml()

void SwUndoDelete::dumpAsXml ( xmlTextWriterPtr  pWriter) const
overridevirtual

Reimplemented from SwUndoSaveContent.

Definition at line 1328 of file undel.cxx.

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

◆ GetRewriter()

SwRewriter SwUndoDelete::GetRewriter ( ) const
overridevirtual

Returns rewriter for this undo object.

The rewriter consists of the following rule:

$1 -> '<deleted text>'

<deleted text> is shortened to nUndoStringLength characters.

Returns
rewriter for this undo object

Reimplemented from SwUndo.

Definition at line 758 of file undel.cxx.

References SwRewriter::AddRule(), SwRewriter::Apply(), aStr, DenoteSpecialCharacters(), SwRewriter::GetPlaceHolder(), lcl_RewriterFromHistory(), m_aEndStr, m_aSttStr, m_nNode, SwUndoSaveContent::m_pHistory, m_sTableName, nUndoStringLength, ShortenString(), SwResId(), UndoArg1, UndoArg2, and UndoArg3.

◆ IsDelFullPara()

bool SwUndoDelete::IsDelFullPara ( ) const
inline

Definition at line 105 of file UndoDelete.hxx.

References m_bDelFullPara.

Referenced by SwUndoTableCpyTable::UndoImpl().

◆ RedoImpl()

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

◆ RepeatImpl()

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

◆ SaveContent()

bool SwUndoDelete::SaveContent ( const SwPosition pStt,
const SwPosition pEnd,
SwTextNode pSttTextNd,
SwTextNode pEndTextNd 
)
private

◆ SetPgBrkFlags()

void SwUndoDelete::SetPgBrkFlags ( bool  bPageBreak,
bool  bPageDesc 
)
inline

Definition at line 99 of file UndoDelete.hxx.

References m_bResetPgBrk, and m_bResetPgDesc.

◆ SetTableDelLastNd()

void SwUndoDelete::SetTableDelLastNd ( )
inline

Definition at line 96 of file UndoDelete.hxx.

References m_bTableDelLastNd.

◆ SetTableName()

void SwUndoDelete::SetTableName ( const OUString &  rName)

Definition at line 1323 of file undel.cxx.

References m_sTableName.

◆ UndoImpl()

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

Implements SwUndo.

Definition at line 838 of file undel.cxx.

References SwUndRng::AddUndoRedoPaM(), SwPosition::Adjust(), SwPosition::Assign(), SwTextNode::ClearSwpHintsArr(), SwNodes::Copy_(), Count, SwNodes::Delete(), IDocumentContentOperations::DelFullPara(), end, FindFirstAndNextNode(), SwIterator< TElementType, TSource, eMode >::First(), SwPosition::GetContentIndex(), SwNode::GetContentNode(), SwDoc::GetDfltTextFormatColl(), sw::UndoRedoContext::GetDoc(), SwTable::GetFrameFormat(), SwDoc::getIDocumentContentOperations(), SwNode::GetIndex(), SwNodeIndex::GetNode(), SwPosition::GetNode(), SwPosition::GetNodeIndex(), SwDoc::GetNodes(), SwNodeIndex::GetNodes(), SwTextNode::GetpSwpHints(), SwDoc::GetSpzFrameFormats(), SwTableNode::GetTable(), SwNode::GetTextNode(), SwDoc::GetUndoManager(), sw::UndoManager::GetUndoNodes(), SwContentNode::HasSwAttrSet(), SwTextNode::InsertText(), SwNode::IsContentNode(), SwNode::IsSectionNode(), SwNode::IsTableNode(), SwNode::IsTextNode(), lcl_MakeAutoFrames(), lcl_ReAnchorAtContentFlyFrames(), m_aEndStr, m_aSttStr, m_bBackSp, m_bDelFullPara, m_bFromTableCopy, m_bJoinNext, m_bResetPgBrk, m_bResetPgDesc, m_bTableDelLastNd, SwUndRng::m_nEndNode, m_nNdDiff, m_nNode, m_nReplaceDummy, m_nSectDiff, m_nSetPos, SwUndRng::m_nSttContent, SwUndRng::m_nSttNode, m_oMvStt, SwUndoSaveContent::m_pHistory, m_pMetadataUndoEnd, m_pMetadataUndoStart, m_pRedlSaveData, MakeFrames(), SwNodes::MakeTextNode(), SwHistory::Move(), SwNodes::MoveNodes(), SwIterator< TElementType, TSource, eMode >::Next(), NOHINTEXPAND, sw::RecreateStartTextFrames(), RES_BREAK(), RES_PAGEDESC(), SwTextNode::ResetAllAttr(), SwFormat::ResetFormatAttr(), SwPosition::SetContent(), SwTextNode::SetInSwUndo(), SwUndo::SetSaveData(), IDocumentContentOperations::SplitNode(), and start.

Member Data Documentation

◆ m_aEndStr

std::optional<OUString> SwUndoDelete::m_aEndStr
private

Definition at line 44 of file UndoDelete.hxx.

Referenced by CanGrouping(), GetRewriter(), RedoImpl(), SaveContent(), and UndoImpl().

◆ m_aSttStr

std::optional<OUString> SwUndoDelete::m_aSttStr
private

Definition at line 44 of file UndoDelete.hxx.

Referenced by CanGrouping(), GetRewriter(), RedoImpl(), SaveContent(), and UndoImpl().

◆ m_bBackSp

bool SwUndoDelete::m_bBackSp
private

Definition at line 58 of file UndoDelete.hxx.

Referenced by CanGrouping(), SwUndoDelete(), and UndoImpl().

◆ m_bDelFullPara

bool SwUndoDelete::m_bDelFullPara
private

Definition at line 61 of file UndoDelete.hxx.

Referenced by IsDelFullPara(), RedoImpl(), RepeatImpl(), SwUndoDelete(), and UndoImpl().

◆ m_bFromTableCopy

bool SwUndoDelete::m_bFromTableCopy
private

Definition at line 64 of file UndoDelete.hxx.

Referenced by SwUndoDelete(), and UndoImpl().

◆ m_bGroup

bool SwUndoDelete::m_bGroup
private

Definition at line 57 of file UndoDelete.hxx.

Referenced by CanGrouping().

◆ m_bJoinNext

bool SwUndoDelete::m_bJoinNext
private

Definition at line 59 of file UndoDelete.hxx.

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

◆ m_bResetPgBrk

bool SwUndoDelete::m_bResetPgBrk
private

Definition at line 63 of file UndoDelete.hxx.

Referenced by SetPgBrkFlags(), and UndoImpl().

◆ m_bResetPgDesc

bool SwUndoDelete::m_bResetPgDesc
private

Definition at line 62 of file UndoDelete.hxx.

Referenced by SetPgBrkFlags(), and UndoImpl().

◆ m_bTableDelLastNd

bool SwUndoDelete::m_bTableDelLastNd
private

Definition at line 60 of file UndoDelete.hxx.

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

◆ m_DeleteFlags

SwDeleteFlags SwUndoDelete::m_DeleteFlags
private

Definition at line 65 of file UndoDelete.hxx.

Referenced by RedoImpl(), and SwUndoDelete().

◆ m_nNdDiff

SwNodeOffset SwUndoDelete::m_nNdDiff
private

Definition at line 52 of file UndoDelete.hxx.

Referenced by SwUndoDelete(), and UndoImpl().

◆ m_nNode

SwNodeOffset SwUndoDelete::m_nNode
private

Definition at line 51 of file UndoDelete.hxx.

Referenced by GetRewriter(), SwUndoDelete(), UndoImpl(), and ~SwUndoDelete().

◆ m_nReplaceDummy

SwNodeOffset SwUndoDelete::m_nReplaceDummy
private

Definition at line 54 of file UndoDelete.hxx.

Referenced by SwUndoDelete(), and UndoImpl().

◆ m_nSectDiff

SwNodeOffset SwUndoDelete::m_nSectDiff
private

Definition at line 53 of file UndoDelete.hxx.

Referenced by SwUndoDelete(), and UndoImpl().

◆ m_nSetPos

sal_uInt16 SwUndoDelete::m_nSetPos
private

Definition at line 55 of file UndoDelete.hxx.

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

◆ m_oMvStt

std::optional<SwNodeIndex> SwUndoDelete::m_oMvStt
private

Definition at line 43 of file UndoDelete.hxx.

Referenced by SwUndoDelete(), UndoImpl(), and ~SwUndoDelete().

◆ m_pMetadataUndoEnd

std::shared_ptr< ::sfx2::MetadatableUndo > SwUndoDelete::m_pMetadataUndoEnd
private

Definition at line 47 of file UndoDelete.hxx.

Referenced by SaveContent(), and UndoImpl().

◆ m_pMetadataUndoStart

std::shared_ptr< ::sfx2::MetadatableUndo > SwUndoDelete::m_pMetadataUndoStart
private

Definition at line 46 of file UndoDelete.hxx.

Referenced by SaveContent(), and UndoImpl().

◆ m_pRedlSaveData

std::unique_ptr<SwRedlineSaveDatas> SwUndoDelete::m_pRedlSaveData
private

Definition at line 45 of file UndoDelete.hxx.

Referenced by CanGrouping(), RedoImpl(), SwUndoDelete(), UndoImpl(), and ~SwUndoDelete().

◆ m_sTableName

OUString SwUndoDelete::m_sTableName
private

Definition at line 49 of file UndoDelete.hxx.

Referenced by GetRewriter(), and SetTableName().


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