diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-16 03:20:00 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 19:55:38 -0500 |
commit | d88b292704957818eff9a348a524b5c90b40031b (patch) | |
tree | eabf039491304b2c13f3bd77ca0b6d58c3dba1b8 /comphelper/source | |
parent | 98b2c08dff4d00b3e7a2e001c326ebe27dae4549 (diff) |
merge vosremoval-mutex.diff
In practice the changeset is 'inspired' by vosremoval-mutex.diff
but was essentially redone manually
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/property/ChainablePropertySet.cxx | 21 | ||||
-rw-r--r-- | comphelper/source/property/MasterPropertySet.cxx | 44 | ||||
-rw-r--r-- | comphelper/source/property/genericpropertyset.cxx | 2 |
3 files changed, 33 insertions, 34 deletions
diff --git a/comphelper/source/property/ChainablePropertySet.cxx b/comphelper/source/property/ChainablePropertySet.cxx index 9ceefb351c21..f77f6fe2e664 100644 --- a/comphelper/source/property/ChainablePropertySet.cxx +++ b/comphelper/source/property/ChainablePropertySet.cxx @@ -30,7 +30,7 @@ #include "precompiled_comphelper.hxx" #include <comphelper/ChainablePropertySet.hxx> #include <comphelper/ChainablePropertySetInfo.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <memory> // STL auto_ptr @@ -41,9 +41,8 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -using ::vos::IMutex; -ChainablePropertySet::ChainablePropertySet( comphelper::ChainablePropertySetInfo* pInfo, vos::IMutex *pMutex ) +ChainablePropertySet::ChainablePropertySet( comphelper::ChainablePropertySetInfo* pInfo, osl::SolarMutex* pMutex ) throw() : mpInfo ( pInfo ) , mpMutex ( pMutex ) @@ -79,9 +78,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValue( const ::rtl::OUString& rPr throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); PropertyInfoHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -97,9 +96,9 @@ Any SAL_CALL ChainablePropertySet::getPropertyValue( const ::rtl::OUString& rPro throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); PropertyInfoHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -143,9 +142,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValues( const Sequence< ::rtl::OU throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -177,9 +176,9 @@ Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues( const Sequence throw(RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index be1b2b6c3224..be423448e354 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -33,7 +33,7 @@ #include <comphelper/MasterPropertySetInfo.hxx> #include <comphelper/ChainablePropertySet.hxx> #include <comphelper/ChainablePropertySetInfo.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <memory> // STL auto_ptr @@ -42,19 +42,19 @@ class AutoOGuardArray { sal_Int32 nSize; - std::auto_ptr< vos::OGuard > * pGuardArray; + std::auto_ptr< osl::SolarMutexGuard > * pGuardArray; public: AutoOGuardArray( sal_Int32 nNumElements ); ~AutoOGuardArray(); - std::auto_ptr< vos::OGuard > & operator[] ( sal_Int32 i ) { return pGuardArray[i]; } + std::auto_ptr< osl::SolarMutexGuard > & operator[] ( sal_Int32 i ) { return pGuardArray[i]; } }; AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements ) { nSize = nNumElements; - pGuardArray = new std::auto_ptr< vos::OGuard >[ nSize ]; + pGuardArray = new std::auto_ptr< osl::SolarMutexGuard >[ nSize ]; } AutoOGuardArray::~AutoOGuardArray() @@ -72,7 +72,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -using vos::IMutex; + SlaveData::SlaveData ( ChainablePropertySet *pSlave) : mpSlave ( pSlave ) @@ -81,7 +81,7 @@ SlaveData::SlaveData ( ChainablePropertySet *pSlave) { } -MasterPropertySet::MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, IMutex *pMutex ) +MasterPropertySet::MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, osl::SolarMutex* pMutex ) throw() : mpInfo ( pInfo ) , mpMutex ( pMutex ) @@ -130,9 +130,9 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -150,9 +150,9 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard2; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard2; if (pSlave->mpMutex) - pMutexGuard2.reset( new vos::OGuard(pSlave->mpMutex) ); + pMutexGuard2.reset( new osl::SolarMutexGuard(pSlave->mpMutex) ); pSlave->_preSetValues(); pSlave->_setSingleValue( *((*aIter).second->mpInfo), rValue ); @@ -164,9 +164,9 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); @@ -185,9 +185,9 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard2; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard2; if (pSlave->mpMutex) - pMutexGuard2.reset( new vos::OGuard(pSlave->mpMutex) ); + pMutexGuard2.reset( new osl::SolarMutexGuard(pSlave->mpMutex) ); pSlave->_preGetValues(); pSlave->_getSingleValue( *((*aIter).second->mpInfo), aAny ); @@ -225,9 +225,9 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< ::rtl::OUStr throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -264,7 +264,7 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< ::rtl::OUStr { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). if (pSlave->mpSlave->mpMutex) - aOGuardArray[i].reset( new vos::OGuard(pSlave->mpSlave->mpMutex) ); + aOGuardArray[i].reset( new osl::SolarMutexGuard(pSlave->mpSlave->mpMutex) ); pSlave->mpSlave->_preSetValues(); pSlave->SetInit ( sal_True ); @@ -291,9 +291,9 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< : throw(RuntimeException) { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (mpMutex) - pMutexGuard.reset( new vos::OGuard(mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(mpMutex) ); const sal_Int32 nCount = aPropertyNames.getLength(); @@ -329,7 +329,7 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< : { // acquire mutex in c-tor and releases it in the d-tor (exception safe!). if (pSlave->mpSlave->mpMutex) - aOGuardArray[i].reset( new vos::OGuard(pSlave->mpSlave->mpMutex) ); + aOGuardArray[i].reset( new osl::SolarMutexGuard(pSlave->mpSlave->mpMutex) ); pSlave->mpSlave->_preGetValues(); pSlave->SetInit ( sal_True ); @@ -392,9 +392,9 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( const ::rtl::OUStrin ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; // acquire mutex in c-tor and releases it in the d-tor (exception safe!). - std::auto_ptr< vos::OGuard > pMutexGuard; + std::auto_ptr< osl::SolarMutexGuard > pMutexGuard; if (pSlave->mpMutex) - pMutexGuard.reset( new vos::OGuard(pSlave->mpMutex) ); + pMutexGuard.reset( new osl::SolarMutexGuard(pSlave->mpMutex) ); pSlave->_preGetPropertyState(); pSlave->_getPropertyState( *((*aIter).second->mpInfo), aState ); diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx index 888a238aca1a..123e9ef2f784 100644 --- a/comphelper/source/property/genericpropertyset.cxx +++ b/comphelper/source/property/genericpropertyset.cxx @@ -37,7 +37,7 @@ #include <comphelper/genericpropertyset.hxx> #include <comphelper/propertysetinfo.hxx> #include <comphelper/stl_types.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <rtl/uuid.h> #include <boost/mem_fn.hpp> #include <boost/bind.hpp> |