summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-09-22 01:51:12 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-09-25 01:55:38 +0000
commit750fc206113a796035cbc05fb904fbae0eb771a8 (patch)
tree4ea1f0378c2b6d7f50480d3b9051de91780219cd /toolkit/source
parentbcd2b017088822ea95e9d33d1d0dc360c0ec8d74 (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 'toolkit/source')
-rw-r--r--toolkit/source/controls/formattedcontrol.cxx4
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx4
-rw-r--r--toolkit/source/controls/spinningprogress.cxx4
-rw-r--r--toolkit/source/controls/unocontrols.cxx4
-rw-r--r--toolkit/source/helper/accessibilityclient.cxx8
5 files changed, 12 insertions, 12 deletions
diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx
index 93c8f1768821..a1dbc6e21c1c 100644
--- a/toolkit/source/controls/formattedcontrol.cxx
+++ b/toolkit/source/controls/formattedcontrol.cxx
@@ -101,14 +101,14 @@ namespace toolkit
// ...............................................................
void lcl_registerDefaultFormatsClient()
{
- osl_incrementInterlockedCount( &s_refCount );
+ osl_atomic_increment( &s_refCount );
}
// ...............................................................
void lcl_revokeDefaultFormatsClient()
{
::osl::ClearableMutexGuard aGuard( getDefaultFormatsMutex() );
- if ( 0 == osl_decrementInterlockedCount( &s_refCount ) )
+ if ( 0 == osl_atomic_decrement( &s_refCount ) )
{
Reference< XNumberFormatsSupplier >& rDefaultFormats( lcl_getDefaultFormatsAccess_nothrow() );
Reference< XNumberFormatsSupplier > xReleasePotentialLastReference( rDefaultFormats );
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index 7efcbb10d0c2..72d0593f21c6 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -122,7 +122,7 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun::
UnoGridModel::UnoGridModel( const UnoGridModel& rModel )
:UnoControlModel( rModel )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
Reference< XGridDataModel > xDataModel;
// clone the data model
@@ -160,7 +160,7 @@ UnoGridModel::UnoGridModel( const UnoGridModel& rModel )
UnoControlModel::setFastPropertyValue_NoBroadcast( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( xColumnModel ) );
// same comment as above: do not use our own setPropertyValue here.
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//----------------------------------------------------------------------------------------------------------------------
diff --git a/toolkit/source/controls/spinningprogress.cxx b/toolkit/source/controls/spinningprogress.cxx
index ecc038ed733c..b49d8493156c 100644
--- a/toolkit/source/controls/spinningprogress.cxx
+++ b/toolkit/source/controls/spinningprogress.cxx
@@ -64,7 +64,7 @@ namespace toolkit
:SpinningProgressControlModel_Base( i_factory )
{
// default image sets
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
try
{
@@ -84,7 +84,7 @@ namespace toolkit
DBG_UNHANDLED_EXCEPTION();
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 7fa01019de49..03089bd28147 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -648,13 +648,13 @@ UnoControlButtonModel::UnoControlButtonModel( const Reference< XMultiServiceFact
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXButton );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
setFastPropertyValue_NoBroadcast( BASEPROPERTY_IMAGEPOSITION, ImplGetDefaultValue( BASEPROPERTY_IMAGEPOSITION ) );
// this ensures that our ImagePosition is consistent with our ImageAlign property (since both
// defaults are not per se consistent), since both are coupled in setFastPropertyValue_NoBroadcast
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
::rtl::OUString UnoControlButtonModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx
index 349eb36c5c85..14fb13fae872 100644
--- a/toolkit/source/helper/accessibilityclient.cxx
+++ b/toolkit/source/helper/accessibilityclient.cxx
@@ -163,13 +163,13 @@ namespace toolkit
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL AccessibleDummyFactory::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL AccessibleDummyFactory::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
@@ -197,7 +197,7 @@ namespace toolkit
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
#ifdef UNLOAD_ON_LAST_CLIENT_DYING
- if ( 1 == osl_incrementInterlockedCount( &s_nAccessibilityClients ) )
+ if ( 1 == osl_atomic_increment( &s_nAccessibilityClients ) )
{ // the first client
#endif // UNLOAD_ON_LAST_CLIENT_DYING
// load the library implementing the factory
@@ -247,7 +247,7 @@ namespace toolkit
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
#ifdef UNLOAD_ON_LAST_CLIENT_DYING
- if( 0 == osl_decrementInterlockedCount( &s_nAccessibilityClients ) )
+ if( 0 == osl_atomic_decrement( &s_nAccessibilityClients ) )
{
s_pFactory = NULL;
s_pAccessibleFactoryFunc = NULL;