diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx index 582d10086b78..d69437305b80 100644 --- a/chart2/source/inc/LifeTime.hxx +++ b/chart2/source/inc/LifeTime.hxx @@ -92,7 +92,7 @@ public: bool g_close_startTryClose(bool bDeliverOwnership); /// @throws css::util::CloseVetoException void g_close_isNeedToCancelLongLastingCalls( bool bDeliverOwnership, css::util::CloseVetoException const & ex ); - void g_close_endTryClose(bool bDeliverOwnership ); + void g_close_endTryClose(); void g_close_endTryClose_doClose(); /// @throws css::uno::RuntimeException void g_addCloseListener( const css::uno::Reference< css::util::XCloseListener > & xListener ); @@ -101,7 +101,6 @@ private: virtual bool impl_canStartApiCall() override; virtual void impl_apiCallCountReachedNull(std::unique_lock& rGuard) override; - void impl_setOwnership( bool bDeliverOwnership, bool bMyVeto ); void impl_doClose(std::unique_lock& rGuard); }; diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index 45550b93efdd..1264e908130a 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -231,18 +231,18 @@ bool CloseableLifeTimeManager::g_close_startTryClose(bool bDeliverOwnership) catch( const uno::Exception& ) { //no mutex is acquired - g_close_endTryClose(bDeliverOwnership); + g_close_endTryClose(); throw; } return true; } -void CloseableLifeTimeManager::g_close_endTryClose(bool bDeliverOwnership ) +void CloseableLifeTimeManager::g_close_endTryClose() { //this method is called, if the try to close was not successful std::unique_lock aGuard( m_aAccessMutex ); - impl_setOwnership( bDeliverOwnership, false ); + m_bOwnership = false; m_bInTryClose = false; m_aEndTryClosingCondition.set(); @@ -263,8 +263,7 @@ void CloseableLifeTimeManager::g_close_isNeedToCancelLongLastingCalls( bool bDel if( !m_nLongLastingCallCount ) return; - impl_setOwnership( bDeliverOwnership, true ); - + m_bOwnership = bDeliverOwnership; m_bInTryClose = false; m_aEndTryClosingCondition.set(); @@ -289,11 +288,6 @@ void CloseableLifeTimeManager::g_close_endTryClose_doClose() impl_doClose(aGuard); } -void CloseableLifeTimeManager::impl_setOwnership( bool bDeliverOwnership, bool bMyVeto ) -{ - m_bOwnership = bDeliverOwnership && bMyVeto; -} - void CloseableLifeTimeManager::impl_apiCallCountReachedNull(std::unique_lock& rGuard) { //Mutex needs to be acquired exactly once