From 750fc206113a796035cbc05fb904fbae0eb771a8 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Sat, 22 Sep 2012 01:51:12 -0500 Subject: replace remaining InterlockedCount() with inlined version Change-Id: Ifcfa48fc87f905a91470a5b0fd597b02f220784c Reviewed-on: https://gerrit.libreoffice.org/671 Tested-by: Norbert Thiebaud Reviewed-by: Norbert Thiebaud --- chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx | 8 ++++---- chart2/source/controller/main/ShapeToolbarController.cxx | 4 ++-- chart2/source/model/main/Axis.cxx | 4 ++-- chart2/source/model/main/ChartModel.cxx | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'chart2') diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx index 17d9044a18ab..83ceca4a589c 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx @@ -414,9 +414,9 @@ ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > sp m_spChart2ModelContact( spChart2ModelContact ), m_aEventListenerContainer( m_aMutex ) { - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); initDataAccess(); - osl_decrementInterlockedCount( &m_refCount ); + osl_atomic_decrement( &m_refCount ); } ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, @@ -424,10 +424,10 @@ ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > sp m_spChart2ModelContact( spChart2ModelContact ), m_aEventListenerContainer( m_aMutex ) { - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); lcl_AllOperator aOperator( xNewData ); applyData( aOperator ); - osl_decrementInterlockedCount( &m_refCount ); + osl_atomic_decrement( &m_refCount ); } ChartDataWrapper::~ChartDataWrapper() diff --git a/chart2/source/controller/main/ShapeToolbarController.cxx b/chart2/source/controller/main/ShapeToolbarController.cxx index e951a2a28a95..e56ce128b1cf 100644 --- a/chart2/source/controller/main/ShapeToolbarController.cxx +++ b/chart2/source/controller/main/ShapeToolbarController.cxx @@ -76,9 +76,9 @@ ShapeToolbarController::ShapeToolbarController( const Reference< lang::XMultiSer ,m_nToolBoxId( 1 ) ,m_nSlotId( 0 ) { - osl_incrementInterlockedCount( &m_refCount ); + osl_atomic_increment( &m_refCount ); m_xServiceManager = rxFact; - osl_decrementInterlockedCount( &m_refCount ); + osl_atomic_decrement( &m_refCount ); } ShapeToolbarController::~ShapeToolbarController() diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx index 67a10800578e..5e0d07e6e4aa 100644 --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -312,7 +312,7 @@ Axis::Axis( Reference< uno::XComponentContext > const & /* xContext */ ) : m_aSubGridProperties(), m_xTitle() { - osl_incrementInterlockedCount(&m_refCount); + osl_atomic_increment(&m_refCount); setFastPropertyValue_NoBroadcast( ::chart::LineProperties::PROP_LINE_COLOR, uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30 @@ -322,7 +322,7 @@ Axis::Axis( Reference< uno::XComponentContext > const & /* xContext */ ) : ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder ); AllocateSubGrids(); - osl_decrementInterlockedCount(&m_refCount); + osl_atomic_decrement(&m_refCount); } Axis::Axis( const Axis & rOther ) : diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 01f2776273c3..ff09525040b5 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -108,7 +108,7 @@ ChartModel::ChartModel(uno::Reference const & xContext) { OSL_TRACE( "ChartModel: CTOR called" ); - osl_incrementInterlockedCount(&m_refCount); + osl_atomic_increment(&m_refCount); { m_xOldModelAgg.set( m_xContext->getServiceManager()->createInstanceWithContext( @@ -122,7 +122,7 @@ ChartModel::ChartModel(uno::Reference const & xContext) m_xChartTypeManager.set( xContext->getServiceManager()->createInstanceWithContext( C2U( "com.sun.star.chart2.ChartTypeManager" ), m_xContext ), uno::UNO_QUERY ); } - osl_decrementInterlockedCount(&m_refCount); + osl_atomic_decrement(&m_refCount); } ChartModel::ChartModel( const ChartModel & rOther ) @@ -148,7 +148,7 @@ ChartModel::ChartModel( const ChartModel & rOther ) { OSL_TRACE( "ChartModel: Copy-CTOR called" ); - osl_incrementInterlockedCount(&m_refCount); + osl_atomic_increment(&m_refCount); { m_xOldModelAgg.set( m_xContext->getServiceManager()->createInstanceWithContext( @@ -178,7 +178,7 @@ ChartModel::ChartModel( const ChartModel & rOther ) ModifyListenerHelper::addListener( xNewPageBackground, xListener ); xListener.clear(); } - osl_decrementInterlockedCount(&m_refCount); + osl_atomic_decrement(&m_refCount); } ChartModel::~ChartModel() -- cgit