diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2016-12-12 18:42:08 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-13 06:06:57 +0000 |
commit | ba6b35fc68a01aff72b39eb7809bacb326068668 (patch) | |
tree | 18dba25326b3f195be655ee66ed1ead6ed7c1bce /accessibility/inc/extended | |
parent | 08fa2e9307c9e4a49e18ecb0b4e9461492122fe3 (diff) |
accessibility: cleanup AccessibleBrowseBoxBase implementation
Change-Id: I5c9b96e2ebd2ac98dfa610346c1da89fbf56e2d2
Reviewed-on: https://gerrit.libreoffice.org/31916
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility/inc/extended')
-rw-r--r-- | accessibility/inc/extended/AccessibleBrowseBoxBase.hxx | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx b/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx index cce60b74a8d6..a3f0575b3f32 100644 --- a/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx +++ b/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx @@ -283,10 +283,6 @@ protected: // internal helper methods - /** @throws <type>DisposedException</type> If the object is not alive. */ - void ensureIsAlive() const - throw ( css::lang::DisposedException ); - /** @return The osl::Mutex member provided by the class BaseMutex. */ inline ::osl::Mutex& getOslMutex(); @@ -309,11 +305,13 @@ protected: void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; } public: - // public versions of internal helper methods, with access control - struct AccessControl { friend class SolarMethodGuard; private: AccessControl() { } }; + /** @return The osl::Mutex member provided by the class BaseMutex. */ + inline ::osl::Mutex& getMutex( ) { return m_aMutex; } + + /** @throws <type>DisposedException</type> If the object is not alive. */ + void ensureIsAlive() const + throw ( css::lang::DisposedException ); - inline ::osl::Mutex& getMutex( const AccessControl& ) { return getOslMutex(); } - inline void ensureIsAlive( const AccessControl& ) { ensureIsAlive(); } protected: // members @@ -408,17 +406,15 @@ protected: // a helper class for protecting methods which need to lock the solar mutex in addition to the own mutex -typedef ::osl::MutexGuard OslMutexGuard; - -class SolarMethodGuard : public SolarMutexGuard, public OslMutexGuard +class SolarMethodGuard : public SolarMutexGuard, public osl::MutexGuard { public: inline SolarMethodGuard( AccessibleBrowseBoxBase& _rOwner, bool _bEnsureAlive = true ) :SolarMutexGuard( ) - ,OslMutexGuard( _rOwner.getMutex( AccessibleBrowseBoxBase::AccessControl() ) ) + ,osl::MutexGuard( _rOwner.getMutex( ) ) { if ( _bEnsureAlive ) - _rOwner.ensureIsAlive( AccessibleBrowseBoxBase::AccessControl() ); + _rOwner.ensureIsAlive( ); } }; @@ -429,11 +425,6 @@ inline ::svt::AccessibleBrowseBoxObjType AccessibleBrowseBoxBase::getType() cons return meObjType; } -inline ::osl::Mutex& AccessibleBrowseBoxBase::getOslMutex() -{ - return m_aMutex; -} - inline void AccessibleBrowseBoxBase::implSetName( const OUString& rName ) { |