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

Typing one or more characters to a single paragraph. More...

#include <UndoInsert.hxx>

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

Public Member Functions

 SwUndoInsert (const SwNode &rNode, sal_Int32 nContent, sal_Int32 nLen, const SwInsertFlags nInsertFlags, bool bWDelim=true)
 
 SwUndoInsert (const SwNode &rNode)
 
virtual ~SwUndoInsert () 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...
 
void SetWithRsid ()
 
bool IsIndependent (const SwUndoInsert &rOther) const
 
- 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 CanGrouping (sal_Unicode cIns)
 
bool CanGrouping (const SwPosition &rPos)
 
void Init (const SwNode &rNode)
 
std::optional< OUString > GetTextFromDoc () 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_oUndoNodeIndex
 start of Content in UndoNodes for Redo More...
 
std::optional< OUString > maText
 
std::optional< OUString > maUndoText
 
std::unique_ptr< SwRedlineDatam_pRedlData
 
SwNodeOffset m_nNode
 
sal_Int32 m_nContent
 
sal_Int32 m_nLen
 
bool m_bIsWordDelim: 1
 
bool m_bIsAppend: 1
 
bool m_bWithRsid: 1
 
const SwInsertFlags m_nInsertFlags
 
SwDocm_pDoc
 
- Private Attributes inherited from SwUndoSaveContent
std::unique_ptr< SwHistorym_pHistory
 

Friends

class ::sw::DocumentContentOperationsManager
 

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

Typing one or more characters to a single paragraph.

Definition at line 42 of file UndoInsert.hxx.

Constructor & Destructor Documentation

◆ SwUndoInsert() [1/2]

SwUndoInsert::SwUndoInsert ( const SwNode rNode,
sal_Int32  nContent,
sal_Int32  nLen,
const SwInsertFlags  nInsertFlags,
bool  bWDelim = true 
)

Definition at line 103 of file unins.cxx.

References Init(), and TYPING.

◆ SwUndoInsert() [2/2]

SwUndoInsert::SwUndoInsert ( const SwNode rNode)

Definition at line 116 of file unins.cxx.

References EMPTYEXPAND, Init(), and SPLITNODE.

◆ ~SwUndoInsert()

SwUndoInsert::~SwUndoInsert ( )
overridevirtual

Member Function Documentation

◆ CanGrouping() [1/2]

bool SwUndoInsert::CanGrouping ( const SwPosition rPos)
private

◆ CanGrouping() [2/2]

bool SwUndoInsert::CanGrouping ( sal_Unicode  cIns)
private

◆ GetRewriter()

SwRewriter SwUndoInsert::GetRewriter ( ) const
overridevirtual

Returns rewriter for this undo object.

The returned rewriter has the following rule:

$1 -> '<inserted text>'

<inserted text> is shortened to a length of nUndoStringLength.

Returns
rewriter for this undo object

Reimplemented from SwUndo.

Definition at line 446 of file unins.cxx.

References SwRewriter::AddRule(), aStr, DenoteSpecialCharacters(), maText, maUndoText, nUndoStringLength, ShortenString(), SwResId(), and UndoArg1.

◆ GetTextFromDoc()

std::optional< OUString > SwUndoInsert::GetTextFromDoc ( ) const
private

◆ Init()

void SwUndoInsert::Init ( const SwNode rNode)
private

◆ IsIndependent()

bool SwUndoInsert::IsIndependent ( const SwUndoInsert rOther) const

Definition at line 476 of file unins.cxx.

References m_nNode.

◆ RedoImpl()

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

◆ RepeatImpl()

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

◆ SetWithRsid()

void SwUndoInsert::SetWithRsid ( )
inline

Definition at line 90 of file UndoInsert.hxx.

References m_bWithRsid.

Referenced by SwDoc::UpdateRsid().

◆ UndoImpl()

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

Friends And Related Function Documentation

◆ ::sw::DocumentContentOperationsManager

Definition at line 57 of file UndoInsert.hxx.

Member Data Documentation

◆ m_bIsAppend

bool SwUndoInsert::m_bIsAppend
private

Definition at line 52 of file UndoInsert.hxx.

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

◆ m_bIsWordDelim

bool SwUndoInsert::m_bIsWordDelim
private

Definition at line 51 of file UndoInsert.hxx.

Referenced by CanGrouping().

◆ m_bWithRsid

bool SwUndoInsert::m_bWithRsid
private

Definition at line 53 of file UndoInsert.hxx.

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

◆ m_nContent

sal_Int32 SwUndoInsert::m_nContent
private

Definition at line 50 of file UndoInsert.hxx.

Referenced by CanGrouping(), GetTextFromDoc(), RedoImpl(), RepeatImpl(), and UndoImpl().

◆ m_nInsertFlags

const SwInsertFlags SwUndoInsert::m_nInsertFlags
private

Definition at line 55 of file UndoInsert.hxx.

Referenced by RedoImpl().

◆ m_nLen

sal_Int32 SwUndoInsert::m_nLen
private

Definition at line 50 of file UndoInsert.hxx.

Referenced by CanGrouping(), GetTextFromDoc(), RedoImpl(), RepeatImpl(), and UndoImpl().

◆ m_nNode

SwNodeOffset SwUndoInsert::m_nNode
private

◆ m_oUndoNodeIndex

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

start of Content in UndoNodes for Redo

Definition at line 45 of file UndoInsert.hxx.

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

◆ m_pDoc

SwDoc* SwUndoInsert::m_pDoc
private

Definition at line 61 of file UndoInsert.hxx.

Referenced by GetTextFromDoc(), Init(), and UndoImpl().

◆ m_pRedlData

std::unique_ptr<SwRedlineData> SwUndoInsert::m_pRedlData
private

Definition at line 48 of file UndoInsert.hxx.

Referenced by CanGrouping(), Init(), RedoImpl(), and ~SwUndoInsert().

◆ maText

std::optional<OUString> SwUndoInsert::maText
private

Definition at line 46 of file UndoInsert.hxx.

Referenced by GetRewriter(), RedoImpl(), UndoImpl(), and ~SwUndoInsert().

◆ maUndoText

std::optional<OUString> SwUndoInsert::maUndoText
private

Definition at line 47 of file UndoInsert.hxx.

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


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