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

Undo action for inserting, removing, and replacing a cell note. More...

#include <undocell.hxx>

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

Public Member Functions

 ScUndoReplaceNote (ScDocShell &rDocShell, const ScAddress &rPos, const ScNoteData &rNoteData, bool bInsert, std::unique_ptr< SdrUndoAction > pDrawUndo)
 Constructs an undo action for inserting or removing a cell note. More...
 
 ScUndoReplaceNote (ScDocShell &rDocShell, const ScAddress &rPos, ScNoteData aOldData, ScNoteData aNewData, std::unique_ptr< SdrUndoAction > pDrawUndo)
 Constructs an undo action for replacing a cell note with another. More...
 
virtual ~ScUndoReplaceNote () 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
 
virtual std::optional< ScRangegetAffectedRange () const override
 
- 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 DoInsertNote (const ScNoteData &rNoteData)
 
void DoRemoveNote (const ScNoteData &rNoteData)
 

Private Attributes

ScAddress maPos
 
ScNoteData maOldData
 
ScNoteData maNewData
 
std::unique_ptr< SdrUndoActionmpDrawUndo
 

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

Undo action for inserting, removing, and replacing a cell note.

Definition at line 243 of file undocell.hxx.

Constructor & Destructor Documentation

◆ ScUndoReplaceNote() [1/2]

ScUndoReplaceNote::ScUndoReplaceNote ( ScDocShell rDocShell,
const ScAddress rPos,
const ScNoteData rNoteData,
bool  bInsert,
std::unique_ptr< SdrUndoAction pDrawUndo 
)

Constructs an undo action for inserting or removing a cell note.

Definition at line 732 of file undocell.cxx.

References maNewData, maOldData, and ScNoteData::mxCaption.

◆ ScUndoReplaceNote() [2/2]

ScUndoReplaceNote::ScUndoReplaceNote ( ScDocShell rDocShell,
const ScAddress rPos,
ScNoteData  aOldData,
ScNoteData  aNewData,
std::unique_ptr< SdrUndoAction pDrawUndo 
)

Constructs an undo action for replacing a cell note with another.

Definition at line 749 of file undocell.cxx.

References maNewData, maOldData, ScNoteData::mxCaption, and ScNoteData::mxInitData.

◆ ~ScUndoReplaceNote()

ScUndoReplaceNote::~ScUndoReplaceNote ( )
overridevirtual

Definition at line 761 of file undocell.cxx.

References mpDrawUndo.

Member Function Documentation

◆ CanRepeat()

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

Reimplemented from SfxUndoAction.

Definition at line 796 of file undocell.cxx.

◆ DoInsertNote()

void ScUndoReplaceNote::DoInsertNote ( const ScNoteData rNoteData)
private

◆ DoRemoveNote()

void ScUndoReplaceNote::DoRemoveNote ( const ScNoteData rNoteData)
private

◆ getAffectedRange()

virtual std::optional< ScRange > ScUndoReplaceNote::getAffectedRange ( ) const
inlineoverridevirtual

Reimplemented from ScSimpleUndo.

Definition at line 272 of file undocell.hxx.

References maPos.

◆ GetComment()

OUString ScUndoReplaceNote::GetComment ( ) const
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 801 of file undocell.cxx.

References maNewData, maOldData, ScNoteData::mxCaption, and ScResId().

◆ Redo()

void ScUndoReplaceNote::Redo ( )
overridevirtual

◆ Repeat()

void ScUndoReplaceNote::Repeat ( SfxRepeatTarget &  rTarget)
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 792 of file undocell.cxx.

◆ Undo()

void ScUndoReplaceNote::Undo ( )
overridevirtual

Member Data Documentation

◆ maNewData

ScNoteData ScUndoReplaceNote::maNewData
private

Definition at line 281 of file undocell.hxx.

Referenced by GetComment(), Redo(), ScUndoReplaceNote(), and Undo().

◆ maOldData

ScNoteData ScUndoReplaceNote::maOldData
private

Definition at line 280 of file undocell.hxx.

Referenced by GetComment(), Redo(), ScUndoReplaceNote(), and Undo().

◆ maPos

ScAddress ScUndoReplaceNote::maPos
private

Definition at line 279 of file undocell.hxx.

Referenced by DoInsertNote(), DoRemoveNote(), getAffectedRange(), Redo(), and Undo().

◆ mpDrawUndo

std::unique_ptr<SdrUndoAction> ScUndoReplaceNote::mpDrawUndo
private

Definition at line 282 of file undocell.hxx.

Referenced by Redo(), Undo(), and ~ScUndoReplaceNote().


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