LibreOffice Module framework (master) 1
Public Member Functions | Private Attributes | List of all members
framework::DocumentUndoGuard Class Reference

a helper class guarding the Undo manager of a document More...

#include <documentundoguard.hxx>

Collaboration diagram for framework::DocumentUndoGuard:
[legend]

Public Member Functions

 DocumentUndoGuard (const css::uno::Reference< css::uno::XInterface > &i_undoSupplierComponent)
 
 ~DocumentUndoGuard ()
 

Private Attributes

css::uno::Reference< css::document::XUndoManager > mxUndoManager
 
::rtl::Reference< UndoManagerContextListenermxContextListener
 

Detailed Description

a helper class guarding the Undo manager of a document

This class guards, within a given scope, the Undo Manager of a document (or another component supporting the XUndoManagerSupplier interface). When entering the scope (i.e. when the DocumentUndoGuard instances is constructed), the current state of the undo contexts of the undo manager is examined. Upon leaving the scope (i.e. when the DocumentUndoGuard is destructed), the guard will execute as many calls to <member scope="css::document">XUndoManager::leaveUndoContext</member> as are necessary to restore the manager's initial state.

Definition at line 45 of file documentundoguard.hxx.

Constructor & Destructor Documentation

◆ DocumentUndoGuard()

framework::DocumentUndoGuard::DocumentUndoGuard ( const css::uno::Reference< css::uno::XInterface > &  i_undoSupplierComponent)

◆ ~DocumentUndoGuard()

framework::DocumentUndoGuard::~DocumentUndoGuard ( )

Definition at line 179 of file documentundoguard.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and mxContextListener.

Member Data Documentation

◆ mxContextListener

::rtl::Reference< UndoManagerContextListener > framework::DocumentUndoGuard::mxContextListener
private

Definition at line 53 of file documentundoguard.hxx.

Referenced by DocumentUndoGuard(), and ~DocumentUndoGuard().

◆ mxUndoManager

css::uno::Reference< css::document::XUndoManager > framework::DocumentUndoGuard::mxUndoManager
private

Definition at line 52 of file documentundoguard.hxx.

Referenced by DocumentUndoGuard().


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