summaryrefslogtreecommitdiff
path: root/forms
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 /forms
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 'forms')
-rw-r--r--forms/source/component/DatabaseForm.cxx8
-rw-r--r--forms/source/component/Date.cxx4
-rw-r--r--forms/source/component/FormComponent.cxx4
-rw-r--r--forms/source/component/FormattedFieldWrapper.cxx4
-rw-r--r--forms/source/component/FormsCollection.cxx4
-rw-r--r--forms/source/component/Grid.cxx4
-rw-r--r--forms/source/component/ImageControl.cxx4
-rw-r--r--forms/source/component/clickableimage.cxx4
-rw-r--r--forms/source/helper/windowstateguard.cxx4
-rw-r--r--forms/source/richtext/rtattributehandler.cxx4
10 files changed, 22 insertions, 22 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index d73487cd883d..7938066b0d30 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -370,7 +370,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
impl_construct();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
// our aggregated rowset itself is not cloneable, so simply copy the properties
::comphelper::copyProperties( _cloneSource.m_xAggregateSet, m_xAggregateSet );
@@ -419,7 +419,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
);
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------
@@ -1480,9 +1480,9 @@ void SAL_CALL ODatabaseForm::clearWarnings( ) throw (SQLException, RuntimeExcep
Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) throw (RuntimeException)
{
ODatabaseForm* pClone = new ODatabaseForm( *this );
- osl_incrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_increment( &pClone->m_refCount );
pClone->clonedFrom( *this );
- osl_decrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_decrement( &pClone->m_refCount );
return pClone;
}
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index bdbaefa2148a..17460767631b 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -109,7 +109,7 @@ ODateModel::ODateModel(const Reference<XMultiServiceFactory>& _rxFactory)
setAggregateSet(m_xAggregateFastSet, getOriginalHandle(PROPERTY_ID_DATEFORMAT));
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
if ( m_xAggregateSet.is() )
@@ -119,7 +119,7 @@ ODateModel::ODateModel(const Reference<XMultiServiceFactory>& _rxFactory)
{
OSL_FAIL( "ODateModel::ODateModel: caught an exception!" );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 27600cfe8cbc..588e369a0fd6 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -1184,14 +1184,14 @@ void SAL_CALL OControlModel::setPropertyValues( const Sequence< PropertyValue >&
void OControlModel::lockInstance( LockAccess )
{
m_aMutex.acquire();
- osl_incrementInterlockedCount( &m_lockCount );
+ osl_atomic_increment( &m_lockCount );
}
//--------------------------------------------------------------------
oslInterlockedCount OControlModel::unlockInstance( LockAccess )
{
OSL_ENSURE( m_lockCount > 0, "OControlModel::unlockInstance: not locked!" );
- oslInterlockedCount lockCount = osl_decrementInterlockedCount( &m_lockCount );
+ oslInterlockedCount lockCount = osl_atomic_decrement( &m_lockCount );
m_aMutex.release();
return lockCount;
}
diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx
index 355287d3c3c1..561fa25905d9 100644
--- a/forms/source/component/FormattedFieldWrapper.cxx
+++ b/forms/source/component/FormattedFieldWrapper.cxx
@@ -56,9 +56,9 @@ namespace {
class RefCountGuard: private boost::noncopyable {
public:
explicit RefCountGuard(oslInterlockedCount & count): count_(count)
- { osl_incrementInterlockedCount(&count_); }
+ { osl_atomic_increment(&count_); }
- ~RefCountGuard() { osl_decrementInterlockedCount(&count_); }
+ ~RefCountGuard() { osl_atomic_decrement(&count_); }
private:
oslInterlockedCount & count_;
diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx
index 5329349a9a46..f7bbcdb4d2b8 100644
--- a/forms/source/component/FormsCollection.cxx
+++ b/forms/source/component/FormsCollection.cxx
@@ -147,9 +147,9 @@ StringSequence SAL_CALL OFormsCollection::getSupportedServiceNames() throw(Runti
Reference< XCloneable > SAL_CALL OFormsCollection::createClone( ) throw (RuntimeException)
{
OFormsCollection* pClone = new OFormsCollection( *this );
- osl_incrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_increment( &pClone->m_refCount );
pClone->clonedFrom( *this );
- osl_decrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_decrement( &pClone->m_refCount );
return pClone;
}
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 9c71efbe432c..1ea66a71f30e 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -158,12 +158,12 @@ OGridControlModel::~OGridControlModel()
Reference< XCloneable > SAL_CALL OGridControlModel::createClone( ) throw (RuntimeException)
{
OGridControlModel* pClone = new OGridControlModel( this, getContext().getLegacyServiceFactory() );
- osl_incrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_increment( &pClone->m_refCount );
pClone->OControlModel::clonedFrom( this );
// do not call OInterfaceContainer::clonedFrom, it would clone the elements aka columns, which is
// already done in the ctor
//pClone->OInterfaceContainer::clonedFrom( *this );
- osl_decrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_decrement( &pClone->m_refCount );
return static_cast< XCloneable* >( static_cast< OControlModel* >( pClone ) );
}
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 57a871b1d368..083a3dfaa43a 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -176,13 +176,13 @@ OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, co
DBG_CTOR( OImageControlModel, NULL );
implConstruct();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
// simulate a propertyChanged event for the ImageURL
::osl::MutexGuard aGuard( m_aMutex );
impl_handleNewImageURL_lck( eOther );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index 783a13f8d0fb..fbaa686012d4 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -495,14 +495,14 @@ namespace frm
//------------------------------------------------------------------------------
void OClickableImageBaseModel::implInitializeImageURL( )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
// simulate a propertyChanged event for the ImageURL
Any aImageURL;
getFastPropertyValue( aImageURL, PROPERTY_ID_IMAGE_URL );
_propertyChanged( PropertyChangeEvent( *this, PROPERTY_IMAGE_URL, sal_False, PROPERTY_ID_IMAGE_URL, Any( ), aImageURL ) );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------
diff --git a/forms/source/helper/windowstateguard.cxx b/forms/source/helper/windowstateguard.cxx
index a06f16ee0817..a7d251f353ca 100644
--- a/forms/source/helper/windowstateguard.cxx
+++ b/forms/source/helper/windowstateguard.cxx
@@ -106,11 +106,11 @@ namespace frm
if ( !m_xWindow.is() || !m_xModelProps.is() )
throw RuntimeException();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_xWindow->addWindowListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index c390aab52a48..469a3f3e8dd5 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -60,13 +60,13 @@ namespace frm
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL ReferenceBase::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL ReferenceBase::release()
{
- return osl_decrementInterlockedCount( &m_refCount );
+ return osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------