LibreOffice Module framework (master) 1
|
Public Member Functions | |
::osl::Mutex & | getMutex () |
UndoManagerHelper_Impl (IUndoManagerImplementation &i_undoManagerImpl) | |
virtual | ~UndoManagerHelper_Impl () |
SfxUndoManager & | getUndoManager () const |
Reference< XUndoManager > | getXUndoManager () const |
virtual void | actionUndone (const OUString &i_actionComment) override |
virtual void | actionRedone (const OUString &i_actionComment) override |
virtual void | undoActionAdded (const OUString &i_actionComment) override |
virtual void | cleared () override |
virtual void | clearedRedo () override |
virtual void | resetAll () override |
virtual void | listActionEntered (const OUString &i_comment) override |
virtual void | listActionLeft (const OUString &i_comment) override |
virtual void | listActionCancelled () override |
void | disposing () |
void | enterUndoContext (const OUString &i_title, const bool i_hidden, IMutexGuard &i_instanceLock) |
void | leaveUndoContext (IMutexGuard &i_instanceLock) |
void | addUndoAction (const Reference< XUndoAction > &i_action, IMutexGuard &i_instanceLock) |
void | undo (IMutexGuard &i_instanceLock) |
void | redo (IMutexGuard &i_instanceLock) |
void | clear (IMutexGuard &i_instanceLock) |
void | clearRedo (IMutexGuard &i_instanceLock) |
void | reset (IMutexGuard &i_instanceLock) |
void | lock () |
void | unlock () |
void | addUndoManagerListener (const Reference< XUndoManagerListener > &i_listener) |
void | removeUndoManagerListener (const Reference< XUndoManagerListener > &i_listener) |
void | addModifyListener (const Reference< XModifyListener > &i_listener) |
void | removeModifyListener (const Reference< XModifyListener > &i_listener) |
UndoManagerEvent | buildEvent (OUString const &i_title) const |
void | impl_notifyModified () |
void | notify (OUString const &i_title, void(SAL_CALL XUndoManagerListener::*i_notificationMethod)(const UndoManagerEvent &)) |
void | notify (void(SAL_CALL XUndoManagerListener::*i_notificationMethod)(const EventObject &)) |
virtual void | actionUndone (const OUString &i_actionComment)=0 |
virtual void | actionRedone (const OUString &i_actionComment)=0 |
virtual void | undoActionAdded (const OUString &i_actionComment)=0 |
virtual void | cleared ()=0 |
virtual void | clearedRedo ()=0 |
virtual void | resetAll ()=0 |
virtual void | listActionEntered (const OUString &i_comment)=0 |
virtual void | listActionLeft (const OUString &i_comment)=0 |
virtual void | listActionCancelled ()=0 |
Private Member Functions | |
void | impl_processRequest (::std::function< void()> const &i_request, IMutexGuard &i_instanceLock) |
adds a function to be called to the request processor's queue More... | |
void | impl_enterUndoContext (const OUString &i_title, const bool i_hidden) |
impl-versions of the XUndoManager API. More... | |
void | impl_leaveUndoContext () |
void | impl_addUndoAction (const Reference< XUndoAction > &i_action) |
void | impl_doUndoRedo (IMutexGuard &i_externalLock, const bool i_undo) |
void | impl_clear () |
void | impl_clearRedo () |
void | impl_reset () |
Private Attributes | |
::osl::Mutex | m_aMutex |
std::mutex | m_aListenerMutex |
Use different mutex for listeners to prevent ABBA deadlocks. More... | |
std::mutex | m_aQueueMutex |
bool | m_bAPIActionRunning |
bool | m_bProcessingEvents |
sal_Int32 | m_nLockCount |
::comphelper::OInterfaceContainerHelper4< XUndoManagerListener > | m_aUndoListeners |
::comphelper::OInterfaceContainerHelper4< XModifyListener > | m_aModifyListeners |
IUndoManagerImplementation & | m_rUndoManagerImplementation |
::std::stack< bool > | m_aContextVisibilities |
bool | m_bContextAPIFlagsEverPushed = {false} |
::std::stack< bool > | m_aContextAPIFlags |
::std::queue< ::rtl::Reference< UndoManagerRequest > > | m_aEventQueue |
Additional Inherited Members | |
Protected Member Functions inherited from SfxUndoListener | |
~SfxUndoListener () | |
Definition at line 200 of file undomanagerhelper.cxx.
|
inlineexplicit |
Definition at line 225 of file undomanagerhelper.cxx.
|
inlinevirtual |
Definition at line 234 of file undomanagerhelper.cxx.
|
overridevirtual |
Implements SfxUndoListener.
Definition at line 787 of file undomanagerhelper.cxx.
References aEvent, and comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach().
|
overridevirtual |
Implements SfxUndoListener.
Definition at line 774 of file undomanagerhelper.cxx.
References aEvent, and comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach().
|
inline |
Definition at line 286 of file undomanagerhelper.cxx.
References comphelper::OInterfaceContainerHelper4< class ListenerT >::addInterface().
void framework::UndoManagerHelper_Impl::addUndoAction | ( | const Reference< XUndoAction > & | i_action, |
IMutexGuard & | i_instanceLock | ||
) |
Definition at line 397 of file undomanagerhelper.cxx.
|
inline |
Definition at line 274 of file undomanagerhelper.cxx.
References comphelper::OInterfaceContainerHelper4< class ListenerT >::addInterface().
UndoManagerEvent framework::UndoManagerHelper_Impl::buildEvent | ( | OUString const & | i_title | ) | const |
Definition at line 335 of file undomanagerhelper.cxx.
References aEvent.
void framework::UndoManagerHelper_Impl::clear | ( | IMutexGuard & | i_instanceLock | ) |
Definition at line 412 of file undomanagerhelper.cxx.
|
overridevirtual |
Implements SfxUndoListener.
Definition at line 808 of file undomanagerhelper.cxx.
|
overridevirtual |
Implements SfxUndoListener.
Definition at line 816 of file undomanagerhelper.cxx.
void framework::UndoManagerHelper_Impl::clearRedo | ( | IMutexGuard & | i_instanceLock | ) |
Definition at line 420 of file undomanagerhelper.cxx.
void framework::UndoManagerHelper_Impl::disposing | ( | ) |
Definition at line 321 of file undomanagerhelper.cxx.
References aEvent, comphelper::OInterfaceContainerHelper4< class ListenerT >::disposeAndClear(), and m_aMutex.
void framework::UndoManagerHelper_Impl::enterUndoContext | ( | const OUString & | i_title, |
const bool | i_hidden, | ||
IMutexGuard & | i_instanceLock | ||
) |
Definition at line 381 of file undomanagerhelper.cxx.
|
inline |
Definition at line 222 of file undomanagerhelper.cxx.
References m_aMutex.
|
inline |
Definition at line 238 of file undomanagerhelper.cxx.
References framework::IUndoManagerImplementation::getImplUndoManager().
|
inline |
Definition at line 243 of file undomanagerhelper.cxx.
References framework::IUndoManagerImplementation::getThis().
|
private |
Definition at line 669 of file undomanagerhelper.cxx.
References SfxUndoManager::AddUndoAction(), SfxUndoManager::GetRedoActionCount(), SfxUndoManager::IsUndoEnabled(), m_aMutex, and comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach().
|
private |
Definition at line 701 of file undomanagerhelper.cxx.
References aEvent, SfxUndoManager::Clear(), SfxUndoManager::IsInListAction(), m_aMutex, and comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach().
|
private |
Definition at line 727 of file undomanagerhelper.cxx.
References aEvent, SfxUndoManager::ClearRedo(), SfxUndoManager::IsInListAction(), m_aMutex, and comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach().
|
private |
Definition at line 622 of file undomanagerhelper.cxx.
References Any, Exception, framework::IMutexGuard::getGuardedMutex(), SfxUndoManager::GetRedoActionCount(), SfxUndoManager::GetUndoActionCount(), SfxUndoManager::IsInListAction(), m_aMutex, nElements, SfxUndoManager::Redo(), SfxUndoManager::TopLevel, and SfxUndoManager::Undo().
|
private |
impl-versions of the XUndoManager API.
Definition at line 526 of file undomanagerhelper.cxx.
References aEvent, SfxUndoManager::EnterListAction(), framework::IUndoManagerImplementation::getThis(), SfxUndoManager::GetUndoActionCount(), SfxUndoManager::IsUndoEnabled(), m_aMutex, and comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach().
|
private |
Definition at line 560 of file undomanagerhelper.cxx.
References SfxUndoManager::GetRedoActionCount(), SfxUndoManager::GetUndoActionComment(), SfxUndoManager::IsInListAction(), SfxUndoManager::IsUndoEnabled(), SfxUndoManager::LeaveAndMergeListAction(), SfxUndoManager::LeaveListAction(), m_aMutex, comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach(), and SfxUndoManager::TopLevel.
void framework::UndoManagerHelper_Impl::impl_notifyModified | ( | ) |
Definition at line 344 of file undomanagerhelper.cxx.
References aEvent, and comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach().
|
private |
adds a function to be called to the request processor's queue
Definition at line 465 of file undomanagerhelper.cxx.
References framework::IMutexGuard::clear().
|
private |
Definition at line 752 of file undomanagerhelper.cxx.
References aEvent, m_aMutex, comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach(), and SfxUndoManager::Reset().
void framework::UndoManagerHelper_Impl::leaveUndoContext | ( | IMutexGuard & | i_instanceLock | ) |
Definition at line 389 of file undomanagerhelper.cxx.
|
overridevirtual |
Implements SfxUndoListener.
Definition at line 868 of file undomanagerhelper.cxx.
|
overridevirtual |
Implements SfxUndoListener.
Definition at line 832 of file undomanagerhelper.cxx.
|
overridevirtual |
Implements SfxUndoListener.
Definition at line 845 of file undomanagerhelper.cxx.
void framework::UndoManagerHelper_Impl::lock | ( | ) |
Definition at line 436 of file undomanagerhelper.cxx.
References SfxUndoManager::EnableUndo(), and getMutex().
void framework::UndoManagerHelper_Impl::notify | ( | OUString const & | i_title, |
void(SAL_CALL XUndoManagerListener::*)(const UndoManagerEvent &) | i_notificationMethod | ||
) |
Definition at line 351 of file undomanagerhelper.cxx.
References aEvent, and comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach().
void framework::UndoManagerHelper_Impl::notify | ( | void(SAL_CALL XUndoManagerListener::*)(const EventObject &) | i_notificationMethod | ) |
Definition at line 369 of file undomanagerhelper.cxx.
References aEvent, and comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach().
void framework::UndoManagerHelper_Impl::redo | ( | IMutexGuard & | i_instanceLock | ) |
Definition at line 921 of file undomanagerhelper.cxx.
References impl_doUndoRedo(), and impl_processRequest().
|
inline |
Definition at line 292 of file undomanagerhelper.cxx.
References comphelper::OInterfaceContainerHelper4< class ListenerT >::removeInterface().
|
inline |
Definition at line 280 of file undomanagerhelper.cxx.
References comphelper::OInterfaceContainerHelper4< class ListenerT >::removeInterface().
void framework::UndoManagerHelper_Impl::reset | ( | IMutexGuard & | i_instanceLock | ) |
Definition at line 428 of file undomanagerhelper.cxx.
|
overridevirtual |
Implements SfxUndoListener.
Definition at line 824 of file undomanagerhelper.cxx.
void framework::UndoManagerHelper_Impl::undo | ( | IMutexGuard & | i_instanceLock | ) |
Definition at line 913 of file undomanagerhelper.cxx.
References impl_doUndoRedo(), and impl_processRequest().
|
overridevirtual |
Implements SfxUndoListener.
Definition at line 800 of file undomanagerhelper.cxx.
void framework::UndoManagerHelper_Impl::unlock | ( | ) |
Definition at line 449 of file undomanagerhelper.cxx.
References SfxUndoManager::EnableUndo(), and getMutex().
|
private |
Definition at line 216 of file undomanagerhelper.cxx.
|
private |
Definition at line 213 of file undomanagerhelper.cxx.
|
private |
Definition at line 219 of file undomanagerhelper.cxx.
|
private |
Use different mutex for listeners to prevent ABBA deadlocks.
Definition at line 205 of file undomanagerhelper.cxx.
|
private |
Definition at line 211 of file undomanagerhelper.cxx.
|
private |
Definition at line 203 of file undomanagerhelper.cxx.
|
private |
Definition at line 206 of file undomanagerhelper.cxx.
|
private |
Definition at line 210 of file undomanagerhelper.cxx.
|
private |
Definition at line 207 of file undomanagerhelper.cxx.
|
private |
Definition at line 215 of file undomanagerhelper.cxx.
|
private |
Definition at line 208 of file undomanagerhelper.cxx.
|
private |
Definition at line 209 of file undomanagerhelper.cxx.
|
private |
Definition at line 212 of file undomanagerhelper.cxx.