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

#include <undocell.hxx>

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

Public Member Functions

 ScUndoCursorAttr (ScDocShell *pNewDocShell, SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab, const ScPatternAttr *pOldPat, const ScPatternAttr *pNewPat, const ScPatternAttr *pApplyPat)
 
virtual ~ScUndoCursorAttr () override
 
virtual void Undo () override
 
virtual void Redo () override
 
virtual void Repeat (SfxRepeatTarget &rTarget) override
 
virtual bool CanRepeat (SfxRepeatTarget &rTarget) const override
 
virtual OUString GetComment () const override
 
void SetEditData (std::unique_ptr< EditTextObject > pOld, std::unique_ptr< EditTextObject > pNew)
 once the objects are passed to this class, their life-cycle is managed by this class; the calling function must pass new'ed objects to this method. More...
 
- Public Member Functions inherited from ScSimpleUndo
 ScSimpleUndo (ScDocShell *pDocSh)
 
virtual bool Merge (SfxUndoAction *pNextAction) override
 
ViewShellId GetViewShellId () const override
 See SfxUndoAction::GetViewShellId(). More...
 
virtual std::optional< ScRangegetAffectedRange () const
 
- 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

void DoChange (const ScPatternAttr *pWhichPattern, const std::unique_ptr< EditTextObject > &pEditData) const
 

Private Attributes

SCCOL nCol
 
SCROW nRow
 
SCTAB nTab
 
ScPatternAttrpOldPattern
 
ScPatternAttrpNewPattern
 
ScPatternAttrpApplyPattern
 
std::unique_ptr< EditTextObjectpOldEditData
 
std::unique_ptr< EditTextObjectpNewEditData
 

Additional Inherited Members

- Public Types inherited from ScSimpleUndo
typedef std::map< SCTAB, std::unique_ptr< sc::ColumnSpanSet > > DataSpansType
 
- Protected Member Functions inherited from ScSimpleUndo
bool IsPaintLocked () const
 
bool SetViewMarkData (const ScMarkData &rMarkData)
 
void BeginUndo ()
 
void EndUndo ()
 
void BeginRedo ()
 
void EndRedo ()
 
void BroadcastChanges (const ScRange &rRange)
 
void BroadcastChanges (const DataSpansType &rSpans)
 Broadcast changes on specified spans. More...
 
- Static Protected Member Functions inherited from ScSimpleUndo
static void ShowTable (SCTAB nTab)
 
static void ShowTable (const ScRange &rRange)
 
- Protected Attributes inherited from ScSimpleUndo
ScDocShellpDocShell
 
std::unique_ptr< SfxUndoActionpDetectiveUndo
 
ViewShellId mnViewShellId
 

Detailed Description

Definition at line 36 of file undocell.hxx.

Constructor & Destructor Documentation

◆ ScUndoCursorAttr()

ScUndoCursorAttr::ScUndoCursorAttr ( ScDocShell pNewDocShell,
SCCOL  nNewCol,
SCROW  nNewRow,
SCTAB  nNewTab,
const ScPatternAttr pOldPat,
const ScPatternAttr pNewPat,
const ScPatternAttr pApplyPat 
)

◆ ~ScUndoCursorAttr()

ScUndoCursorAttr::~ScUndoCursorAttr ( )
overridevirtual

Member Function Documentation

◆ CanRepeat()

bool ScUndoCursorAttr::CanRepeat ( SfxRepeatTarget &  rTarget) const
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 162 of file undocell.cxx.

References rTarget.

◆ DoChange()

void ScUndoCursorAttr::DoChange ( const ScPatternAttr pWhichPattern,
const std::unique_ptr< EditTextObject > &  pEditData 
) const
private

◆ GetComment()

OUString ScUndoCursorAttr::GetComment ( ) const
overridevirtual

own text for automatic attribution

Reimplemented from SfxUndoAction.

Definition at line 100 of file undocell.cxx.

References ScResId().

◆ Redo()

void ScUndoCursorAttr::Redo ( )
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 149 of file undocell.cxx.

References ScSimpleUndo::BeginRedo(), DoChange(), ScSimpleUndo::EndRedo(), pNewEditData, and pNewPattern.

◆ Repeat()

void ScUndoCursorAttr::Repeat ( SfxRepeatTarget &  rTarget)
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 156 of file undocell.cxx.

References pApplyPattern, and rTarget.

◆ SetEditData()

void ScUndoCursorAttr::SetEditData ( std::unique_ptr< EditTextObject pOld,
std::unique_ptr< EditTextObject pNew 
)

once the objects are passed to this class, their life-cycle is managed by this class; the calling function must pass new'ed objects to this method.

Definition at line 106 of file undocell.cxx.

References pNewEditData, and pOldEditData.

◆ Undo()

void ScUndoCursorAttr::Undo ( )
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 142 of file undocell.cxx.

References ScSimpleUndo::BeginUndo(), DoChange(), ScSimpleUndo::EndUndo(), pOldEditData, and pOldPattern.

Member Data Documentation

◆ nCol

SCCOL ScUndoCursorAttr::nCol
private

Definition at line 58 of file undocell.hxx.

Referenced by DoChange().

◆ nRow

SCROW ScUndoCursorAttr::nRow
private

Definition at line 59 of file undocell.hxx.

Referenced by DoChange().

◆ nTab

SCTAB ScUndoCursorAttr::nTab
private

Definition at line 60 of file undocell.hxx.

Referenced by DoChange().

◆ pApplyPattern

ScPatternAttr* ScUndoCursorAttr::pApplyPattern
private

Definition at line 63 of file undocell.hxx.

Referenced by DoChange(), Repeat(), ScUndoCursorAttr(), and ~ScUndoCursorAttr().

◆ pNewEditData

std::unique_ptr<EditTextObject> ScUndoCursorAttr::pNewEditData
private

Definition at line 65 of file undocell.hxx.

Referenced by Redo(), and SetEditData().

◆ pNewPattern

ScPatternAttr* ScUndoCursorAttr::pNewPattern
private

Definition at line 62 of file undocell.hxx.

Referenced by Redo(), ScUndoCursorAttr(), and ~ScUndoCursorAttr().

◆ pOldEditData

std::unique_ptr<EditTextObject> ScUndoCursorAttr::pOldEditData
private

Definition at line 64 of file undocell.hxx.

Referenced by SetEditData(), and Undo().

◆ pOldPattern

ScPatternAttr* ScUndoCursorAttr::pOldPattern
private

Definition at line 61 of file undocell.hxx.

Referenced by ScUndoCursorAttr(), Undo(), and ~ScUndoCursorAttr().


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