From f3fc127dc007f32355859ae4fc7d34916c500a18 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 7 Apr 2019 16:00:31 +0100 Subject: Use osl_atomic_increment/osl_atomic_decrement to change m_refCount Change-Id: Ia24441d3671102fdeeb797547396c25ee2a6ffd3 Reviewed-on: https://gerrit.libreoffice.org/70382 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- UnoControls/source/controls/progressmonitor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'UnoControls/source/controls/progressmonitor.cxx') diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index 23451ac5c2a9..2c728cb7ae5a 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -48,7 +48,7 @@ ProgressMonitor::ProgressMonitor( const css::uno::Reference< XComponentContext > { // It's not allowed to work with member in this method (refcounter !!!) // But with a HACK (++refcount) its "OK" :-( - ++m_refCount; + osl_atomic_increment(&m_refCount); // Create instances for fixedtext, button and progress ... @@ -94,7 +94,7 @@ ProgressMonitor::ProgressMonitor( const css::uno::Reference< XComponentContext > m_xTopic_Bottom->setText ( PROGRESSMONITOR_DEFAULT_TOPIC ); m_xText_Bottom->setText ( PROGRESSMONITOR_DEFAULT_TEXT ); - --m_refCount; + osl_atomic_decrement(&m_refCount); } ProgressMonitor::~ProgressMonitor() -- cgit