22#include <com/sun/star/document/XActionLockable.hpp>
82 bool setResource(
const css::uno::Reference< css::document::XActionLockable >& xLock)
110 std::unique_lock aMutexLock(
m_mutex);
112 css::uno::Reference< css::document::XActionLockable > xLock =
m_xActionLock;
121 if (bLocked && xLock.is())
122 xLock->removeActionLock();
implements a guard, which can use the interface <type scope="css::document">XActionLockable</type>.
css::uno::Reference< css::document::XActionLockable > m_xActionLock
points to the object, which can be locked from outside.
bool m_bActionLocked
knows if a lock exists on the internal lock object forced by this guard instance.
~ActionLockGuard()
release this guard instance and make sure, that no lock will exist afterwards on the internal wrapped...
void unlock()
unlock the internal wrapped resource, if it's not already done.
void freeResource()
set a new resource for locking at this guard.
ActionLockGuard()
default ctor to initialize a "non working guard".
bool setResource(const css::uno::Reference< css::document::XActionLockable > &xLock)
set a new resource for locking at this guard.