diff options
Diffstat (limited to 'chart2/source/controller/main/ChartController.cxx')
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index b8720c0f5158..ac3ef57a1bd9 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -475,6 +475,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent if( rEvent.NewMode.equals(C2U("dirty")) ) { //the view has become dirty, we should repaint it if we have a window + ::vos::OGuard aGuard( Application::GetSolarMutex() ); if( m_pChartWindow ) m_pChartWindow->ForceInvalidate(); } @@ -518,8 +519,11 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent impl_initializeAccessible(); - if( m_pChartWindow ) - m_pChartWindow->Invalidate(); + { + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + if( m_pChartWindow ) + m_pChartWindow->Invalidate(); + } } m_bConnectingToView = false; @@ -537,10 +541,10 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent //is called to attach the controller to a new model. //return true if attach was successfully, false otherwise (e.g. if you do not work with a model) - ::vos::OClearableGuard aGuard( Application::GetSolarMutex()); + ::vos::OClearableGuard aClearableGuard( Application::GetSolarMutex()); if( impl_isDisposedOrSuspended() ) //@todo? allow attaching a new model while suspended? return sal_False; //behave passive if already disposed or suspended - aGuard.clear(); + aClearableGuard.clear(); TheModelRef aNewModelRef( new TheModel( xModel), m_aModelMutex); @@ -612,8 +616,11 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent } //the frameloader is responsible to call xModel->connectController - if( m_pChartWindow ) - m_pChartWindow->Invalidate(); + { + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + if( m_pChartWindow ) + m_pChartWindow->Invalidate(); + } uno::Reference< document::XUndoManagerSupplier > xSuppUndo( getModel(), uno::UNO_QUERY_THROW ); m_xUndoManager.set( xSuppUndo->getUndoManager(), uno::UNO_QUERY_THROW ); @@ -1105,6 +1112,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand ) else if(aCommand.equals("Update")) //Update Chart { ChartViewHelper::setViewToDirtyState( getModel() ); + ::vos::OGuard aGuard( Application::GetSolarMutex() ); if( m_pChartWindow ) m_pChartWindow->Invalidate(); } @@ -1498,6 +1506,7 @@ uno::Reference< XAccessible > ChartController::CreateAccessible() void ChartController::impl_invalidateAccessible() { + ::vos::OGuard aGuard( Application::GetSolarMutex() ); if( m_pChartWindow ) { Reference< lang::XInitialization > xInit( m_pChartWindow->GetAccessible(false), uno::UNO_QUERY ); @@ -1510,6 +1519,7 @@ void ChartController::impl_invalidateAccessible() } void ChartController::impl_initializeAccessible() { + ::vos::OGuard aGuard( Application::GetSolarMutex() ); if( m_pChartWindow ) this->impl_initializeAccessible( Reference< lang::XInitialization >( m_pChartWindow->GetAccessible(false), uno::UNO_QUERY ) ); } @@ -1524,11 +1534,14 @@ void ChartController::impl_initializeAccessible( const uno::Reference< lang::XIn aArguments[1]=uno::makeAny(xModel); aArguments[2]=uno::makeAny(m_xChartView); uno::Reference< XAccessible > xParent; - if( m_pChartWindow ) { - Window* pParentWin( m_pChartWindow->GetAccessibleParentWindow()); - if( pParentWin ) - xParent.set( pParentWin->GetAccessible()); + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + if( m_pChartWindow ) + { + Window* pParentWin( m_pChartWindow->GetAccessibleParentWindow()); + if( pParentWin ) + xParent.set( pParentWin->GetAccessible()); + } } aArguments[3]=uno::makeAny(xParent); aArguments[4]=uno::makeAny(m_xViewWindow); |