diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-07 16:34:23 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-07 16:35:21 +0100 |
commit | 27a166bcb8bdf56efff987b08895d2c676125426 (patch) | |
tree | 6cf088c699f4037bdfe0ee69c3cc9e4e61545db1 /stoc | |
parent | 1079ccf05b1441649a8232e2ed112e4fceed5943 (diff) |
Just use WeakImplHelper1 instead of ImplHelper1
Change-Id: Iadc5960ef22289c044a0c85accaefb4f60b6097f
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/security/access_controller.cxx | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index 4fc3de1955a8..721b095693a8 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -21,7 +21,6 @@ #include <vector> #include <osl/diagnose.h> -#include <osl/interlck.h> #include <osl/mutex.hxx> #include <osl/thread.hxx> @@ -217,10 +216,8 @@ void acc_Policy::checkPermission( /** current context overriding dynamic ac restriction */ class acc_CurrentContext - : public ImplHelper1< XCurrentContext > + : public WeakImplHelper1< XCurrentContext > { - oslInterlockedCount m_refcount; - Reference< XCurrentContext > m_xDelegate; Any m_restriction; @@ -228,13 +225,6 @@ public: inline acc_CurrentContext( Reference< XCurrentContext > const & xDelegate, Reference< security::XAccessControlContext > const & xRestriction ); - virtual ~acc_CurrentContext(); - - // XInterface impl - virtual void SAL_CALL acquire() - throw () SAL_OVERRIDE; - virtual void SAL_CALL release() - throw () SAL_OVERRIDE; // XCurrentContext impl virtual Any SAL_CALL getValueByName( OUString const & name ) @@ -244,8 +234,7 @@ public: inline acc_CurrentContext::acc_CurrentContext( Reference< XCurrentContext > const & xDelegate, Reference< security::XAccessControlContext > const & xRestriction ) - : m_refcount( 0 ) - , m_xDelegate( xDelegate ) + : m_xDelegate( xDelegate ) { if (xRestriction.is()) { @@ -254,24 +243,6 @@ inline acc_CurrentContext::acc_CurrentContext( // return empty any otherwise on getValueByName(), not null interface } -acc_CurrentContext::~acc_CurrentContext() -{} - -void acc_CurrentContext::acquire() - throw () -{ - osl_atomic_increment( &m_refcount ); -} - -void acc_CurrentContext::release() - throw () -{ - if (! osl_atomic_decrement( &m_refcount )) - { - delete this; - } -} - Any acc_CurrentContext::getValueByName( OUString const & name ) throw (RuntimeException, std::exception) { |