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

#include <UndoDelete.hxx>

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

Public Member Functions

 SwUndoDelete (SwPaM &, 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
 
- Public Member Functions inherited from SwUndo
 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
 

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 ()
 
 ~SwUndoSaveContent () COVERITY_NOEXCEPT_FALSE
 
void DelContentIndex (const SwPosition &pMark, const SwPosition &pPoint, DelContentType nDelContentType=DelContentType::AllMask)
 

Private Attributes

std::unique_ptr< SwNodeIndexm_pMvStt
 
boost::optional< OUString > m_aSttStr
 
boost::optional< OUString > m_aEndStr
 
std::unique_ptr< SwRedlineSaveDatasm_pRedlSaveData
 
std::shared_ptr< ::sfx2::MetadatableUndom_pMetadataUndoStart
 
std::shared_ptr< ::sfx2::MetadatableUndom_pMetadataUndoEnd
 
OUString m_sTableName
 
sal_uLong m_nNode
 
sal_uLong m_nNdDiff
 
sal_uLong m_nSectDiff
 
sal_uLong m_nReplaceDummy
 
sal_uInt16 m_nSetPos
 
bool m_bGroup: 1
 
bool m_bBackSp: 1
 
bool m_bJoinNext: 1
 
bool m_bTableDelLastNd: 1
 
bool const m_bDelFullPara: 1
 
bool m_bResetPgDesc: 1
 
bool m_bResetPgBrk: 1
 
bool const m_bFromTableCopy: 1
 
- Private Attributes inherited from SwUndRng
sal_uLong m_nSttNode
 
sal_uLong 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)
 
- Static Protected Member Functions inherited from SwUndo
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 inherited from SwUndo
bool m_bCacheComment
 
boost::optional< OUString > maComment
 
- Static Private Member Functions inherited from SwUndoSaveContent
static void MoveToUndoNds (SwPaM &rPam, SwNodeIndex *pNodeIdx, sal_uLong *pEndNdIdx=nullptr)
 
static void MoveFromUndoNds (SwDoc &rDoc, sal_uLong nNodeIdx, SwPosition &rInsPos, const sal_uLong *pEndNdIdx=nullptr, bool bForceCreateFrames=false)
 
static bool MovePtBackward (SwPaM &rPam)
 
static void MovePtForward (SwPaM &rPam, bool bMvBkwrd)
 

Detailed Description

Definition at line 35 of file UndoDelete.hxx.

Constructor & Destructor Documentation

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

Definition at line 173 of file undel.cxx.

References SwNodeRange::aEnd, AllMask, SwIndex::Assign(), 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(), SwPaM::GetNode(), 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, SwUndRng::m_nEndContent, SwUndRng::m_nEndNode, m_nNdDiff, m_nNode, m_nReplaceDummy, m_nSectDiff, m_nSetPos, SwUndRng::m_nSttContent, SwUndRng::m_nSttNode, SwUndoSaveContent::m_pHistory, m_pMvStt, m_pRedlSaveData, SwPaM::Move(), SwNodes::MoveNodes(), SwPosition::nContent, SwPosition::nNode, RES_BREAK, RES_PAGEDESC, SaveContent(), IDocumentContentOperations::SplitNode(), SwPaM::Start(), SwNode::StartOfSectionNode(), and Text.

SwUndoDelete::~SwUndoDelete ( )
overridevirtual

Definition at line 594 of file undel.cxx.

References m_nNode, m_pMvStt, and m_pRedlSaveData.

Member Function Documentation

bool SwUndoDelete::CanGrouping ( SwDoc pDoc,
const SwPaM rDelPam 
)
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 751 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.

bool SwUndoDelete::IsDelFullPara ( ) const
inline

Definition at line 100 of file UndoDelete.hxx.

References m_bDelFullPara.

Referenced by SwUndoTableCpyTable::UndoImpl().

void SwUndoDelete::RedoImpl ( ::sw::UndoRedoContext rContext)
overridevirtual
void SwUndoDelete::RepeatImpl ( ::sw::RepeatContext rContext)
overridevirtual
bool SwUndoDelete::SaveContent ( const SwPosition pStt,
const SwPosition pEnd,
SwTextNode pSttTextNd,
SwTextNode pEndTextNd 
)
private
void SwUndoDelete::SetPgBrkFlags ( bool  bPageBreak,
bool  bPageDesc 
)
inline

Definition at line 94 of file UndoDelete.hxx.

References m_bResetPgBrk, and m_bResetPgDesc.

void SwUndoDelete::SetTableDelLastNd ( )
inline

Definition at line 91 of file UndoDelete.hxx.

References m_bTableDelLastNd.

void SwUndoDelete::SetTableName ( const OUString &  rName)

Definition at line 1295 of file undel.cxx.

References m_sTableName.

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

Implements SwUndo.

Definition at line 837 of file undel.cxx.

References SwUndRng::AddUndoRedoPaM(), SwIndex::Assign(), sw::CheckParaRedlineMerge(), SwTextNode::ClearSwpHintsArr(), SwNodes::Copy_(), Count, SwNodes::Delete(), end, sw::Existing, FindFirstAndNextNode(), SwIterator< TElementType, TSource, eMode >::First(), SwDoc::GetDfltTextFormatColl(), sw::UndoRedoContext::GetDoc(), SwDoc::getIDocumentContentOperations(), SwNodeIndex::GetIndex(), SwNode::GetIndex(), getLength(), SwNodeIndex::GetNode(), SwDoc::GetNodes(), SwTextNode::GetpSwpHints(), SwDoc::GetSpzFrameFormats(), SwNode::GetTextNode(), SwDoc::GetUndoManager(), sw::UndoManager::GetUndoNodes(), SwContentNode::HasSwAttrSet(), SwTextNode::InsertText(), SwNode::IsContentNode(), SwNode::IsTableNode(), 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, SwUndoSaveContent::m_pHistory, m_pMetadataUndoEnd, m_pMetadataUndoStart, m_pMvStt, m_pRedlSaveData, MakeFrames(), SwNodes::MakeTextNode(), SwHistory::Move(), SwNodes::MoveNodes(), SwPosition::nContent, sw::New, SwIterator< TElementType, TSource, eMode >::Next(), SwPosition::nNode, NOHINTEXPAND, RES_BREAK, RES_PAGEDESC, SwTextNode::ResetAllAttr(), sfx2::Metadatable::RestoreMetadata(), SwUndo::SetSaveData(), IDocumentContentOperations::SplitNode(), and void().

Member Data Documentation

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

Definition at line 41 of file UndoDelete.hxx.

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

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

Definition at line 41 of file UndoDelete.hxx.

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

bool SwUndoDelete::m_bBackSp
private

Definition at line 55 of file UndoDelete.hxx.

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

bool const SwUndoDelete::m_bDelFullPara
private

Definition at line 58 of file UndoDelete.hxx.

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

bool const SwUndoDelete::m_bFromTableCopy
private

Definition at line 61 of file UndoDelete.hxx.

Referenced by SwUndoDelete(), and UndoImpl().

bool SwUndoDelete::m_bGroup
private

Definition at line 54 of file UndoDelete.hxx.

Referenced by CanGrouping().

bool SwUndoDelete::m_bJoinNext
private

Definition at line 56 of file UndoDelete.hxx.

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

bool SwUndoDelete::m_bResetPgBrk
private

Definition at line 60 of file UndoDelete.hxx.

Referenced by SetPgBrkFlags(), and UndoImpl().

bool SwUndoDelete::m_bResetPgDesc
private

Definition at line 59 of file UndoDelete.hxx.

Referenced by SetPgBrkFlags(), and UndoImpl().

bool SwUndoDelete::m_bTableDelLastNd
private

Definition at line 57 of file UndoDelete.hxx.

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

sal_uLong SwUndoDelete::m_nNdDiff
private

Definition at line 49 of file UndoDelete.hxx.

Referenced by SwUndoDelete(), and UndoImpl().

sal_uLong SwUndoDelete::m_nNode
private

Definition at line 48 of file UndoDelete.hxx.

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

sal_uLong SwUndoDelete::m_nReplaceDummy
private

Definition at line 51 of file UndoDelete.hxx.

Referenced by SwUndoDelete(), and UndoImpl().

sal_uLong SwUndoDelete::m_nSectDiff
private

Definition at line 50 of file UndoDelete.hxx.

Referenced by SwUndoDelete(), and UndoImpl().

sal_uInt16 SwUndoDelete::m_nSetPos
private

Definition at line 52 of file UndoDelete.hxx.

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

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

Definition at line 44 of file UndoDelete.hxx.

Referenced by SaveContent(), and UndoImpl().

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

Definition at line 43 of file UndoDelete.hxx.

Referenced by SaveContent(), and UndoImpl().

std::unique_ptr<SwNodeIndex> SwUndoDelete::m_pMvStt
private

Definition at line 40 of file UndoDelete.hxx.

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

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

Definition at line 42 of file UndoDelete.hxx.

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

OUString SwUndoDelete::m_sTableName
private

Definition at line 46 of file UndoDelete.hxx.

Referenced by GetRewriter(), and SetTableName().


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