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

#include <UndoInsert.hxx>

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

Classes

class  Impl
 

Public Member Functions

 SwUndoReplace (SwPaM const &rPam, OUString const &rInsert, bool const bRegExp)
 
virtual ~SwUndoReplace () override
 
virtual void UndoImpl (::sw::UndoRedoContext &) override
 
virtual void RedoImpl (::sw::UndoRedoContext &) override
 
virtual SwRewriter GetRewriter () const override
 Returns the rewriter of this undo object. More...
 
void SetEnd (const SwPaM &rPam)
 
- 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

std::unique_ptr< Implm_pImpl
 

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)
 
- Protected Member Functions inherited from SwUndo
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 99 of file UndoInsert.hxx.

Constructor & Destructor Documentation

◆ SwUndoReplace()

SwUndoReplace::SwUndoReplace ( SwPaM const &  rPam,
OUString const &  rInsert,
bool const  bRegExp 
)

Definition at line 506 of file unins.cxx.

References m_pImpl, and REPLACE.

◆ ~SwUndoReplace()

SwUndoReplace::~SwUndoReplace ( )
overridevirtual

Definition at line 513 of file unins.cxx.

Member Function Documentation

◆ GetRewriter()

SwRewriter SwUndoReplace::GetRewriter ( ) const
overridevirtual

Returns the rewriter of this undo object.

If this undo object represents several replacements the rewriter contains the following rules:

$1 -> <number of replacements>
$2 -> occurrences of
$3 -> <replaced text>

If this undo object represents one replacement the rewriter contains these rules:

$1 -> <replaced text>
$2 -> "->"                   (STR_YIELDS)
$3 -> <replacing text>
Returns
the rewriter of this undo object

Reimplemented from SwUndo.

Definition at line 570 of file unins.cxx.

References m_pImpl, and MakeUndoReplaceRewriter().

◆ RedoImpl()

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

Implements SwUndo.

Definition at line 522 of file unins.cxx.

References m_pImpl.

◆ SetEnd()

void SwUndoReplace::SetEnd ( const SwPaM rPam)

Definition at line 575 of file unins.cxx.

References m_pImpl.

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

◆ UndoImpl()

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

Implements SwUndo.

Definition at line 517 of file unins.cxx.

References m_pImpl.

Member Data Documentation

◆ m_pImpl

std::unique_ptr<Impl> SwUndoReplace::m_pImpl
private

Definition at line 136 of file UndoInsert.hxx.

Referenced by GetRewriter(), RedoImpl(), SetEnd(), and UndoImpl().


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