From cd43b8cf32f749a5c65ec13998ae491311f58d1a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 11 Apr 2016 12:06:57 +0200 Subject: Turn disableLayoutManager into a member function Change-Id: I489859a53f98a1e70f8a79c3a974dd0d8954ccd1 --- framework/source/services/frame.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'framework') diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index d4642da991fc..69aaf5be98d4 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -387,6 +387,8 @@ private: void impl_setCloser ( const css::uno::Reference< css::frame::XFrame2 >& xFrame , bool bState ); void impl_disposeContainerWindow ( css::uno::Reference< css::awt::XWindow >& xWindow ); + void disableLayoutManager(const css::uno::Reference< css::frame::XLayoutManager2 >& xLayoutManager); + void checkDisposed() { osl::MutexGuard g(rBHelper.rMutex); if (rBHelper.bInDispose || rBHelper.bDisposed) { @@ -726,10 +728,9 @@ void lcl_enableLayoutManager(const css::uno::Reference< css::frame::XLayoutManag /*-**************************************************************************************************** deinitialize layout manager **/ -void lcl_disableLayoutManager(const css::uno::Reference< css::frame::XLayoutManager2 >& xLayoutManager, - const css::uno::Reference< css::frame::XFrame >& xFrame ) +void Frame::disableLayoutManager(const css::uno::Reference< css::frame::XLayoutManager2 >& xLayoutManager) { - xFrame->removeFrameActionListener(xLayoutManager); + removeFrameActionListener(xLayoutManager); xLayoutManager->setDockingAreaAcceptor(css::uno::Reference< css::ui::XDockingAreaAcceptor >()); xLayoutManager->attachFrame(css::uno::Reference< css::frame::XFrame >()); } @@ -2088,7 +2089,7 @@ void SAL_CALL Frame::disposing() implts_stopWindowListening(); if (m_xLayoutManager.is()) - lcl_disableLayoutManager(m_xLayoutManager, this); + disableLayoutManager(m_xLayoutManager); delete m_pWindowCommandDispatch; @@ -2694,7 +2695,7 @@ void SAL_CALL Frame::impl_setPropertyValue(const OUString& /*sProperty*/, { m_xLayoutManager = xNewLayoutManager; if (xOldLayoutManager.is()) - lcl_disableLayoutManager(xOldLayoutManager, this); + disableLayoutManager(xOldLayoutManager); if (xNewLayoutManager.is()) lcl_enableLayoutManager(xNewLayoutManager, this); } -- cgit