diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-22 01:51:12 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-25 01:55:38 +0000 |
commit | 750fc206113a796035cbc05fb904fbae0eb771a8 (patch) | |
tree | 4ea1f0378c2b6d7f50480d3b9051de91780219cd /svx | |
parent | bcd2b017088822ea95e9d33d1d0dc360c0ec8d74 (diff) |
replace remaining InterlockedCount() with inlined version
Change-Id: Ifcfa48fc87f905a91470a5b0fd597b02f220784c
Reviewed-on: https://gerrit.libreoffice.org/671
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleControlShape.cxx | 8 | ||||
-rw-r--r-- | svx/source/accessibility/charmapacc.cxx | 12 | ||||
-rw-r--r-- | svx/source/accessibility/svxrectctaccessiblecontext.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/ParseContext.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/fmscriptingenv.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/fmtextcontrolfeature.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/fmtextcontrolshell.cxx | 8 | ||||
-rw-r--r-- | svx/source/form/formcontrolling.cxx | 4 | ||||
-rw-r--r-- | svx/source/inc/fmundo.hxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlaymanager.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshcol.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 4 |
13 files changed, 34 insertions, 34 deletions
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 0ddd918e84fa..32af6f6e2a7f 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -135,11 +135,11 @@ AccessibleControlShape::AccessibleControlShape ( m_pChildManager = new OWrappedAccessibleChildrenManager( getProcessServiceFactory() ); m_pChildManager->acquire(); - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); { m_pChildManager->setOwningAccessible( this ); } - osl_decrementInterlockedCount( &m_refCount ); + osl_atomic_decrement( &m_refCount ); } //----------------------------------------------------------------------------- @@ -280,14 +280,14 @@ void AccessibleControlShape::Init() OSL_VERIFY( xNativeControlContext->queryInterface( ::getCppuType( &m_xControlContextComponent ) ) >>= m_xControlContextComponent ); // aggregate the proxy - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); if ( m_xControlContextProxy.is() ) { // At this point in time, the proxy has a ref count of exactly one - in m_xControlContextProxy. // Remember to _not_ reset this member unles the delegator of the proxy has been reset, too! m_xControlContextProxy->setDelegator( *this ); } - osl_decrementInterlockedCount( &m_refCount ); + osl_atomic_decrement( &m_refCount ); m_bDisposeNativeContext = sal_True; diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index 252c6ab29b21..dd67a8293147 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -57,11 +57,11 @@ SvxShowCharSetVirtualAcc::SvxShowCharSetVirtualAcc( SvxShowCharSet* pParent ) : ,mpParent( pParent ) ,m_pTable(NULL) { - osl_incrementInterlockedCount(&m_refCount); + osl_atomic_increment(&m_refCount); { lateInit(this); } - osl_decrementInterlockedCount(&m_refCount); + osl_atomic_decrement(&m_refCount); } // ----------------------------------------------------------------------------- @@ -298,11 +298,11 @@ void SvxShowCharSetItem::ClearAccessible() SvxShowCharSetAcc::SvxShowCharSetAcc( SvxShowCharSetVirtualAcc* _pParent ) : OAccessibleSelectionHelper(new VCLExternalSolarLock()) ,m_pParent( _pParent ) { - osl_incrementInterlockedCount(&m_refCount); + osl_atomic_increment(&m_refCount); { lateInit(this); } - osl_decrementInterlockedCount(&m_refCount); + osl_atomic_decrement(&m_refCount); } // ----------------------------------------------------------------------------- @@ -641,11 +641,11 @@ SvxShowCharSetItemAcc::SvxShowCharSetItemAcc( SvxShowCharSetItem* pParent ) : OA ,mpParent( pParent ) { OSL_ENSURE(pParent,"NO parent supplied!"); - osl_incrementInterlockedCount(&m_refCount); + osl_atomic_increment(&m_refCount); { // #b6211265 # lateInit(this); } - osl_decrementInterlockedCount(&m_refCount); + osl_atomic_decrement(&m_refCount); } // ----------------------------------------------------------------------------- diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index 3035a08abbb9..12732ab9597a 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -188,7 +188,7 @@ SvxRectCtlAccessibleContext::~SvxRectCtlAccessibleContext() if( IsAlive() ) { - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); dispose(); // set mpRepr = NULL & release all children } } @@ -782,7 +782,7 @@ SvxRectCtlChildAccessibleContext::~SvxRectCtlChildAccessibleContext() if( IsAlive() ) { - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); dispose(); // set mpRepr = NULL & release all children } } diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx index 0223e18b9a1a..44552338f22b 100644 --- a/svx/source/form/ParseContext.cxx +++ b/svx/source/form/ParseContext.cxx @@ -199,7 +199,7 @@ namespace OParseContextClient::OParseContextClient() { ::osl::MutexGuard aGuard( getSafteyMutex() ); - if ( 1 == osl_incrementInterlockedCount( &getCounter() ) ) + if ( 1 == osl_atomic_increment( &getCounter() ) ) { // first instance getSharedContext( new OSystemParseContext ); } @@ -210,7 +210,7 @@ OParseContextClient::~OParseContextClient() { { ::osl::MutexGuard aGuard( getSafteyMutex() ); - if ( 0 == osl_decrementInterlockedCount( &getCounter() ) ) + if ( 0 == osl_atomic_decrement( &getCounter() ) ) delete getSharedContext(NULL,sal_True); } } diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index 26a8ffb14ba9..3774d6f28ccd 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -358,13 +358,13 @@ namespace svxform //-------------------------------------------------------------------- oslInterlockedCount SAL_CALL FormScriptingEnvironment::acquire() { - return osl_incrementInterlockedCount( &m_refCount ); + return osl_atomic_increment( &m_refCount ); } //-------------------------------------------------------------------- oslInterlockedCount SAL_CALL FormScriptingEnvironment::release() { - if ( 0 == osl_decrementInterlockedCount( &m_refCount ) ) + if ( 0 == osl_atomic_decrement( &m_refCount ) ) { delete this; return 0; diff --git a/svx/source/form/fmtextcontrolfeature.cxx b/svx/source/form/fmtextcontrolfeature.cxx index 817520ab6ff6..b8733b6169a0 100644 --- a/svx/source/form/fmtextcontrolfeature.cxx +++ b/svx/source/form/fmtextcontrolfeature.cxx @@ -54,7 +54,7 @@ namespace svx OSL_ENSURE( m_nSlotId, "FmTextControlFeature::FmTextControlFeature: invalid slot id!" ); OSL_ENSURE( m_pInvalidator, "FmTextControlFeature::FmTextControlFeature: invalid invalidator!" ); - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); try { m_xDispatcher->addStatusListener( this, m_aFeatureURL ); @@ -63,7 +63,7 @@ namespace svx { OSL_FAIL( "FmTextControlFeature::FmTextControlFeature: caught an exception!" ); } - osl_decrementInterlockedCount( &m_refCount ); + osl_atomic_decrement( &m_refCount ); } //-------------------------------------------------------------------- diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 6234c9871d50..924fb8ecc67e 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -206,7 +206,7 @@ namespace svx DBG_CTOR( FmFocusListenerAdapter, NULL ); DBG_ASSERT( m_xWindow.is(), "FmFocusListenerAdapter::FmFocusListenerAdapter: invalid control!" ); - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); { try { @@ -218,7 +218,7 @@ namespace svx DBG_UNHANDLED_EXCEPTION(); } } - osl_decrementInterlockedCount( &m_refCount ); + osl_atomic_decrement( &m_refCount ); } //-------------------------------------------------------------------- @@ -303,7 +303,7 @@ namespace svx DBG_CTOR( FmMouseListenerAdapter, NULL ); DBG_ASSERT( m_xWindow.is(), "FmMouseListenerAdapter::FmMouseListenerAdapter: invalid control!" ); - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); { try { @@ -315,7 +315,7 @@ namespace svx DBG_UNHANDLED_EXCEPTION(); } } - osl_decrementInterlockedCount( &m_refCount ); + osl_atomic_decrement( &m_refCount ); } //-------------------------------------------------------------------- diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx index ceaa327a5cc1..b1d5d54b4f0a 100644 --- a/svx/source/form/formcontrolling.cxx +++ b/svx/source/form/formcontrolling.cxx @@ -256,7 +256,7 @@ namespace svx :m_aContext( _rContext ) ,m_pInvalidationCallback( _pInvalidationCallback ) { - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); try { m_xFormOperations = FormOperations::createWithFormController( m_aContext.getUNOContext(), _rxController ); @@ -273,7 +273,7 @@ namespace svx { DBG_UNHANDLED_EXCEPTION(); } - osl_decrementInterlockedCount( &m_refCount ); + osl_atomic_decrement( &m_refCount ); } //-------------------------------------------------------------------- diff --git a/svx/source/inc/fmundo.hxx b/svx/source/inc/fmundo.hxx index 8ffe30b2a04d..fc809c768bb8 100644 --- a/svx/source/inc/fmundo.hxx +++ b/svx/source/inc/fmundo.hxx @@ -164,8 +164,8 @@ public: // virtual sal_Bool queryInterface(UsrUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>&); // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass>> getIdlClasses(void); - void Lock() { osl_incrementInterlockedCount( &m_Locks ); } - void UnLock() { osl_decrementInterlockedCount( &m_Locks ); } + void Lock() { osl_atomic_increment( &m_Locks ); } + void UnLock() { osl_atomic_decrement( &m_Locks ); } sal_Bool IsLocked() const { return m_Locks != 0; } // access control diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index d24768ab0973..9601d5f3bf6d 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -397,12 +397,12 @@ namespace sdr oslInterlockedCount OverlayManager::acquire() { - return osl_incrementInterlockedCount( &mnRefCount ); + return osl_atomic_increment( &mnRefCount ); } oslInterlockedCount OverlayManager::release() { - oslInterlockedCount nCount( osl_decrementInterlockedCount( &mnRefCount ) ); + oslInterlockedCount nCount( osl_atomic_decrement( &mnRefCount ) ); if ( nCount == 0 ) delete this; return nCount; diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 4aea0edf4e7e..13398726d1c7 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -377,11 +377,11 @@ void SvxShape::impl_initFromSdrObject() if ( !mpObj.is() ) return; - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); { mpObj->setUnoShape(*this); } - osl_decrementInterlockedCount( &m_refCount ); + osl_atomic_decrement( &m_refCount ); mpModel = mpObj->GetModel(); diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index 1c4508116cfe..1b1cd895fa1f 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -67,7 +67,7 @@ void SvxShapeCollection::release() throw() uno::Reference< uno::XInterface > x( xDelegator ); if (! x.is()) { - if (osl_decrementInterlockedCount( &m_refCount ) == 0) + if (osl_atomic_decrement( &m_refCount ) == 0) { if (! mrBHelper.bDisposed) { @@ -89,7 +89,7 @@ void SvxShapeCollection::release() throw() } } // restore the reference count - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); } OWeakAggObject::release(); } diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index f12a7630289c..c1e3110bbfad 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -285,14 +285,14 @@ const SvxUnoTextRangeBaseList& SvxTextEditSourceImpl::getRanges() const void SAL_CALL SvxTextEditSourceImpl::acquire() { - osl_incrementInterlockedCount( &maRefCount ); + osl_atomic_increment( &maRefCount ); } //------------------------------------------------------------------------ void SAL_CALL SvxTextEditSourceImpl::release() { - if( ! osl_decrementInterlockedCount( &maRefCount ) ) + if( ! osl_atomic_decrement( &maRefCount ) ) delete this; } |