diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-07 16:00:31 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-08 05:32:56 +0200 |
commit | f3fc127dc007f32355859ae4fc7d34916c500a18 (patch) | |
tree | 799ee5af2c1a31c6c2243444caa932a6b2520e1b /sc | |
parent | 817e3447053d1a7465a5cf547b4eb39fc46b4d59 (diff) |
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index c87a185a9913..e1c0eb5dd941 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -1409,12 +1409,12 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) : { // this is a hack to get m_wThis initialized; ideally there would be // factory functions doing this but there are so many subclasses of this... - ++m_refCount; + osl_atomic_increment(&m_refCount); { m_wThis = uno::Reference<uno::XInterface>( static_cast<cppu::OWeakObject*>(this)); } - --m_refCount; + osl_atomic_decrement(&m_refCount); ScRange aCellRange(rR); aCellRange.PutInOrder(); @@ -1441,12 +1441,12 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR) : { // this is a hack to get m_wThis initialized; ideally there would be // factory functions doing this but there are so many subclasses of this... - ++m_refCount; + osl_atomic_increment(&m_refCount); { m_wThis = uno::Reference<uno::XInterface>( static_cast<cppu::OWeakObject*>(this)); } - --m_refCount; + osl_atomic_decrement(&m_refCount); if (pDocShell) // Null if created with createInstance { |