diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-13 01:38:41 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 17:54:56 -0500 |
commit | 921136c6933f9142a9371eccf98799d72ee1e6cd (patch) | |
tree | d60d245582e1abf58b4fc4d5eccddc86e5fd7cc0 /dbaccess | |
parent | c0101e88414a7f75f13735c2abc58544f133c69c (diff) |
use SolarMutexGuard to guard the SolarMutex
Diffstat (limited to 'dbaccess')
26 files changed, 81 insertions, 81 deletions
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index 325e12aa37fb..bb7560d49640 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -533,7 +533,7 @@ Reference< XComponent > SAL_CALL ODocumentContainer::loadComponentFromURL( const , sal_Int32 /*SearchFlags*/ , const Sequence< PropertyValue >& Arguments ) throw (IOException, IllegalArgumentException, RuntimeException) { - vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; MutexGuard aGuard(m_aMutex); Reference< XComponent > xComp; diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index a4c078989e16..8fac5c8edc9d 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -1016,7 +1016,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co // However, we do /not/ have control over the EmbeddedObject implementation, and from a first look, it seems as // making it release the own mutex before calling SolarMutex-code is ... difficult, at least. // So, to be on the same side, we lock the SolarMutex here. Yes, it sucks. - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::ClearableMutexGuard aGuard(m_aMutex); if ( m_bInExecute ) return aRet; @@ -1271,7 +1271,7 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove) { { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // the request Reference<XNameAccess> xName(m_xParentContainer,UNO_QUERY); @@ -1367,7 +1367,7 @@ sal_Bool ODocumentDefinition::saveAs() try { { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // the request Reference<XNameAccess> xName(m_xParentContainer,UNO_QUERY); diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx index e044ba1b4988..e6b894178dc8 100644 --- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx +++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx @@ -113,7 +113,7 @@ namespace dbaccess // unfortunately, executing a script can trigger all kind of complex stuff, and unfortunately, not // every component involved into this properly cares for thread safety. To be on the safe side, // we lock the solar mutex here. - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Reference< XDispatch > xDispatch( xDispProv->queryDispatch( aScriptURL, ::rtl::OUString(), 0 ) ); if ( !xDispatch.is() ) diff --git a/dbaccess/source/ext/macromigration/progresscapture.cxx b/dbaccess/source/ext/macromigration/progresscapture.cxx index b0e31f4ec35c..6045515264fc 100644 --- a/dbaccess/source/ext/macromigration/progresscapture.cxx +++ b/dbaccess/source/ext/macromigration/progresscapture.cxx @@ -89,14 +89,14 @@ namespace dbmm //-------------------------------------------------------------------- void ProgressCapture::dispose() { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; m_pData->bDisposed = true; } //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::start( const ::rtl::OUString& _rText, ::sal_Int32 _nRange ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !m_pData->bDisposed ) m_pData->rMasterProgress.startObject( m_pData->sObjectName, _rText, _nRange ); } @@ -104,7 +104,7 @@ namespace dbmm //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::end( ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !m_pData->bDisposed ) m_pData->rMasterProgress.endObject(); } @@ -112,7 +112,7 @@ namespace dbmm //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::setText( const ::rtl::OUString& _rText ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !m_pData->bDisposed ) m_pData->rMasterProgress.setObjectProgressText( _rText ); } @@ -120,7 +120,7 @@ namespace dbmm //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::setValue( ::sal_Int32 _nValue ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !m_pData->bDisposed ) m_pData->rMasterProgress.setObjectProgressValue( _nValue ); } diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx index 0dd47a8ff3a5..715e58000ec2 100644 --- a/dbaccess/source/filter/xml/dbloader2.cxx +++ b/dbaccess/source/filter/xml/dbloader2.cxx @@ -619,7 +619,7 @@ IMPL_LINK( DBContentLoader, OnStartTableWizard, void*, /*NOTINTERESTEDIN*/ ) aValue.Value <<= m_sCurrentURL; aWizArgs[0] <<= aValue; - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; Reference< XJobExecutor > xTableWizard; if ( m_aContext.createComponentWithArguments( "com.sun.star.wizards.table.CallTableWizard", aWizArgs, xTableWizard ) ) xTableWizard->trigger(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("start"))); diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index fe07ce1e7f59..2d56c70ea8f2 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -409,7 +409,7 @@ sal_Bool SAL_CALL ODBFilter::filter( const Sequence< PropertyValue >& rDescripto { uno::Reference< ::com::sun::star::awt::XWindow > xWindow; { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; Window* pFocusWindow = Application::GetFocusWindow(); xWindow = VCLUnoHelper::GetInterface( pFocusWindow ); if( pFocusWindow ) @@ -422,7 +422,7 @@ sal_Bool SAL_CALL ODBFilter::filter( const Sequence< PropertyValue >& rDescripto if ( xWindow.is() ) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; Window* pFocusWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pFocusWindow ) pFocusWindow->LeaveWait(); diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index a2af939dbed0..62c358f9a098 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -553,7 +553,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( Runt ); } - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( getView() && getView()->IsInModalMode() ) @@ -1022,7 +1022,7 @@ namespace // ----------------------------------------------------------------------------- void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( isUserDefinedFeature( _nId ) ) @@ -1559,7 +1559,7 @@ OApplicationView* OApplicationController::getContainer() const // ::com::sun::star::container::XContainerListener void SAL_CALL OApplicationController::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); Reference< XContainer > xContainer(_rEvent.Source, UNO_QUERY); @@ -1595,7 +1595,7 @@ void SAL_CALL OApplicationController::elementInserted( const ContainerEvent& _rE // ----------------------------------------------------------------------------- void SAL_CALL OApplicationController::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); Reference< XContainer > xContainer(_rEvent.Source, UNO_QUERY); @@ -1629,7 +1629,7 @@ void SAL_CALL OApplicationController::elementRemoved( const ContainerEvent& _rEv // ----------------------------------------------------------------------------- void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); Reference< XContainer > xContainer(_rEvent.Source, UNO_QUERY); @@ -2074,7 +2074,7 @@ void OApplicationController::addContainerListener(const Reference<XNameAccess>& // ----------------------------------------------------------------------------- void OApplicationController::renameEntry() { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); OSL_ENSURE(getContainer(),"View is NULL! -> GPF"); @@ -2834,7 +2834,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer // ----------------------------------------------------------------------------- ::sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection ) throw (IllegalArgumentException, RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); Sequence< ::rtl::OUString> aSelection; if ( !_aSelection.hasValue() || !getView() ) @@ -2957,7 +2957,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer // ----------------------------------------------------------------------------- Any SAL_CALL OApplicationController::getSelection( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); Sequence< NamedDatabaseObject > aCurrentSelection; diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index ac88783d524a..46c3f5f5e66e 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -315,7 +315,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec // ----------------------------------------------------------------------------- void OApplicationController::deleteEntries() { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( getContainer() ) @@ -345,7 +345,7 @@ void OApplicationController::deleteEntries() // ----------------------------------------------------------------------------- const SharedConnection& OApplicationController::ensureConnection( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( !m_xDataSourceConnection.is() ) @@ -461,7 +461,7 @@ Reference< XNameAccess > OApplicationController::getElements( ElementType _eType // ----------------------------------------------------------------------------- void OApplicationController::getSelectionElementNames(::std::vector< ::rtl::OUString>& _rNames) const { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); OSL_ENSURE(getContainer(),"View isn't valid! -> GPF"); @@ -494,7 +494,7 @@ TransferableHelper* OApplicationController::copyObject() { try { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); ElementType eType = getContainer()->getElementType(); @@ -777,7 +777,7 @@ sal_Bool OApplicationController::isTableFormat() const IMPL_LINK( OApplicationController, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ ) { m_nAsyncDrop = 0; - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 26a645b43ae1..6d30c639b0df 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -216,7 +216,7 @@ void OApplicationController::openDialog( const ::rtl::OUString& _sServiceName ) { try { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); WaitObject aWO(getView()); @@ -306,7 +306,7 @@ void OApplicationController::openDirectSQLDialog() // ----------------------------------------------------------------------------- void SAL_CALL OApplicationController::propertyChange( const PropertyChangeEvent& evt ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( evt.PropertyName == PROPERTY_USER ) { @@ -393,7 +393,7 @@ Reference< XConnection > SAL_CALL OApplicationController::getActiveConnection() // ----------------------------------------------------------------------------- void SAL_CALL OApplicationController::connect( ) throw (SQLException, RuntimeException) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); SQLExceptionInfo aError; @@ -432,7 +432,7 @@ beans::Pair< ::sal_Int32, ::rtl::OUString > SAL_CALL OApplicationController::ide // ----------------------------------------------------------------------------- ::sal_Bool SAL_CALL OApplicationController::closeSubComponents( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); return m_pSubComponentManager->closeSubComponents(); } @@ -517,7 +517,7 @@ Reference< XComponent > SAL_CALL OApplicationController::loadComponent( ::sal_In Reference< XComponent > SAL_CALL OApplicationController::loadComponentWithArguments( ::sal_Int32 _ObjectType, const ::rtl::OUString& _ObjectName, ::sal_Bool _ForEditing, const Sequence< PropertyValue >& _Arguments ) throw (IllegalArgumentException, NoSuchElementException, SQLException, RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); impl_validateObjectTypeAndName_throw( _ObjectType, _ObjectName ); @@ -542,7 +542,7 @@ Reference< XComponent > SAL_CALL OApplicationController::createComponent( ::sal_ // ----------------------------------------------------------------------------- Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArguments( ::sal_Int32 i_nObjectType, const Sequence< PropertyValue >& i_rArguments, Reference< XComponent >& o_DocumentDefinition ) throw (IllegalArgumentException, SQLException, RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); impl_validateObjectTypeAndName_throw( i_nObjectType, ::boost::optional< ::rtl::OUString >() ); @@ -572,7 +572,7 @@ void SAL_CALL OApplicationController::releaseContextMenuInterceptor( const Refer // ----------------------------------------------------------------------------- void OApplicationController::previewChanged( sal_Int32 _nMode ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( m_xDataSource.is() && !isDataSourceReadOnly() ) diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index 4b62d2997092..16287ac0078e 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -464,7 +464,7 @@ namespace dbaui //------------------------------------------------------------------------------------------------------------------ sal_Bool SubComponentManager::closeSubComponents() { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_pData->getMutex() ); try diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 1e815c74b28e..66e774b22a53 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1185,7 +1185,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t if (!xSource.is()) return; - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // the IsModified changed to sal_False ? if ( (evt.PropertyName.equals(PROPERTY_ISMODIFIED)) && (::comphelper::getBOOL(evt.NewValue) == sal_False) @@ -1455,7 +1455,7 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for } Reference< ::com::sun::star::container::XIndexAccess > xParameters = aEvent.Parameters; - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // this may be executed in a non-main thread and we want to use vcl ... Window* pParent = Application::GetDefDialogParent(); // don't use the content as parent if it isn't visible @@ -2468,7 +2468,7 @@ void SbaXDataBrowserController::CellDeactivated() //------------------------------------------------------------------------------ IMPL_LINK( SbaXDataBrowserController, OnClipboardChanged, void*, EMPTYARG ) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; return OnInvalidateClipboard( NULL ); } diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index 9335ed582e42..bb4ae9b35b28 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -303,7 +303,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const :: } // init controller - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; try { Reference<XInitialization > xIni(xController,UNO_QUERY); diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index 5794465ebf8d..9497d08f5076 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -242,7 +242,7 @@ namespace dbaui IMPL_LINK( SbaTableQueryBrowser, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ ) { m_nAsyncDrop = 0; - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( m_aAsyncDrop.nType == E_TABLE ) diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 85fa45c0b959..6bac728cad62 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -292,7 +292,7 @@ void OGenericUnoController::impl_initialize() // ------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); Reference< XWindow > xParent; @@ -425,7 +425,7 @@ Sequence< PropertyValue > SAL_CALL OGenericUnoController::getCreationArguments() // ----------------------------------------------------------------------- void OGenericUnoController::attachFrame( const Reference< XFrame >& _rxFrame ) throw( RuntimeException ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); stopFrameListening( m_aCurrentFrame.getFrame() ); @@ -767,7 +767,7 @@ void OGenericUnoController::setMasterDispatchProvider(const Reference< XDispatch // ----------------------------------------------------------------------- void OGenericUnoController::dispatch(const URL& _aURL, const Sequence< PropertyValue >& aArgs) throw(RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // Since the fix for #123967#, the SolarMutex is not locked anymore when the framework calls into // here. So, lock it ourself. The real solution would be to lock it only in the places // where it's needed, but a) this might turn out difficult, since we then also need to care @@ -1377,7 +1377,7 @@ Reference< awt::XWindow> OGenericUnoController::getTopMostContainerWindow() cons // ----------------------------------------------------------------------------- Reference< XTitle > OGenericUnoController::impl_getTitleHelper_throw() { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( ! m_xTitleHelper.is ()) @@ -1411,7 +1411,7 @@ Reference< XTitle > OGenericUnoController::impl_getTitleHelper_throw() void SAL_CALL OGenericUnoController::setTitle(const ::rtl::OUString& sTitle) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); m_bExternalTitle = sal_True; impl_getTitleHelper_throw()->setTitle (sTitle); @@ -1613,7 +1613,7 @@ void OGenericUnoController::fillSupportedFeatures() void SAL_CALL OGenericUnoController::dispose() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; OGenericUnoController_Base::dispose(); } } // namespace dbaui diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 16d27cd4a85f..1652ed46b094 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -329,7 +329,7 @@ void SAL_CALL SbaXGridControl::removeStatusListener(const Reference< ::com::sun: //--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridControl::dispose(void) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EventObject aEvt; aEvt.Source = *this; @@ -504,7 +504,7 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa return; } - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; sal_Int16 nColId = -1; const PropertyValue* pArgs = aArgs.getConstArray(); for (sal_uInt16 i=0; i<aArgs.getLength(); ++i, ++pArgs) @@ -660,7 +660,7 @@ SbaGridHeader::SbaGridHeader(BrowseBox* pParent, WinBits nWinBits) //--------------------------------------------------------------------------------------- void SbaGridHeader::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // in the new DnD API, the solar mutex is not locked when StartDrag get's called ImplStartColumnDrag( _nAction, _rPosPixel ); @@ -1172,7 +1172,7 @@ void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt) //--------------------------------------------------------------------------------------- void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // in the new DnD API, the solar mutex is not locked when StartDrag get's called sal_Bool bHandled = sal_False; @@ -1652,7 +1652,7 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/) ::rtl::OUString sRet; if ( ::svt::BBTYPE_BROWSEBOX == eObjType ) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; sRet = String(ModuleRes(STR_DATASOURCE_GRIDCONTROL_DESC)); } else diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 0db947efe612..f963afecab31 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -219,7 +219,7 @@ void SafeRemovePropertyListener(const Reference< XPropertySet > & xSet, const :: //------------------------------------------------------------------------- Reference< XInterface > SAL_CALL SbaTableQueryBrowser::Create(const Reference<XMultiServiceFactory >& _rxFactory) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; return *(new SbaTableQueryBrowser(_rxFactory)); } @@ -316,7 +316,7 @@ Sequence< sal_Int8 > SAL_CALL SbaTableQueryBrowser::getImplementationId( ) thro //------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::disposing() { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // doin' a lot of VCL stuff here -> lock the SolarMutex // kiss our listeners goodbye @@ -870,7 +870,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw( // ----------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeException ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( getView() && getView()->IsInModalMode() ) return sal_False; @@ -1350,7 +1350,7 @@ void SbaTableQueryBrowser::implRemoveStatusListeners() // ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (IllegalArgumentException, RuntimeException) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // doin' a lot of VCL stuff here -> lock the SolarMutex Sequence< PropertyValue > aDescriptorSequence; @@ -1971,7 +1971,7 @@ void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDb String& _rQueryName, Image& _rQueryImage, String& _rTableName, Image& _rTableImage, const SharedConnection& _rxConnection) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // initialize the names/images if necessary if (!_rQueryName.Len()) _rQueryName = String(ModuleRes(RID_STR_QUERIES_CONTAINER)); @@ -2671,7 +2671,7 @@ SvLBoxEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAc // ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY); // first search for a definition container where we can insert this element @@ -2716,7 +2716,7 @@ sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const String& _sName, // ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY); // get the top-level representing the removed data source @@ -2769,7 +2769,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven // ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY); SvLBoxEntry* pContainer = getEntryFromContainer(xNames); @@ -3006,7 +3006,7 @@ namespace // ------------------------------------------------------------------------- void SbaTableQueryBrowser::impl_initialize() { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // doin' a lot of VCL stuff here -> lock the SolarMutex // first initialize the parent @@ -3701,7 +3701,7 @@ void SAL_CALL SbaTableQueryBrowser::releaseContextMenuInterceptor( const Referen //------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::registeredDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; implAddDatasource( _Event.Name, SharedConnection() ); } @@ -3758,7 +3758,7 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const String& _rDataSour //------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::revokedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; impl_cleanupDataSourceEntry( _Event.Name ); @@ -3769,7 +3769,7 @@ void SAL_CALL SbaTableQueryBrowser::revokedDatabaseLocation( const DatabaseRegis //------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // in case the data source was expanded, and connected, we need to clean it up // for simplicity, just do as if the data source were completely removed and re-added diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx index 48c2d9e4e87d..0e652020bdd5 100644 --- a/dbaccess/source/ui/control/toolboxcontroller.cxx +++ b/dbaccess/source/ui/control/toolboxcontroller.cxx @@ -112,7 +112,7 @@ namespace dbaui void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException) { ToolboxController::initialize(_rArguments); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); if ( m_aCommandURL.equalsAscii(".uno:DBNewForm") ) @@ -158,7 +158,7 @@ namespace dbaui // ----------------------------------------------------------------------------- void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); TCommandState::iterator aFind = m_aStates.find( Event.FeatureURL.Complete ); if ( aFind != m_aStates.end() ) @@ -240,7 +240,7 @@ namespace dbaui Reference< ::com::sun::star::awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw (RuntimeException) { // execute the menu - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent())); diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 3dff5f9904c7..71cb668216e6 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -323,7 +323,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert // handle the request try { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // release the mutex when calling the handler, it may need to lock the SolarMutex xHandler->handle(xRequest); } diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 5ad7e8781be7..a4ae710d7f73 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -134,7 +134,7 @@ DBG_NAME(DirectSQLDialog) //-------------------------------------------------------------------- void DirectSQLDialog::_disposing( const EventObject& _rSource ) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard(m_aMutex); OSL_ENSURE(Reference< XConnection >(_rSource.Source, UNO_QUERY).get() == m_xConnection.get(), diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index d8573b5aea5e..089025b511f7 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1477,7 +1477,7 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType // ----------------------------------------------------------------------------- sal_Int32 askForUserAction(Window* _pParent,USHORT _nTitle,USHORT _nText,sal_Bool _bAll,const ::rtl::OUString& _sName) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aMsg = String(ModuleRes(_nText)); aMsg.SearchAndReplace(String::CreateFromAscii("%1"),String(_sName)); OSQLMessageBox aAsk(_pParent,String(ModuleRes(_nTitle )),aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query); diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx index 333d584292a1..b820d80acbae 100644 --- a/dbaccess/source/ui/querydesign/JoinController.cxx +++ b/dbaccess/source/ui/querydesign/JoinController.cxx @@ -363,7 +363,7 @@ sal_Bool SAL_CALL OJoinController::suspend(sal_Bool _bSuspend) throw( RuntimeExc if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed ) return sal_True; - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( getView() && getView()->IsInModalMode() ) return sal_False; diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index fe938ac6b004..fa48701f6768 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1079,7 +1079,7 @@ void OQueryController::onLoadedMenu(const Reference< ::com::sun::star::frame::XL { if ( !editingCommand() ) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); String aDefaultName = String( ModuleRes( editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ) ); sName = aDefaultName.GetToken(0,' '); @@ -1160,7 +1160,7 @@ void OQueryController::impl_onModifyChanged() // ----------------------------------------------------------------------------- void SAL_CALL OQueryController::disposing( const EventObject& Source ) throw(RuntimeException) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; if ( getContainer() && Source.Source.is() ) { @@ -1636,7 +1636,7 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs) // ----------------------------------------------------------------------------- short OQueryController::saveModified() { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); short nRet = RET_YES; if ( !isConnected() || !isModified() ) diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index b9e3d8b12b33..48cb50dedf24 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -489,7 +489,7 @@ void ORelationController::mergeData(const TTableConnectionData& _aConnectionData // ----------------------------------------------------------------------------- IMPL_LINK( ORelationController, OnThreadFinished, void*, /*NOTINTERESTEDIN*/ ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); try { diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index 70aa026cb78f..3336906c21aa 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -592,7 +592,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed ) return sal_True; - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); if ( getView() && getView()->IsInModalMode() ) return sal_False; diff --git a/dbaccess/source/ui/uno/ColumnPeer.cxx b/dbaccess/source/ui/uno/ColumnPeer.cxx index bd3b697c9d77..faf090402297 100644 --- a/dbaccess/source/ui/uno/ColumnPeer.cxx +++ b/dbaccess/source/ui/uno/ColumnPeer.cxx @@ -59,7 +59,7 @@ OColumnPeer::OColumnPeer(Window* _pParent,const Reference<XMultiServiceFactory>& // ----------------------------------------------------------------------------- void OColumnPeer::setEditWidth(sal_Int32 _nWidth) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; OColumnControlWindow* pFieldControl = static_cast<OColumnControlWindow*>( GetWindow() ); if ( pFieldControl ) @@ -70,7 +70,7 @@ void OColumnPeer::setEditWidth(sal_Int32 _nWidth) // ----------------------------------------------------------------------------- void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; OColumnControlWindow* pFieldControl = static_cast<OColumnControlWindow*>( GetWindow() ); if ( pFieldControl ) @@ -118,7 +118,7 @@ void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn) // ----------------------------------------------------------------------------- void OColumnPeer::setConnection(const Reference< XConnection>& _xCon) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; OColumnControlWindow* pFieldControl = static_cast<OColumnControlWindow*>( GetWindow() ); if ( pFieldControl ) pFieldControl->setConnection(_xCon); @@ -126,7 +126,7 @@ void OColumnPeer::setConnection(const Reference< XConnection>& _xCon) //------------------------------------------------------------------------------ void OColumnPeer::setProperty( const ::rtl::OUString& _rPropertyName, const Any& Value) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( 0 == _rPropertyName.compareToAscii( PROPERTY_COLUMN ) ) { diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx index 562cb1043243..651e7926861a 100644 --- a/dbaccess/source/ui/uno/dbinteraction.cxx +++ b/dbaccess/source/ui/uno/dbinteraction.cxx @@ -137,7 +137,7 @@ namespace dbaui //------------------------------------------------------------------------- void BasicInteractionHandler::implHandle(const ParametersRequest& _rParamRequest, const Sequence< Reference< XInteractionContinuation > >& _rContinuations) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // want to open a dialog .... sal_Int32 nAbortPos = getContinuation(ABORT, _rContinuations); @@ -181,7 +181,7 @@ namespace dbaui //------------------------------------------------------------------------- void BasicInteractionHandler::implHandle(const SQLExceptionInfo& _rSqlInfo, const Sequence< Reference< XInteractionContinuation > >& _rContinuations) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // want to open a dialog .... sal_Int32 nApprovePos = getContinuation(APPROVE, _rContinuations); @@ -255,7 +255,7 @@ namespace dbaui //------------------------------------------------------------------------- void BasicInteractionHandler::implHandle(const DocumentSaveRequest& _rDocuRequest, const Sequence< Reference< XInteractionContinuation > >& _rContinuations) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // want to open a dialog .... sal_Int32 nApprovePos = getContinuation(APPROVE, _rContinuations); |