diff options
Diffstat (limited to 'sd/source/console')
-rw-r--r-- | sd/source/console/PresenterScreen.cxx | 28 | ||||
-rw-r--r-- | sd/source/console/PresenterScreen.hxx | 3 |
2 files changed, 28 insertions, 3 deletions
diff --git a/sd/source/console/PresenterScreen.cxx b/sd/source/console/PresenterScreen.cxx index cd6c20d38cc5..64e8c8e11e5f 100644 --- a/sd/source/console/PresenterScreen.cxx +++ b/sd/source/console/PresenterScreen.cxx @@ -240,9 +240,17 @@ void SAL_CALL PresenterScreenListener::disposing (const css::lang::EventObject&) PresenterScreen::PresenterScreen ( const Reference<XComponentContext>& rxContext, css::uno::Reference<css::frame::XModel2> xModel) - : PresenterScreenInterfaceBase(m_aMutex), - mxModel(std::move(xModel)), - mxContextWeak(rxContext) +: PresenterScreenInterfaceBase(m_aMutex) +, mxModel(std::move(xModel)) +, mxController() +, mxConfigurationControllerWeak() +, mxContextWeak(rxContext) +, mpPresenterController() +, mxSavedConfiguration() +, mpPaneContainer() +, mxPaneFactory() +, mxViewFactory() +, mbIsInitialized(false) { } @@ -303,6 +311,10 @@ void SAL_CALL PresenterScreen::disposing (const lang::EventObject& /*rEvent*/) void PresenterScreen::InitializePresenterScreen() { + // IASS: already initialized (may even assert here?) + if (mbIsInitialized) + return; + try { Reference<XComponentContext> xContext (mxContextWeak); @@ -388,6 +400,9 @@ void PresenterScreen::InitializePresenterScreen() catch (const Exception&) { } + + // IASS: Remember we are initialized + mbIsInitialized = true; } void PresenterScreen::SwitchMonitors() @@ -545,6 +560,10 @@ Reference<drawing::framework::XResourceId> PresenterScreen::GetMainPaneId ( void PresenterScreen::RequestShutdownPresenterScreen() { + // IASS: only cleanup when we are initialized + if (!mbIsInitialized) + return; + // Restore the configuration that was active before the presenter screen // has been activated. Now, that the presenter screen is displayed in // its own top level window this probably not necessary, but one never knows. @@ -567,6 +586,9 @@ void PresenterScreen::RequestShutdownPresenterScreen() [pSelf](bool){ return pSelf->ShutdownPresenterScreen(); }); xCC->update(); } + + // IASS: reset to non-initialized + mbIsInitialized = false; } void PresenterScreen::ShutdownPresenterScreen() diff --git a/sd/source/console/PresenterScreen.hxx b/sd/source/console/PresenterScreen.hxx index 0445311b9603..430384a45c6d 100644 --- a/sd/source/console/PresenterScreen.hxx +++ b/sd/source/console/PresenterScreen.hxx @@ -139,6 +139,9 @@ private: css::uno::Reference<css::drawing::framework::XResourceFactory> mxPaneFactory; css::uno::Reference<css::drawing::framework::XResourceFactory> mxViewFactory; + // IASS: Flag to note if InitializePresenterScreen() was executed + bool mbIsInitialized; + class ViewDescriptor { public: |