diff options
24 files changed, 68 insertions, 83 deletions
diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx index 7b8ecc716c63..7f677790e454 100644 --- a/comphelper/source/container/containermultiplexer.cxx +++ b/comphelper/source/container/containermultiplexer.cxx @@ -18,7 +18,6 @@ */ #include <comphelper/containermultiplexer.hxx> -#include <comphelper/uno3.hxx> #include <osl/diagnose.h> namespace comphelper @@ -104,7 +103,7 @@ namespace comphelper if (m_pListener) m_pListener->setAdapter(this); - ::comphelper::increment(m_refCount); + osl_atomic_increment(&m_refCount); try { m_xContainer->addContainerListener(this); @@ -113,7 +112,7 @@ namespace comphelper { OSL_FAIL("Exception caught!"); } - ::comphelper::decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index dc5d6659a3c6..0bfddcc7bb6c 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -546,13 +546,13 @@ SbaXDataBrowserController::SbaXDataBrowserController(const Reference< ::com::sun ,m_bCannotSelectUnfiltered( true ) { // create the form controller aggregate - ::comphelper::increment(m_refCount); + osl_atomic_increment(&m_refCount); { m_pFormControllerImpl = new FormControllerImpl(this); m_xFormControllerImpl = m_pFormControllerImpl; m_xFormControllerImpl->setDelegator(*this); } - ::comphelper::decrement(m_refCount); + osl_atomic_decrement(&m_refCount); m_aInvalidateClipboard.SetTimeoutHdl(LINK(this, SbaXDataBrowserController, OnInvalidateClipboard)); m_aInvalidateClipboard.SetTimeout(300); diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 9870aec1a130..41e8e357ca75 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -357,7 +357,7 @@ OButtonControl::OButtonControl(const Reference<XComponentContext>& _rxFactory) ,m_nTargetUrlFeatureId( -1 ) ,m_bEnabledByPropertyValue( false ) { - increment(m_refCount); + osl_atomic_increment(&m_refCount); { // Register as ActionListener Reference<XButton> xButton; @@ -366,7 +366,7 @@ OButtonControl::OButtonControl(const Reference<XComponentContext>& _rxFactory) xButton->addActionListener(this); } // For Listener: refcount at one - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 68e668edfb68..944374e1ed2d 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -206,7 +206,7 @@ OGridColumn::OGridColumn( const Reference<XComponentContext>& _rContext, const O // Create the UnoControlModel if ( !m_aModelName.isEmpty() ) // is there a to-be-aggregated model? { - increment( m_refCount ); + osl_atomic_increment( &m_refCount ); { m_xAggregate.set( _rContext->getServiceManager()->createInstanceWithContext( m_aModelName, _rContext ), UNO_QUERY ); @@ -219,7 +219,7 @@ OGridColumn::OGridColumn( const Reference<XComponentContext>& _rContext, const O } // Set refcount back to zero - decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); } } @@ -235,7 +235,7 @@ OGridColumn::OGridColumn( const OGridColumn* _pOriginal ) m_aModelName = _pOriginal->m_aModelName; m_aLabel = _pOriginal->m_aLabel; - increment( m_refCount ); + osl_atomic_increment( &m_refCount ); { { m_xAggregate = createAggregateClone( _pOriginal ); @@ -247,7 +247,7 @@ OGridColumn::OGridColumn( const OGridColumn* _pOriginal ) m_xAggregate->setDelegator( static_cast< ::cppu::OWeakObject* >( this ) ); } } - decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); } diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 1bf4af9d43bc..1ba1e15e663b 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -61,7 +61,6 @@ #include <comphelper/processfactory.hxx> #include <comphelper/seqstream.hxx> #include <comphelper/sequence.hxx> -#include <comphelper/uno3.hxx> #include <connectivity/dbtools.hxx> #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/implbase2.hxx> @@ -392,7 +391,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource ) void ODatabaseForm::impl_construct() { // aggregate a row set - increment(m_refCount); + osl_atomic_increment(&m_refCount); { m_xAggregate = Reference< XAggregation >( m_xContext->getServiceManager()->createInstanceWithContext(SRV_SDB_ROWSET, m_xContext), UNO_QUERY_THROW ); m_xAggregateAsRowSet.set( m_xAggregate, UNO_QUERY_THROW ); @@ -424,7 +423,7 @@ void ODatabaseForm::impl_construct() declareForwardedProperty( PROPERTY_ID_ACTIVE_CONNECTION ); } - decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); m_pGroupManager = new OGroupManager( this ); m_pGroupManager->acquire(); diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index f4aced15587a..ffcc37a88633 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -88,7 +88,7 @@ OEditControl::OEditControl(const Reference<XComponentContext>& _rxFactory) ,m_nKeyEvent( 0 ) { - increment(m_refCount); + osl_atomic_increment(&m_refCount); { Reference<XWindow> xComp; if (query_aggregation(m_xAggregate, xComp)) @@ -97,7 +97,7 @@ OEditControl::OEditControl(const Reference<XComponentContext>& _rxFactory) xComp->addKeyListener(this); } } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } diff --git a/forms/source/component/EventThread.cxx b/forms/source/component/EventThread.cxx index 47a192927f8d..737774baa57b 100644 --- a/forms/source/component/EventThread.cxx +++ b/forms/source/component/EventThread.cxx @@ -35,7 +35,7 @@ OComponentEventThread::OComponentEventThread( ::cppu::OComponentHelper* pCompImp m_pCompImpl( pCompImpl ) { - increment(m_refCount); + osl_atomic_increment(&m_refCount); // Hold a reference of the Control { @@ -49,7 +49,7 @@ OComponentEventThread::OComponentEventThread( ::cppu::OComponentHelper* pCompImp m_xComp->addEventListener( xEvtLstnr ); } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } OComponentEventThread::~OComponentEventThread() diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 86ab00c47e08..8f0aea69fbae 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -122,12 +122,12 @@ OControl::OControl( const Reference< XComponentContext >& _rxContext, const OUSt { // Aggregate VCL Control // Increment the RefCount for aggregates, because the aggregate by itself increments the RefCount in the setDelegator - increment( m_refCount ); + osl_atomic_increment( &m_refCount ); { m_xAggregate.set(_rxContext->getServiceManager()->createInstanceWithContext(_rAggregateService, _rxContext), css::uno::UNO_QUERY); m_xControl.set(m_xAggregate, css::uno::UNO_QUERY); } - decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); if ( _bSetDelegator ) doSetDelegator(); @@ -146,14 +146,14 @@ void OControl::doResetDelegator() void OControl::doSetDelegator() { - increment( m_refCount ); + osl_atomic_increment( &m_refCount ); if ( m_xAggregate.is() ) { // those brackets are important for some compilers, don't remove! // (they ensure that the temporary object created in the line below // is destroyed *before* the refcount-decrement) m_xAggregate->setDelegator( static_cast< XWeak* >( this ) ); } - decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); } // UNO Binding @@ -516,7 +516,7 @@ OControlModel::OControlModel( { if (!_rUnoControlModelTypeName.isEmpty()) // the is a model we have to aggregate { - increment(m_refCount); + osl_atomic_increment(&m_refCount); { m_xAggregate = Reference<XAggregation>(m_xContext->getServiceManager()->createInstanceWithContext(_rUnoControlModelTypeName, m_xContext), UNO_QUERY); setAggregation(m_xAggregate); @@ -539,7 +539,7 @@ OControlModel::OControlModel( doSetDelegator(); // Refcount is at NULL again - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } } @@ -567,7 +567,7 @@ OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference< if ( _bCloneAggregate ) { // temporarily increment refcount because of temporary references to ourself in the following - increment( m_refCount ); + osl_atomic_increment( &m_refCount ); { // transfer the (only, at the very moment!) ref count m_xAggregate = createAggregateClone( _pOriginal ); @@ -581,7 +581,7 @@ OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference< doSetDelegator(); // decrement ref count - decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); } } @@ -604,12 +604,12 @@ void OControlModel::doResetDelegator() void OControlModel::doSetDelegator() { - increment(m_refCount); + osl_atomic_increment(&m_refCount); if (m_xAggregate.is()) { m_xAggregate->setDelegator(static_cast<XWeak*>(this)); } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } // XChild @@ -1263,14 +1263,14 @@ void OBoundControlModel::clonedFrom( const OControlModel* _pOriginal ) void OBoundControlModel::implInitAggMultiplexer( ) { - increment( m_refCount ); + osl_atomic_increment( &m_refCount ); if ( m_xAggregateSet.is() ) { m_pAggPropMultiplexer = new OPropertyChangeMultiplexer( this, m_xAggregateSet, false ); m_pAggPropMultiplexer->acquire(); } - decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); doSetDelegator(); } diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 1d2fada88d51..f28c34774512 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -166,7 +166,7 @@ OFormattedControl::OFormattedControl(const Reference<XComponentContext>& _rxFact :OBoundControl(_rxFactory, VCL_CONTROL_FORMATTEDFIELD) ,m_nKeyEvent(0) { - increment(m_refCount); + osl_atomic_increment(&m_refCount); { Reference<XWindow> xComp; if (query_aggregation(m_xAggregate, xComp)) @@ -174,7 +174,7 @@ OFormattedControl::OFormattedControl(const Reference<XComponentContext>& _rxFact xComp->addKeyListener(this); } } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } OFormattedControl::~OFormattedControl() { @@ -276,9 +276,9 @@ void OFormattedModel::implConstruct() m_aNullDate = DBTypeConversion::getStandardDate(); m_nFieldType = DataType::OTHER; // default our formats supplier - increment(m_refCount); + osl_atomic_increment(&m_refCount); setPropertyToDefaultByHandle(PROPERTY_ID_FORMATSSUPPLIER); - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); startAggregatePropertyListening( PROPERTY_FORMATKEY ); startAggregatePropertyListening( PROPERTY_FORMATSSUPPLIER ); } diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index b368eaca33ee..3ae02677e079 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -69,7 +69,7 @@ InterfaceRef OFormattedFieldWrapper::createFormattedFieldWrapper(const ::com::su pRef->m_pEditPart = rtl::Reference< OEditModel >(new OEditModel(pRef->m_xContext)); } - increment(pRef->m_refCount); + osl_atomic_increment(&pRef->m_refCount); if (pRef->m_xAggregate.is()) { // has to be in it's own block because of the temporary variable created by *this @@ -77,7 +77,7 @@ InterfaceRef OFormattedFieldWrapper::createFormattedFieldWrapper(const ::com::su } InterfaceRef xRef(*pRef); - decrement(pRef->m_refCount); + osl_atomic_decrement(&pRef->m_refCount); return xRef; } @@ -296,12 +296,12 @@ void SAL_CALL OFormattedFieldWrapper::read(const Reference<XObjectInputStream>& } // do the aggregation - increment(m_refCount); + osl_atomic_increment(&m_refCount); if (m_xAggregate.is()) { // has to be in it's own block because of the temporary variable created by *this m_xAggregate->setDelegator(static_cast<XWeak*>(this)); } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } void OFormattedFieldWrapper::ensureAggregate() @@ -333,12 +333,12 @@ void OFormattedFieldWrapper::ensureAggregate() } } - increment(m_refCount); + osl_atomic_increment(&m_refCount); if (m_xAggregate.is()) { // has to be in it's own block because of the temporary variable created by *this m_xAggregate->setDelegator(static_cast<XWeak*>(this)); } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx index 8f6a40f2bfc4..b8eedbd82f66 100644 --- a/forms/source/component/GroupManager.cxx +++ b/forms/source/component/GroupManager.cxx @@ -21,7 +21,7 @@ #include <com/sun/star/beans/XFastPropertySet.hpp> #include <com/sun/star/form/FormComponentType.hpp> #include <comphelper/property.hxx> -#include <comphelper/uno3.hxx> +#include <osl/diagnose.h> #include <tools/solar.h> #include "property.hrc" @@ -203,11 +203,11 @@ OGroupManager::OGroupManager(const Reference< XContainer >& _rxContainer) :m_pCompGroup( new OGroup( OUString("AllComponentGroup") ) ) ,m_xContainer(_rxContainer) { - increment(m_refCount); + osl_atomic_increment(&m_refCount); { _rxContainer->addContainerListener(this); } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } OGroupManager::~OGroupManager() diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx index 4889d9d8f274..7a677d5b2f1f 100644 --- a/forms/source/component/ImageButton.cxx +++ b/forms/source/component/ImageButton.cxx @@ -164,7 +164,7 @@ StringSequence OImageButtonControl::getSupportedServiceNames() throw(std::excep OImageButtonControl::OImageButtonControl(const Reference<XComponentContext>& _rxFactory) :OClickableImageBaseControl(_rxFactory, VCL_CONTROL_IMAGEBUTTON) { - increment(m_refCount); + osl_atomic_increment(&m_refCount); { // Register as MouseListener Reference< awt::XWindow > xComp; @@ -172,7 +172,7 @@ OImageButtonControl::OImageButtonControl(const Reference<XComponentContext>& _rx if (xComp.is()) xComp->addMouseListener( static_cast< awt::XMouseListener* >( this ) ); } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } // UNO Binding diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index e3789cf92030..8f66e1b91fb6 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -697,7 +697,7 @@ OImageControlControl::OImageControlControl(const Reference<XComponentContext>& _ :OBoundControl(_rxFactory, VCL_CONTROL_IMAGECONTROL) ,m_aModifyListeners( m_aMutex ) { - increment(m_refCount); + osl_atomic_increment(&m_refCount); { // Add as Focus- and MouseListener Reference< XWindow > xComp; @@ -705,7 +705,7 @@ OImageControlControl::OImageControlControl(const Reference<XComponentContext>& _ if ( xComp.is() ) xComp->addMouseListener( this ); } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index f9d856b28ecc..5c8fd838e002 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1770,7 +1770,7 @@ namespace frm ,m_aItemListeners( m_aMutex ) { - increment(m_refCount); + osl_atomic_increment(&m_refCount); { // Register as FocusListener Reference<XWindow> xComp; @@ -1782,7 +1782,7 @@ namespace frm m_xAggregateListBox->addItemListener(this); } // Refcount at 2 for registered Listener - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); doSetDelegator(); diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index 796335772f4a..f8c178a29501 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -497,7 +497,7 @@ namespace frm void OClickableImageBaseModel::implConstruct() { m_pProducer = new ImageProducer; - increment( m_refCount ); + osl_atomic_increment( &m_refCount ); { m_xProducer = m_pProducer; @@ -507,7 +507,7 @@ namespace frm pMultiplexer->addProperty( PROPERTY_IMAGE_URL ); } } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index 7db6a9f5e633..313c28ff20cd 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -142,7 +142,7 @@ namespace frm void ORichTextModel::implDoAggregation() { - increment( m_refCount ); + osl_atomic_increment( &m_refCount ); { m_xAggregate = new ORichTextUnoWrapper( *m_pEngine, this ); @@ -150,7 +150,7 @@ namespace frm doSetDelegator(); } - decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); } diff --git a/include/comphelper/uno3.hxx b/include/comphelper/uno3.hxx index 62f3e7c644f7..eae94a5866f5 100644 --- a/include/comphelper/uno3.hxx +++ b/include/comphelper/uno3.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_COMPHELPER_UNO3_HXX #define INCLUDED_COMPHELPER_UNO3_HXX -#include <osl/interlck.h> #include <rtl/instance.hxx> #include <comphelper/types.hxx> #include <com/sun/star/uno/XAggregation.hpp> @@ -30,16 +29,6 @@ namespace comphelper { - - - - - /// manipulate ref counts without calling acquire/release - inline oslInterlockedCount increment(oslInterlockedCount& _counter) { return osl_atomic_increment(&_counter); } - inline oslInterlockedCount decrement(oslInterlockedCount& _counter) { return osl_atomic_decrement(&_counter); } - - - /** used for declaring UNO3-Defaults, i.e. acquire/release */ #define DECLARE_UNO3_DEFAULTS(classname, baseclass) \ diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx index ff084b900688..cf99598f3f49 100644 --- a/sc/source/ui/unoobj/dispuno.cxx +++ b/sc/source/ui/unoobj/dispuno.cxx @@ -18,7 +18,6 @@ */ #include <sfx2/viewfrm.hxx> -#include <comphelper/uno3.hxx> #include <svx/dataaccessdescriptor.hxx> #include <svl/smplhint.hxx> #include <vcl/svapp.hxx> @@ -58,7 +57,7 @@ ScDispatchProviderInterceptor::ScDispatchProviderInterceptor(ScTabViewShell* pVi m_xIntercepted.set(uno::Reference<frame::XDispatchProviderInterception>(pViewShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY)); if (m_xIntercepted.is()) { - comphelper::increment( m_refCount ); + osl_atomic_increment( &m_refCount ); m_xIntercepted->registerDispatchProviderInterceptor( static_cast<frame::XDispatchProviderInterceptor*>(this)); @@ -68,7 +67,7 @@ ScDispatchProviderInterceptor::ScDispatchProviderInterceptor(ScTabViewShell* pVi if (xInterceptedComponent.is()) xInterceptedComponent->addEventListener(static_cast<lang::XEventListener*>(this)); - comphelper::decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); } StartListening(*pViewShell); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 6bbc54010a72..2c84022e5c96 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -394,7 +394,7 @@ uno::Reference< uno::XAggregation> ScModelObj::GetFormatter() { // setDelegator veraendert den RefCount, darum eine Referenz selber halten // (direkt am m_refCount, um sich beim release nicht selbst zu loeschen) - comphelper::increment( m_refCount ); + osl_atomic_increment( &m_refCount ); // waehrend des queryInterface braucht man ein Ref auf das // SvNumberFormatsSupplierObj, sonst wird es geloescht. uno::Reference<util::XNumberFormatsSupplier> xFormatter(new SvNumberFormatsSupplierObj(pDocShell->GetDocument().GetFormatTable() )); @@ -408,7 +408,7 @@ uno::Reference< uno::XAggregation> ScModelObj::GetFormatter() if (xNumberAgg.is()) xNumberAgg->setDelegator( (cppu::OWeakObject*)this ); - comphelper::decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); } // if ( !xNumberAgg.is() ) return xNumberAgg; } diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 43754db37c4a..432950168a53 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -19,7 +19,7 @@ #include <sal/config.h> -#include <comphelper/uno3.hxx> +#include <comphelper/sequence.hxx> #include <svtools/unoevent.hxx> #include <svtools/unoimap.hxx> #include <svx/svdobj.hxx> @@ -96,7 +96,7 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) : bIsNoteCaption(false), bInitializedNotifier(false) { - comphelper::increment( m_refCount ); + osl_atomic_increment( &m_refCount ); { mxShapeAgg = uno::Reference<uno::XAggregation>( xShape, uno::UNO_QUERY ); @@ -124,7 +124,7 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) : } } - comphelper::decrement( m_refCount ); + osl_atomic_decrement( &m_refCount ); } ScShapeObj::~ScShapeObj() diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index e03d9a076051..c82c85e78231 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -654,10 +654,10 @@ FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame ) m_xAttachedFrame = _pViewFrame->GetFrame().GetFrameInterface(); // to prevent deletion of this we acquire our refcounter once - ::comphelper::increment(FmXFormShell_BASE::m_refCount); + osl_atomic_increment(&m_refCount); // correct the refcounter - ::comphelper::decrement(FmXFormShell_BASE::m_refCount); + osl_atomic_decrement(&m_refCount); // cache the current configuration settings we're interested in implAdjustConfigCache(); diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 04fddee8576e..90daba66ed28 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -71,7 +71,6 @@ #include <comphelper/propagg.hxx> #include <comphelper/property.hxx> #include <comphelper/sequence.hxx> -#include <comphelper/uno3.hxx> #include <comphelper/flagguard.hxx> #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/supportsservice.hxx> @@ -570,13 +569,13 @@ FormController::FormController(const Reference< css::uno::XComponentContext > & ,m_bSuspendFilterTextListening( false ) { - ::comphelper::increment(m_refCount); + osl_atomic_increment(&m_refCount); { m_xTabController = TabController::create( m_xComponentContext ); m_xAggregate = Reference< XAggregation >( m_xTabController, UNO_QUERY_THROW ); m_xAggregate->setDelegator( *this ); } - ::comphelper::decrement(m_refCount); + osl_atomic_decrement(&m_refCount); m_aTabActivationIdle.SetPriority( SchedulerPriority::LOWEST ); m_aTabActivationIdle.SetIdleHdl( LINK( this, FormController, OnActivateTabOrder ) ); diff --git a/svx/source/form/formdispatchinterceptor.cxx b/svx/source/form/formdispatchinterceptor.cxx index 603f27421f1b..318fa8e116cd 100644 --- a/svx/source/form/formdispatchinterceptor.cxx +++ b/svx/source/form/formdispatchinterceptor.cxx @@ -52,7 +52,7 @@ namespace svxform { ::osl::MutexGuard aGuard( *m_pMutex ); - ::comphelper::increment(m_refCount); + osl_atomic_increment(&m_refCount); if (_rxToIntercept.is()) { _rxToIntercept->registerDispatchProviderInterceptor((XDispatchProviderInterceptor*)this); @@ -65,7 +65,7 @@ namespace svxform m_bListening = true; } } - ::comphelper::decrement(m_refCount); + osl_atomic_decrement(&m_refCount); } diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx index f184213d987b..ac09345fab3b 100644 --- a/toolkit/source/controls/geometrycontrolmodel.cxx +++ b/toolkit/source/controls/geometrycontrolmodel.cxx @@ -83,7 +83,7 @@ { OSL_ENSURE(NULL != _pAggregateInstance, "OGeometryControlModel_Base::OGeometryControlModel_Base: invalid aggregate!"); - increment(m_refCount); + osl_atomic_increment(&m_refCount); { m_xAggregate = _pAggregateInstance; @@ -95,7 +95,7 @@ setAggregation(m_xAggregate); m_xAggregate->setDelegator(static_cast< XWeak* >(this)); } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); registerProperties(); } @@ -113,7 +113,7 @@ ,m_nStep(0) ,m_bCloneable(_rxAggregateInstance.is()) { - increment(m_refCount); + osl_atomic_increment(&m_refCount); { { // ensure that the temporary gets destructed NOW @@ -128,7 +128,7 @@ setAggregation(m_xAggregate); m_xAggregate->setDelegator(static_cast< XWeak* >(this)); } - decrement(m_refCount); + osl_atomic_decrement(&m_refCount); registerProperties(); } |