LibreOffice Module sd (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sd::UndoManager Class Referencefinal

#include <undomanager.hxx>

Inheritance diagram for sd::UndoManager:
[legend]
Collaboration diagram for sd::UndoManager:
[legend]

Public Member Functions

 UndoManager ()
 
virtual void EnterListAction (const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId) override
 
virtual void AddUndoAction (std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false) override
 
void SetLinkedUndoManager (SfxUndoManager *pLinkedUndoManager)
 Set or reset the undo manager linked with the called undo manager. More...
 
- Public Member Functions inherited from SdrUndoManager
 SdrUndoManager ()
 
virtual ~SdrUndoManager () override
 
virtual bool Undo () override
 
virtual bool Redo () override
 
virtual void Clear () override
 
void SetEndTextEditHdl (const Link< SdrUndoManager *, void > &rLink)
 
bool isEndTextEditTriggeredFromUndo () const
 
void SetDocShell (SfxObjectShell *pDocShell)
 
size_t GetRedoActionCountBeforeTextEdit () const
 

Private Member Functions

void ClearLinkedRedoActions ()
 Call ClearRedo() at the linked undo manager, when present. More...
 
virtual bool Undo () override
 
virtual bool Redo () override
 

Private Attributes

SfxUndoManagermpLinkedUndoManager
 Used when the outline view is visible as a last resort to synchronize the undo managers. More...
 

Additional Inherited Members

- Protected Member Functions inherited from SdrUndoManager
bool isTextEditActive () const
 
virtual void EmptyActionsChanged () override
 

Detailed Description

Definition at line 27 of file undomanager.hxx.

Constructor & Destructor Documentation

◆ UndoManager()

UndoManager::UndoManager ( )

Definition at line 24 of file undomanager.cxx.

Member Function Documentation

◆ AddUndoAction()

void UndoManager::AddUndoAction ( std::unique_ptr< SfxUndoAction pAction,
bool  bTryMerg = false 
)
overridevirtual

Definition at line 38 of file undomanager.cxx.

References ClearLinkedRedoActions().

Referenced by sd::DrawView::DeleteMarked().

◆ ClearLinkedRedoActions()

void UndoManager::ClearLinkedRedoActions ( )
private

Call ClearRedo() at the linked undo manager, when present.

It should not be necessary to call ClearRedo() explicitly, but the synchronization between the under managers of the document and the outline view seems to have a bug. Therefore this method is called whenever a new undo action is added.

Definition at line 52 of file undomanager.cxx.

References SfxUndoManager::ClearRedo(), and mpLinkedUndoManager.

Referenced by AddUndoAction(), and EnterListAction().

◆ EnterListAction()

void UndoManager::EnterListAction ( const OUString &  rComment,
const OUString &  rRepeatComment,
sal_uInt16  nId,
ViewShellId  nViewShellId 
)
overridevirtual

Definition at line 29 of file undomanager.cxx.

References ClearLinkedRedoActions(), and nId.

Referenced by sd::DrawView::DeleteMarked().

◆ Redo()

virtual bool SdrUndoManager::Redo ( )
privatevirtual

Reimplemented from SdrUndoManager.

◆ SetLinkedUndoManager()

void UndoManager::SetLinkedUndoManager ( SfxUndoManager pLinkedUndoManager)

Set or reset the undo manager linked with the called undo manager.

Definition at line 47 of file undomanager.cxx.

References mpLinkedUndoManager.

Referenced by sd::OutlineView::OutlineView(), and sd::OutlineView::PrepareClose().

◆ Undo()

virtual bool SdrUndoManager::Undo ( )
privatevirtual

Reimplemented from SdrUndoManager.

Member Data Documentation

◆ mpLinkedUndoManager

SfxUndoManager* sd::UndoManager::mpLinkedUndoManager
private

Used when the outline view is visible as a last resort to synchronize the undo managers.

Definition at line 47 of file undomanager.hxx.

Referenced by ClearLinkedRedoActions(), and SetLinkedUndoManager().


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