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, const ScNoteData &rOldData, const ScNoteData &rNewData, 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
 
- Public Member Functions inherited from ScSimpleUndo
 ScSimpleUndo (ScDocShell *pDocSh)
 
virtual bool Merge (SfxUndoAction *pNextAction) override
 
ViewShellId GetViewShellId () const override
 See SfxUndoAction::GetViewShellId(). More...
 
- Public Member Functions inherited from SfxUndoAction
 SfxUndoAction ()
 
virtual ~SfxUndoAction () COVERITY_NOEXCEPT_FALSE
 
virtual void UndoWithContext (SfxUndoContext &i_context)
 
virtual void RedoWithContext (SfxUndoContext &i_context)
 
virtual OUString GetRepeatComment (SfxRepeatTarget &) 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 237 of file undocell.hxx.

Constructor & Destructor Documentation

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 723 of file undocell.cxx.

References maNewData, maOldData, ScNoteData::mxCaption, and ScCaptionPtr::setNotOwner().

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

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

Definition at line 742 of file undocell.cxx.

References maNewData, maOldData, ScNoteData::mxCaption, ScNoteData::mxInitData, and ScCaptionPtr::setNotOwner().

ScUndoReplaceNote::~ScUndoReplaceNote ( )
overridevirtual

Definition at line 756 of file undocell.cxx.

References mpDrawUndo.

Member Function Documentation

bool ScUndoReplaceNote::CanRepeat ( SfxRepeatTarget rTarget) const
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 791 of file undocell.cxx.

void ScUndoReplaceNote::DoInsertNote ( const ScNoteData rNoteData)
private
void ScUndoReplaceNote::DoRemoveNote ( const ScNoteData rNoteData)
private
OUString ScUndoReplaceNote::GetComment ( ) const
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 796 of file undocell.cxx.

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

void ScUndoReplaceNote::Redo ( )
overridevirtual
void ScUndoReplaceNote::Repeat ( SfxRepeatTarget rTarget)
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 787 of file undocell.cxx.

void ScUndoReplaceNote::Undo ( )
overridevirtual

Member Data Documentation

ScNoteData ScUndoReplaceNote::maNewData
private

Definition at line 273 of file undocell.hxx.

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

ScNoteData ScUndoReplaceNote::maOldData
private

Definition at line 272 of file undocell.hxx.

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

ScAddress ScUndoReplaceNote::maPos
private

Definition at line 271 of file undocell.hxx.

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

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

Definition at line 274 of file undocell.hxx.

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


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