20#ifndef INCLUDED_FRAMEWORK_UNDOMANAGERHELPER_HXX
21#define INCLUDED_FRAMEWORK_UNDOMANAGERHELPER_HXX
24#include <com/sun/star/uno/Sequence.hxx>
25#include <com/sun/star/uno/Reference.hxx>
79 virtual css::uno::Reference< css::document::XUndoManager >
89 class UndoManagerHelper_Impl;
123 void enterUndoContext(
const OUString& i_title,
IMutexGuard& i_instanceLock );
124 void enterHiddenUndoContext(
IMutexGuard& i_instanceLock );
125 void leaveUndoContext(
IMutexGuard& i_instanceLock );
126 void addUndoAction(
const css::uno::Reference< css::document::XUndoAction >& i_action,
IMutexGuard& i_instanceLock );
129 bool isUndoPossible()
const;
130 bool isRedoPossible()
const;
131 OUString getCurrentUndoActionTitle()
const;
132 OUString getCurrentRedoActionTitle()
const;
133 css::uno::Sequence< OUString >
134 getAllUndoActionTitles()
const;
135 css::uno::Sequence< OUString >
136 getAllRedoActionTitles()
const;
140 void addUndoManagerListener(
const css::uno::Reference< css::document::XUndoManagerListener >& i_listener );
141 void removeUndoManagerListener(
const css::uno::Reference< css::document::XUndoManagerListener >& i_listener );
149 void addModifyListener(
const css::uno::Reference< css::util::XModifyListener >& i_listener );
150 void removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& i_listener );
153 std::unique_ptr< UndoManagerHelper_Impl >
m_xImpl;
virtual void clear()=0
clears the lock.
virtual IMutex & getGuardedMutex()=0
returns the mutex guarded by the instance.
Interface to support different mutex implementations in a generic way.
virtual css::uno::Reference< css::document::XUndoManager > getThis()=0
provides access to a UNO interface for the XUndoManager implementation.
~IUndoManagerImplementation()
virtual SfxUndoManager & getImplUndoManager()=0
returns the SfxUndoManager interface to the actual Undo stack
helper class for implementing an XUndoManager
std::unique_ptr< UndoManagerHelper_Impl > m_xImpl
std::shared_ptr< osl::Mutex > const & lock()