LibreOffice Module sd (master) 1
|
This module locks updates of the current configuration in situations when the shell stack must not be modified. More...
#include <ShellStackGuard.hxx>
Public Member Functions | |
ShellStackGuard (rtl::Reference< sd::DrawController > const &rxController) | |
virtual | ~ShellStackGuard () override |
virtual void | disposing (std::unique_lock< std::mutex > &) override |
virtual void SAL_CALL | notifyConfigurationChange (const css::drawing::framework::ConfigurationChangeEvent &rEvent) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &rEvent) override |
![]() | |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual void SAL_CALL | dispose () noexcept final override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
![]() | |
virtual | ~WeakComponentImplHelperBase () override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual void | disposing (std::unique_lock< std::mutex > &) |
![]() | |
virtual | ~UnoImplBase () |
Private Member Functions | |
DECL_LINK (TimeoutHandler, Timer *, void) | |
bool | IsPrinting () const |
Return <TRUE> when the printer is printing. More... | |
Private Attributes | |
css::uno::Reference< css::drawing::framework::XConfigurationController > | mxConfigurationController |
ViewShellBase * | mpBase |
std::unique_ptr< ConfigurationController::Lock > | mpUpdateLock |
Idle | maPrinterPollingIdle |
Additional Inherited Members | |
![]() | |
void | throwIfDisposed (std::unique_lock< std::mutex > &) |
![]() | |
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > | maEventListeners |
![]() | |
std::mutex | m_aMutex |
bool | m_bDisposed |
This module locks updates of the current configuration in situations when the shell stack must not be modified.
On every start of a configuration update the ShellStackGuard checks the printer. If it is printing the configuration update is locked. It then polls the printer and unlocks updates when printing finishes.
When in the future there are no resources left that use shells then this module can be removed.
Definition at line 61 of file ShellStackGuard.hxx.
|
explicit |
Definition at line 41 of file ShellStackGuard.cxx.
References Any, LINK, maPrinterPollingIdle, mpBase, sd::framework::FrameworkHelper::msConfigurationUpdateStartEvent, mxConfigurationController, and Timer::SetInvokeHandler().
|
overridevirtual |
Definition at line 67 of file ShellStackGuard.cxx.
|
private |
|
overridevirtual |
|
overridevirtual |
Reimplemented from comphelper::WeakComponentImplHelperBase.
Definition at line 71 of file ShellStackGuard.cxx.
References mpBase, and mxConfigurationController.
|
private |
Return <TRUE> when the printer is printing.
Return <FALSE> when the printer is not printing, or there is no printer, or something else went wrong.
Definition at line 130 of file ShellStackGuard.cxx.
References sd::ViewShellBase::GetPrinter(), and mpBase.
Referenced by notifyConfigurationChange().
|
overridevirtual |
Definition at line 81 of file ShellStackGuard.cxx.
References IsPrinting(), maPrinterPollingIdle, mpUpdateLock, sd::framework::FrameworkHelper::msConfigurationUpdateStartEvent, mxConfigurationController, and Idle::Start().
|
private |
Definition at line 83 of file ShellStackGuard.hxx.
Referenced by notifyConfigurationChange(), and ShellStackGuard().
|
private |
Definition at line 81 of file ShellStackGuard.hxx.
Referenced by disposing(), IsPrinting(), and ShellStackGuard().
|
private |
Definition at line 82 of file ShellStackGuard.hxx.
Referenced by notifyConfigurationChange().
|
private |
Definition at line 80 of file ShellStackGuard.hxx.
Referenced by disposing(), notifyConfigurationChange(), and ShellStackGuard().