From defa3490b432f331b0f27a9ab14795f476cd3990 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Wed, 13 Oct 2010 01:41:46 -0500 Subject: [PATCH] use SolarMutexGuard to guard the SolarMutex --- .../accessibility/AccStatisticsObject.cxx | 2 +- .../accessibility/AccessibleBase.cxx | 2 +- .../accessibility/AccessibleChartElement.cxx | 4 +-- .../accessibility/AccessibleChartView.cxx | 2 +- .../accessibility/AccessibleTextHelper.cxx | 6 ++-- .../dialogs/dlg_CreationWizard_UNO.cxx | 16 +++++----- .../controller/main/ChartController.cxx | 32 +++++++++---------- .../main/ChartController_EditData.cxx | 2 +- .../main/ChartController_Insert.cxx | 18 +++++------ .../main/ChartController_Position.cxx | 2 +- .../main/ChartController_Properties.cxx | 4 +-- .../main/ChartController_TextEdit.cxx | 2 +- .../controller/main/ChartController_Tools.cxx | 6 ++-- .../main/ChartController_Window.cxx | 18 +++++------ .../source/controller/main/ChartRenderer.cxx | 4 +-- .../controller/main/DrawCommandDispatch.cxx | 4 +-- .../controller/main/ElementSelector.cxx | 2 +- .../controller/main/SelectionHelper.cxx | 22 ++++++------- .../controller/main/ShapeController.cxx | 20 ++++++------ .../main/ShapeToolbarController.cxx | 10 +++--- .../controller/main/UndoCommandDispatch.cxx | 2 +- chart2/source/view/main/ChartView.cxx | 18 +++++------ sc/source/ui/unoobj/scdetect.cxx | 2 +- sc/source/ui/unoobj/unodoc.cxx | 2 +- 24 files changed, 101 insertions(+), 101 deletions(-) diff --git a/chart2/source/controller/accessibility/AccStatisticsObject.cxx b/chart2/source/controller/accessibility/AccStatisticsObject.cxx index a248266874fc..62fbc83e39d7 100644 --- a/chart2/source/controller/accessibility/AccStatisticsObject.cxx +++ b/chart2/source/controller/accessibility/AccStatisticsObject.cxx @@ -47,7 +47,7 @@ AccStatisticsObject::AccStatisticsObject( const AccessibleElementInfo& rAccInfo // OSL_ASSERT( pModel ); // /-- solar - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; /* switch( eType ) { case MEAN_VAL_LINE: diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index fa09ec3ca0d0..2e70b49375ac 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -769,7 +769,7 @@ awt::Rectangle SAL_CALL AccessibleBase::getBounds() aLogicRect.X + aLogicRect.Width, aLogicRect.Y + aLogicRect.Height ); // /-- solar - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; aRect = pWindow->LogicToPixel( aRect ); // aLogicRect ist relative to the page, but we need a value relative diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx b/chart2/source/controller/accessibility/AccessibleChartElement.cxx index 99e6fd60e83d..9cd456ea6a05 100644 --- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx @@ -133,7 +133,7 @@ void AccessibleChartElement::InitTextEdit() // OSL_ASSERT( m_pTextHelper == 0 ); // // /-- solar -// ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aSolarGuard; // Window* pWindow( VCLUnoHelper::GetWindow( GetInfo().m_xWindow )); // if( pWindow ) // { @@ -172,7 +172,7 @@ Reference< XAccessible > AccessibleChartElement::ImplGetAccessibleChildById( sal { xResult.set( m_xTextHelper->getAccessibleChild( i )); // /-- solar -// ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aSolarGuard; // if( m_pTextHelper ) // xResult.set( m_pTextHelper->GetChild( i ) ); // \-- solar diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx index 9fae22226cb5..40f3c0457048 100644 --- a/chart2/source/controller/accessibility/AccessibleChartView.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx @@ -102,7 +102,7 @@ awt::Rectangle AccessibleChartView::GetWindowPosSize() const if( pWindow ) { // /-- solar - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Point aVCLPoint( pWindow->OutputToAbsoluteScreenPixel( Point( 0, 0 ) )); aBBox.X = aVCLPoint.getX(); aBBox.Y = aVCLPoint.getY(); diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx index 2f3d732a06ae..a16f9cb9dab0 100644 --- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx +++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx @@ -87,7 +87,7 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg return; // /-- solar - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( m_pTextHelper ) delete m_pTextHelper; @@ -121,7 +121,7 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg if( m_pTextHelper ) { // /-- solar - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return m_pTextHelper->GetChildCount(); // \-- solar } @@ -135,7 +135,7 @@ Reference< XAccessible > SAL_CALL AccessibleTextHelper::getAccessibleChild( ::sa if( m_pTextHelper ) { // /-- solar - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return m_pTextHelper->GetChild( i ); // \-- solar } diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index db35da266064..2dbb7da2d590 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -74,7 +74,7 @@ CreationWizardUnoDlg::CreationWizardUnoDlg( const uno::Reference< uno::XComponen } CreationWizardUnoDlg::~CreationWizardUnoDlg() { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_pDialog ) { delete m_pDialog; @@ -180,7 +180,7 @@ uno::Sequence< sal_Int8 > SAL_CALL CreationWizardUnoDlg::getImplementationId( vo // XTerminateListener void SAL_CALL CreationWizardUnoDlg::queryTermination( const lang::EventObject& /*Event*/ ) throw( frame::TerminationVetoException, uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // we will never give a veto here if( m_pDialog && !m_pDialog->isClosable() ) @@ -210,7 +210,7 @@ void SAL_CALL CreationWizardUnoDlg::setTitle( const ::rtl::OUString& /*rTitle*/ //------------------------------------------------------------------------- void CreationWizardUnoDlg::createDialogOnDemand() { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( !m_pDialog ) { Window* pParent = NULL; @@ -253,7 +253,7 @@ sal_Int16 SAL_CALL CreationWizardUnoDlg::execute( ) throw(uno::RuntimeException { sal_Int16 nRet = RET_CANCEL; { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; createDialogOnDemand(); if( !m_pDialog ) return nRet; @@ -295,7 +295,7 @@ void SAL_CALL CreationWizardUnoDlg::disposing() m_xParentWindow.clear(); // /-- - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_pDialog ) { delete m_pDialog; @@ -341,7 +341,7 @@ void SAL_CALL CreationWizardUnoDlg::setPropertyValue( const ::rtl::OUString& rPr //set left upper outer corner relative to screen //pixels, screen position - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; createDialogOnDemand(); if( m_pDialog ) { @@ -373,7 +373,7 @@ uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const ::rtl::OUString& { //get left upper outer corner relative to screen //pixels, screen position - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; createDialogOnDemand(); if( m_pDialog ) { @@ -386,7 +386,7 @@ uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const ::rtl::OUString& { //get outer size inclusive decoration //pixels, screen position - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; createDialogOnDemand(); if( m_pDialog ) { diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 1b6f98bf64cb..ac8a8be96916 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -359,7 +359,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartController,CHART_CONTROLLER_SERVICE_IMPLEMENTAT ::attachFrame( const uno::Reference& xFrame ) throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( impl_isDisposedOrSuspended() ) //@todo? allow attaching the frame while suspended? return; //behave passive if already disposed or suspended @@ -408,7 +408,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartController,CHART_CONTROLLER_SERVICE_IMPLEMENTAT awt::Size aPageSize( ChartModelHelper::getPageSize(getModel()) ); // calls to VCL - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; m_pChartWindow = new ChartWindow(this,pParent,pParent?pParent->GetStyle():0); m_pChartWindow->SetBackground();//no Background m_xViewWindow = uno::Reference< awt::XWindow >( m_pChartWindow->GetComponentInterface(), uno::UNO_QUERY ); @@ -477,7 +477,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent { //the view is about to become invalid so end all actions on it impl_invalidateAccessible(); - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit() ) this->EndTextEdit(); if( m_pDrawViewWrapper ) @@ -500,7 +500,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent if(m_pDrawModelWrapper) { { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( m_pDrawViewWrapper ) m_pDrawViewWrapper->ReInit(); } @@ -647,7 +647,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent //set of data that can be used to restore the current view status at later time // by using XController::restoreViewData() - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( impl_isDisposedOrSuspended() ) return uno::Any(); //behave passive if already disposed or suspended //@todo? or throw an exception?? @@ -664,7 +664,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent { //restores the view status using the data gotten from a previous call to XController::getViewData() - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( impl_isDisposedOrSuspended() ) return; //behave passive if already disposed or suspended //@todo? or throw an exception?? @@ -682,7 +682,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent //we may show dialogs here to ask the user for saving changes ... @todo? - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( m_aLifeTimeManager.impl_isDisposed() ) return sal_False; //behave passive if already disposed, return false because request was not accepted //@todo? correct @@ -716,7 +716,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent void ChartController::impl_createDrawViewController() { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if(!m_pDrawViewWrapper) { if( m_pDrawModelWrapper ) @@ -730,7 +730,7 @@ void ChartController::impl_deleteDrawViewController() { if( m_pDrawViewWrapper ) { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( m_pDrawViewWrapper->IsTextEdit() ) this->EndTextEdit(); DELETEZ( m_pDrawViewWrapper ); @@ -782,7 +782,7 @@ void ChartController::impl_deleteDrawViewController() xViewBroadcaster->removeModeChangeListener(this); // /-- impl_invalidateAccessible(); - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; impl_deleteDrawViewController(); m_pDrawModelWrapper.reset(); @@ -846,7 +846,7 @@ void ChartController::impl_deleteDrawViewController() ::addEventListener( const uno::Reference& xListener ) throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( impl_isDisposedOrSuspended() )//@todo? allow adding of listeners in suspend mode? return; //behave passive if already disposed or suspended @@ -859,7 +859,7 @@ void ChartController::impl_deleteDrawViewController() lang::XEventListener>& xListener ) throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( m_aLifeTimeManager.impl_isDisposed(false) ) return; //behave passive if already disposed or suspended @@ -1254,7 +1254,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand ) throw (uno::RuntimeException) { // // TODO: add listener by URL ! -// ::vos::OGuard aGuard( Application::GetSolarMutex()); +// SolarMutexGuard aGuard; // if( impl_isDisposedOrSuspended() )//@todo? allow adding of listeners in suspend mode? // return; //behave passive if already disposed or suspended @@ -1268,7 +1268,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand ) throw (uno::RuntimeException) { // // TODO: remove listener by URL ! -// ::vos::OGuard aGuard( Application::GetSolarMutex()); +// SolarMutexGuard aGuard; // if( m_aLifeTimeManager.impl_isDisposed() ) // return; //behave passive if already disposed or suspended @@ -1309,7 +1309,7 @@ void SAL_CALL ChartController::executeDispatch_ChartType() ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_CHARTTYPE ))), m_xUndoManager, getModel() ); // /-- - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; //prepare and open dialog ChartTypeDialog aDlg( m_pChartWindow, getModel(), m_xCC ); if( aDlg.Execute() == RET_OK ) @@ -1335,7 +1335,7 @@ void SAL_CALL ChartController::executeDispatch_SourceData() if( xChartDoc.is()) { // /-- - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::chart::DataSourceDialog aDlg( m_pChartWindow, xChartDoc, m_xCC ); if( aDlg.Execute() == RET_OK ) { diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx index e095fff8e5b6..c8aa5e317e9a 100644 --- a/chart2/source/controller/main/ChartController_EditData.cxx +++ b/chart2/source/controller/main/ChartController_EditData.cxx @@ -64,7 +64,7 @@ void ChartController::executeDispatch_EditData() { // /-- - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // using assignment for broken gcc 3.3 UndoLiveUpdateGuardWithData aUndoGuard = UndoLiveUpdateGuardWithData( ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_CHART_DATA ))), diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index 0dbec246be0b..bed77ac6df37 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -132,7 +132,7 @@ void ChartController::executeDispatch_InsertAxes() AxisHelper::getAxisOrGridExcistence( aDialogInput.aExistenceList, xDiagram, sal_True ); AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, sal_True ); - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; SchAxisDlg aDlg( m_pChartWindow, aDialogInput ); if( aDlg.Execute() == RET_OK ) { @@ -170,7 +170,7 @@ void ChartController::executeDispatch_InsertGrid() AxisHelper::getAxisOrGridExcistence( aDialogInput.aExistenceList, xDiagram, sal_False ); AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, sal_False ); - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; SchGridDlg aDlg( m_pChartWindow, aDialogInput );//aItemSet, b3D, bNet, bSecondaryX, bSecondaryY ); if( aDlg.Execute() == RET_OK ) { @@ -205,7 +205,7 @@ void ChartController::executeDispatch_InsertTitles() TitleDialogData aDialogInput; aDialogInput.readFromModel( getModel() ); - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; SchTitleDlg aDlg( m_pChartWindow, aDialogInput ); if( aDlg.Execute() == RET_OK ) { @@ -256,7 +256,7 @@ void ChartController::executeDispatch_OpenLegendDialog() try { //prepare and open dialog - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; SchLegendDlg aDlg( m_pChartWindow, m_xCC ); aDlg.init( getModel() ); if( aDlg.Execute() == RET_OK ) @@ -314,7 +314,7 @@ void ChartController::executeDispatch_InsertMenu_DataLabels() aItemConverter.FillItemSet( aItemSet ); //prepare and open dialog - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; //get number formatter uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( getModel(), uno::UNO_QUERY ); @@ -365,7 +365,7 @@ void ChartController::executeDispatch_InsertMenu_YErrorBars() aItemConverter.FillItemSet( aItemSet ); //prepare and open dialog - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; InsertErrorBarsDialog aDlg( m_pChartWindow, aItemSet, uno::Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY )); @@ -448,7 +448,7 @@ void ChartController::executeDispatch_InsertMenu_Trendlines() aItemConverter.FillItemSet( aItemSet ); //prepare and open dialog - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; InsertTrendlineDialog aDlg( m_pChartWindow, aItemSet ); aDlg.adjustSize(); @@ -505,7 +505,7 @@ void ChartController::executeDispatch_InsertTrendline() RegressionCurveHelper::getRegressionCurveIndex( xRegCurveCnt, xCurve ), false )); aDialogParameter.init( getModel() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get()); - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider, uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY )); @@ -553,7 +553,7 @@ void ChartController::executeDispatch_InsertYErrorBars() OBJECTTYPE_DATA_ERRORS, ::rtl::OUString(), m_aSelection.getSelectedCID())); aDialogParameter.init( getModel() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get()); - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider, uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY )); aDlg.SetAxisMinorStepWidthForErrorBarDecimals( diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 833d903f204f..e89ba7e89e53 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -151,7 +151,7 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize() SdrView* pSdrView = m_pDrawViewWrapper; bool bResizePossible = m_aSelection.isResizeableObjectSelected(); - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT( pFact, "No dialog factory" ); pDlg = pFact->CreateSchTransformTabDialog( diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index 217b21c030b5..4ac490cb1ad2 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -780,7 +780,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl: aDialogParameter.init( getModel() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get() ); - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider , uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ) ); @@ -844,7 +844,7 @@ void SAL_CALL ChartController::executeDispatch_View3D() // /-- //open dialog - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; View3DDialog aDlg( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorTable() ); if( aDlg.Execute() == RET_OK ) aUndoGuard.commitAction(); diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index 37a426ef8a7d..0047e6085682 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -192,7 +192,7 @@ bool ChartController::EndTextEdit() void SAL_CALL ChartController::executeDispatch_InsertSpecialCharacter() { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( m_pDrawViewWrapper && !m_pDrawViewWrapper->IsTextEdit() ) this->StartTextEdit(); diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 9e774b0ef661..8d06e6389e73 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -283,7 +283,7 @@ void ChartController::executeDispatch_NewArrangement() void ChartController::executeDispatch_ScaleText() { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // using assignment for broken gcc 3.3 UndoGuard aUndoGuard = UndoGuard( ::rtl::OUString( String( SchResId( STR_ACTION_SCALE_TEXT ))), @@ -544,7 +544,7 @@ void ChartController::executeDispatch_Copy() { Reference< datatransfer::XTransferable > xTransferable; { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; SdrObject* pSelectedObj = 0; if ( m_pDrawModelWrapper ) { @@ -830,7 +830,7 @@ bool ChartController::executeDispatch_Delete() //remove additional shape impl_ClearSelection(); { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if ( m_pDrawViewWrapper ) { m_pDrawViewWrapper->DeleteMarked(); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 901eddaae224..7210fbca4aac 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -519,7 +519,7 @@ void ChartController::execute_Paint( const Rectangle& rRect ) { awt::Size aResolution(1000,1000); { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( m_pChartWindow ) { aResolution.Width = m_pChartWindow->GetSizePixel().Width(); @@ -536,7 +536,7 @@ void ChartController::execute_Paint( const Rectangle& rRect ) Window* pWindow = m_pChartWindow; { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper; if(pDrawViewWrapper) pDrawViewWrapper->CompleteRedraw(pWindow, Region(rRect) ); @@ -605,7 +605,7 @@ IMPL_LINK( ChartController, DoubleClickWaitingHdl, void*, EMPTYARG ) void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; m_bWaitingForMouseUp = true; @@ -749,7 +749,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) void ChartController::execute_MouseMove( const MouseEvent& rMEvt ) { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; Window* pWindow = m_pChartWindow; DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper; @@ -784,7 +784,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) m_bWaitingForMouseUp = false; bool bNotifySelectionChange = false; { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; Window* pWindow = m_pChartWindow; DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper; @@ -997,7 +997,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) bool bIsAction = false; { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper; if(!pWindow || !pDrawViewWrapper) return; @@ -1688,7 +1688,7 @@ bool ChartController::requestQuickHelp( view::XSelectionChangeListener > & xListener ) throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( impl_isDisposedOrSuspended() )//@todo? allow adding of listeners in suspend mode? return; //behave passive if already disposed or suspended @@ -1701,7 +1701,7 @@ bool ChartController::requestQuickHelp( view::XSelectionChangeListener > & xListener ) throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; if( impl_isDisposedOrSuspended() ) //@todo? allow removing of listeners in suspend mode? return; //behave passive if already disposed or suspended @@ -1862,7 +1862,7 @@ bool ChartController::impl_DragDataPoint( const ::rtl::OUString & rCID, double f void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; Window* pWindow = m_pChartWindow; if( m_pDrawViewWrapper && pWindow ) { diff --git a/chart2/source/controller/main/ChartRenderer.cxx b/chart2/source/controller/main/ChartRenderer.cxx index f8dce6e96fdb..7182199261ec 100644 --- a/chart2/source/controller/main/ChartRenderer.cxx +++ b/chart2/source/controller/main/ChartRenderer.cxx @@ -100,7 +100,7 @@ bool ChartRenderer::DoPaint(OutputDevice* pOutDev, const Rectangle& rLogicObject { awt::Size aResolution(1000,1000); { - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; Rectangle aPixelRect( pOutDev->LogicToPixel( rLogicObjectRect ) ); aResolution.Width = aPixelRect.GetWidth(); aResolution.Height = aPixelRect.GetHeight(); @@ -113,7 +113,7 @@ bool ChartRenderer::DoPaint(OutputDevice* pOutDev, const Rectangle& rLogicObject if( xUpdatable.is() ) xUpdatable->update(); - ::vos::OGuard aGuard( Application::GetSolarMutex()); + SolarMutexGuard aGuard; ExplicitValueProvider* pProvider = ExplicitValueProvider::getExplicitValueProvider( xChartView ); if( !pProvider ) return false; diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 1fd6b624c30f..874533810d0c 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -385,7 +385,7 @@ void DrawCommandDispatch::execute( const ::rtl::OUString& rCommand, const Sequen DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper(); if ( pDrawViewWrapper ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; m_pChartController->setDrawMode( eDrawMode ); setInsertObj( sal::static_int_cast< USHORT >( eKind ) ); if ( bCreate ) @@ -465,7 +465,7 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID ) SdrPage* pPage = GetSdrPageFromXDrawPage( xDrawPage ); if ( pPage ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; pObj = SdrObjFactory::MakeNewObject( pDrawViewWrapper->GetCurrentObjInventor(), pDrawViewWrapper->GetCurrentObjIdentifier(), pPage ); if ( pObj ) diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx index e96438e36850..8df744c16ad8 100644 --- a/chart2/source/controller/main/ElementSelector.cxx +++ b/chart2/source/controller/main/ElementSelector.cxx @@ -308,7 +308,7 @@ void SAL_CALL ElementSelectorToolbarController::statusChanged( const frame::Feat { if( m_apSelectorListBox.get() ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if( rEvent.FeatureURL.Path.equalsAscii( "ChartElementSelector" ) ) { Reference< frame::XController > xChartController; diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index a94d73cd0289..9caafc6d5730 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -65,7 +65,7 @@ rtl::OUString lcl_getObjectName( SdrObject* pObj ) void impl_selectObject( SdrObject* pObjectToSelect, DrawViewWrapper& rDrawViewWrapper ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if(pObjectToSelect) { @@ -162,7 +162,7 @@ void Selection::applySelection( DrawViewWrapper* pDrawViewWrapper ) if( pDrawViewWrapper ) { { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; pDrawViewWrapper->UnmarkAll(); } SdrObject* pObjectToSelect = 0; @@ -189,7 +189,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* ObjectIdentifier aLastSelectedObject( m_aSelectedOID ); - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; //bAllowMultiClickSelectionChange==true -> a second click on the same object can lead to a changed selection (e.g. series -> single data point) @@ -341,7 +341,7 @@ bool SelectionHelper::findNamedParent( SdrObject*& pInOutObject , rtl::OUString& rOutName , bool bGivenObjectMayBeResult ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; //find the deepest named group SdrObject* pObj = pInOutObject; rtl::OUString aName; @@ -393,7 +393,7 @@ bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos return false; if( !ObjectIdentifier::isDragableObject(rNameOfSelectedObject) ) return false; - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SdrObject* pObj = rDrawViewWrapper.getNamedSdrObject( rNameOfSelectedObject ); if( !rDrawViewWrapper.IsObjectHit( pObj, rMPos ) ) return false; @@ -407,7 +407,7 @@ bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos bool bGetDiagramInsteadOf_Wall ) { // //- solar mutex - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; rtl::OUString aRet; SdrObject* pNewObj = rDrawViewWrapper.getHitObject(rMPos); @@ -510,7 +510,7 @@ SdrObject* SelectionHelper::getMarkHandlesObject( SdrObject* pObj ) return 0; //search for a child with name "MarkHandles" or "HandlesOnly" - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SdrObjList* pSubList = pObj->GetSubList(); if(pSubList) { @@ -535,7 +535,7 @@ SdrObject* SelectionHelper::getObjectToMark() //search for a child with name "MarkHandles" or "HandlesOnly" if(pObj) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SdrObjList* pSubList = pObj->GetSubList(); if(pSubList) { @@ -567,7 +567,7 @@ E3dScene* SelectionHelper::getSceneToRotate( SdrObject* pObj ) pRotateable = dynamic_cast(pObj); if( !pRotateable ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SdrObjList* pSubList = pObj->GetSubList(); if(pSubList) { @@ -584,7 +584,7 @@ E3dScene* SelectionHelper::getSceneToRotate( SdrObject* pObj ) E3dScene* pScene = 0; if(pRotateable) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; pScene = pRotateable->GetScene(); } return pScene; @@ -594,7 +594,7 @@ E3dScene* SelectionHelper::getSceneToRotate( SdrObject* pObj ) //virtual bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; //@todo -> more flexible handle creation //2 scenarios possible: diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index 50abc6c4a668..561e55375bfb 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -277,7 +277,7 @@ void ShapeController::executeDispatch_FormatLine() { pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE ); } - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { @@ -316,7 +316,7 @@ void ShapeController::executeDispatch_FormatArea() { pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE ); } - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { @@ -364,7 +364,7 @@ void ShapeController::executeDispatch_TextAttributes() { pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE ); } - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { @@ -403,7 +403,7 @@ void ShapeController::executeDispatch_TransformDialog() pDrawViewWrapper->GetAttributes( aAttr ); // item set for position and size SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { @@ -428,7 +428,7 @@ void ShapeController::executeDispatch_TransformDialog() else { SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { @@ -457,7 +457,7 @@ void ShapeController::executeDispatch_ObjectTitleDescription() { String aTitle( pSelectedObj->GetTitle() ); String aDescription( pSelectedObj->GetDescription() ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { @@ -487,7 +487,7 @@ void ShapeController::executeDispatch_RenameObject() if ( pSelectedObj ) { String aName( pSelectedObj->GetName() ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { @@ -513,7 +513,7 @@ void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId ) DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL ); if ( pDrawViewWrapper ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; switch ( nId ) { case COMMAND_ID_BRING_TO_FRONT: @@ -569,7 +569,7 @@ void ShapeController::executeDispatch_FontDialog() SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() ); pDrawViewWrapper->GetAttributes( aAttr ); ViewElementListProvider aViewElementListProvider( pDrawModelWrapper ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ::boost::scoped_ptr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) ); if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) ) { @@ -607,7 +607,7 @@ void ShapeController::executeDispatch_ParagraphDialog() aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) ); aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ::boost::scoped_ptr< ShapeParagraphDialog > pDlg( new ShapeParagraphDialog( pParent, &aNewAttr ) ); if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) ) { diff --git a/chart2/source/controller/main/ShapeToolbarController.cxx b/chart2/source/controller/main/ShapeToolbarController.cxx index 138a6cf96137..a4ffa8c1a723 100644 --- a/chart2/source/controller/main/ShapeToolbarController.cxx +++ b/chart2/source/controller/main/ShapeToolbarController.cxx @@ -121,7 +121,7 @@ void ShapeToolbarController::release() throw () void ShapeToolbarController::initialize( const Sequence< uno::Any >& rArguments ) throw (uno::Exception, uno::RuntimeException) { ToolboxController::initialize( rArguments ); - ::vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard( m_aMutex ); ToolBox* pToolBox = static_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ) ); @@ -234,7 +234,7 @@ void ShapeToolbarController::statusChanged( const frame::FeatureStateEvent& Even // ::com::sun::star::frame::XToolbarController Reference< awt::XWindow > ShapeToolbarController::createPopupWindow() throw (uno::RuntimeException) { - ::vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard( m_aMutex ); Reference< awt::XWindow > xRet; @@ -259,7 +259,7 @@ Reference< awt::XWindow > ShapeToolbarController::createPopupWindow() throw (uno ::rtl::OUString ShapeToolbarController::getSubToolbarName() throw (uno::RuntimeException) { - ::vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); uno::Reference< frame::XSubToolbarController > xSub( m_pToolbarController.getRef(), uno::UNO_QUERY ); if ( xSub.is() ) @@ -271,7 +271,7 @@ Reference< awt::XWindow > ShapeToolbarController::createPopupWindow() throw (uno void ShapeToolbarController::functionSelected( const ::rtl::OUString& rCommand ) throw (uno::RuntimeException) { - ::vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard( m_aMutex ); uno::Reference< frame::XSubToolbarController > xSub( m_pToolbarController.getRef(), uno::UNO_QUERY ); @@ -284,7 +284,7 @@ void ShapeToolbarController::functionSelected( const ::rtl::OUString& rCommand ) void ShapeToolbarController::updateImage() throw (uno::RuntimeException) { - ::vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard( m_aMutex ); uno::Reference< frame::XSubToolbarController > xSub( m_pToolbarController.getRef(), uno::UNO_QUERY ); diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx index 4e349ec9d506..3917e16721fd 100644 --- a/chart2/source/controller/main/UndoCommandDispatch.cxx +++ b/chart2/source/controller/main/UndoCommandDispatch.cxx @@ -114,7 +114,7 @@ void SAL_CALL UndoCommandDispatch::dispatch( { // why is it necessary to lock the solar mutex here? // /-- - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( URL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Undo" ))) m_xUndoManager->undo( m_xModel ); else diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 6db1bfa4dd14..74233f533848 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -200,7 +200,7 @@ void SAL_CALL ChartView::initialize( const uno::Sequence< uno::Any >& aArguments if( !m_pDrawModelWrapper.get() ) { // /-- - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; m_pDrawModelWrapper = ::boost::shared_ptr< DrawModelWrapper >( new DrawModelWrapper( m_xCC ) ); m_xShapeFactory = m_pDrawModelWrapper->getShapeFactory(); m_xDrawPage = m_pDrawModelWrapper->getMainDrawPage(); @@ -214,7 +214,7 @@ ChartView::~ChartView() if( m_pDrawModelWrapper.get() ) { EndListening( m_pDrawModelWrapper->getSdrModel(), FALSE /*bAllDups*/ ); - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; m_pDrawModelWrapper.reset(); } m_xDrawPage = NULL; @@ -1689,7 +1689,7 @@ SdrPage* ChartView::getSdrPage() uno::Reference< drawing::XShape > ChartView::getShapeForCID( const rtl::OUString& rObjectCID ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SdrObject* pObj = DrawModelWrapper::getNamedSdrObject( rObjectCID, this->getSdrPage() ); if( pObj ) return uno::Reference< drawing::XShape >( pObj->getUnoShape(), uno::UNO_QUERY); @@ -1715,7 +1715,7 @@ awt::Rectangle ChartView::getRectangleOfObject( const rtl::OUString& rObjectCID, ObjectType eObjectType( ObjectIdentifier::getObjectType( rObjectCID ) ); if( eObjectType == OBJECTTYPE_AXIS || eObjectType == OBJECTTYPE_DIAGRAM ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SvxShape* pRoot = SvxShape::getImplementation( xShape ); if( pRoot ) { @@ -2604,7 +2604,7 @@ void ChartView::createShapes() if( m_pDrawModelWrapper ) { // /-- - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // #i12587# support for shapes in chart m_pDrawModelWrapper->getSdrModel().EnableUndo( FALSE ); m_pDrawModelWrapper->clearMainDrawPage(); @@ -2627,7 +2627,7 @@ void ChartView::createShapes() } { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; //------------ apply fill properties to page // todo: it would be nicer to just pass the page m_xDrawPage and format it, @@ -2769,7 +2769,7 @@ void ChartView::createShapes() // #i12587# support for shapes in chart if ( m_pDrawModelWrapper ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; m_pDrawModelWrapper->getSdrModel().EnableUndo( TRUE ); } @@ -2813,7 +2813,7 @@ void ChartView::impl_updateView() //prepare draw model { // /-- - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; m_pDrawModelWrapper->lockControllers(); // \-- } @@ -2850,7 +2850,7 @@ void ChartView::impl_updateView() { // /-- - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; m_pDrawModelWrapper->unlockControllers(); // \-- } diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index 9772bdbea5d5..c59ee14f0c5d 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -289,7 +289,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream ) } // can't check the type for external filters, so set the "dont" flag accordingly - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; //SfxFilterFlags nMust = SFX_FILTER_IMPORT, nDont = SFX_FILTER_NOTINSTALLED; SfxAllItemSet *pSet = new SfxAllItemSet( SFX_APP()->GetPool() ); diff --git a/sc/source/ui/unoobj/unodoc.cxx b/sc/source/ui/unoobj/unodoc.cxx index 772bce48df0f..3c7a7c0f571b 100644 --- a/sc/source/ui/unoobj/unodoc.cxx +++ b/sc/source/ui/unoobj/unodoc.cxx @@ -59,7 +59,7 @@ uno::Sequence< rtl::OUString > SAL_CALL ScDocument_getSupportedServiceNames() th uno::Reference< uno::XInterface > SAL_CALL ScDocument_createInstance( const uno::Reference< lang::XMultiServiceFactory > & /* rSMgr */, const sal_uInt64 _nCreationFlags ) throw( uno::Exception ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ScDLL::Init(); SfxObjectShell* pShell = new ScDocShell( _nCreationFlags ); return uno::Reference< uno::XInterface >( pShell->GetModel() );