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

#include <UndoOverwrite.hxx>

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

Public Member Functions

 SwUndoOverwrite (SwDoc &, SwPosition &, sal_Unicode cIns)
 
virtual ~SwUndoOverwrite () 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 of this undo object. More...
 
bool CanGrouping (SwDoc &, SwPosition &, sal_Unicode cIns)
 
- 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 Attributes

OUString m_aDelStr
 
OUString m_aInsStr
 
std::unique_ptr< SwRedlineSaveDatasm_pRedlSaveData
 
SwNodeOffset m_nStartNode
 
sal_Int32 m_nStartContent
 
bool m_bInsChar: 1
 
bool m_bGroup: 1
 
- 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
 
- 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 34 of file UndoOverwrite.hxx.

Constructor & Destructor Documentation

◆ SwUndoOverwrite()

SwUndoOverwrite::SwUndoOverwrite ( SwDoc rDoc,
SwPosition rPos,
sal_Unicode  cIns 
)

◆ ~SwUndoOverwrite()

SwUndoOverwrite::~SwUndoOverwrite ( )
overridevirtual

Definition at line 99 of file unovwr.cxx.

Member Function Documentation

◆ CanGrouping()

bool SwUndoOverwrite::CanGrouping ( SwDoc rDoc,
SwPosition rPos,
sal_Unicode  cIns 
)

◆ GetRewriter()

SwRewriter SwUndoOverwrite::GetRewriter ( ) const
overridevirtual

Returns the rewriter of this undo object.

The rewriter contains the following rule:

$1 -> '<overwritten text>'

<overwritten text> is shortened to nUndoStringLength characters.

Returns
the rewriter of this undo object

Reimplemented from SwUndo.

Definition at line 312 of file unovwr.cxx.

References SwRewriter::AddRule(), m_aInsStr, nUndoStringLength, ShortenString(), SwResId(), and UndoArg1.

◆ RedoImpl()

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

◆ RepeatImpl()

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

◆ UndoImpl()

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

Member Data Documentation

◆ m_aDelStr

OUString SwUndoOverwrite::m_aDelStr
private

Definition at line 36 of file UndoOverwrite.hxx.

Referenced by CanGrouping(), RedoImpl(), SwUndoOverwrite(), and UndoImpl().

◆ m_aInsStr

OUString SwUndoOverwrite::m_aInsStr
private

◆ m_bGroup

bool SwUndoOverwrite::m_bGroup
private

Definition at line 41 of file UndoOverwrite.hxx.

Referenced by CanGrouping().

◆ m_bInsChar

bool SwUndoOverwrite::m_bInsChar
private

Definition at line 40 of file UndoOverwrite.hxx.

Referenced by CanGrouping(), and SwUndoOverwrite().

◆ m_nStartContent

sal_Int32 SwUndoOverwrite::m_nStartContent
private

Definition at line 39 of file UndoOverwrite.hxx.

Referenced by CanGrouping(), RedoImpl(), SwUndoOverwrite(), and UndoImpl().

◆ m_nStartNode

SwNodeOffset SwUndoOverwrite::m_nStartNode
private

Definition at line 38 of file UndoOverwrite.hxx.

Referenced by CanGrouping(), RedoImpl(), SwUndoOverwrite(), and UndoImpl().

◆ m_pRedlSaveData

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

Definition at line 37 of file UndoOverwrite.hxx.

Referenced by CanGrouping(), RedoImpl(), SwUndoOverwrite(), and UndoImpl().


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