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 | |
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')
11 files changed, 99 insertions, 108 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 ) { diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx index 73e982370992..fea99659c7aa 100644 --- a/accessibility/source/extended/AccessibleBrowseBox.cxx +++ b/accessibility/source/extended/AccessibleBrowseBox.cxx @@ -85,7 +85,7 @@ AccessibleBrowseBox::~AccessibleBrowseBox() void SAL_CALL AccessibleBrowseBox::disposing() { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); m_xImpl->m_pTable = nullptr; m_xImpl->m_pColumnHeaderBar = nullptr; @@ -113,7 +113,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBox::getAccessibleChildCount() throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return BBINDEX_FIRSTCONTROL + mpBrowseBox->GetAccessibleControlCount(); } @@ -124,7 +124,7 @@ AccessibleBrowseBox::getAccessibleChild( sal_Int32 nChildIndex ) throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); css::uno::Reference< css::accessibility::XAccessible > xRet; @@ -153,7 +153,7 @@ AccessibleBrowseBox::getAccessibleAtPoint( const awt::Point& rPoint ) throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); css::uno::Reference< css::accessibility::XAccessible > xChild; @@ -184,7 +184,7 @@ void SAL_CALL AccessibleBrowseBox::grabFocus() throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); mpBrowseBox->GrabFocus(); } diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx index 1ff3c7558e26..a13e23ff8c08 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx @@ -94,7 +94,7 @@ AccessibleBrowseBoxBase::~AccessibleBrowseBoxBase() void SAL_CALL AccessibleBrowseBoxBase::disposing() { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); if ( m_xFocusWindow.is() ) { SolarMutexGuard aSolarGuard; @@ -117,7 +117,7 @@ void SAL_CALL AccessibleBrowseBoxBase::disposing() Reference< css::accessibility::XAccessible > SAL_CALL AccessibleBrowseBoxBase::getAccessibleParent() throw ( uno::RuntimeException, std::exception ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return mxParent; } @@ -125,7 +125,7 @@ Reference< css::accessibility::XAccessible > SAL_CALL AccessibleBrowseBoxBase::g sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getAccessibleIndexInParent() throw ( uno::RuntimeException, std::exception ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); // -1 for child not found/no parent (according to specification) @@ -161,7 +161,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getAccessibleIndexInParent() OUString SAL_CALL AccessibleBrowseBoxBase::getAccessibleDescription() throw ( uno::RuntimeException, std::exception ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return maDescription; } @@ -169,7 +169,7 @@ OUString SAL_CALL AccessibleBrowseBoxBase::getAccessibleDescription() OUString SAL_CALL AccessibleBrowseBoxBase::getAccessibleName() throw ( uno::RuntimeException, std::exception ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return maName; } @@ -188,7 +188,7 @@ AccessibleBrowseBoxBase::getAccessibleStateSet() throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); // don't check whether alive -> StateSet may contain DEFUNC return implCreateStateSetHelper(); } @@ -196,7 +196,7 @@ AccessibleBrowseBoxBase::getAccessibleStateSet() lang::Locale SAL_CALL AccessibleBrowseBoxBase::getLocale() throw ( IllegalAccessibleComponentStateException, uno::RuntimeException, std::exception ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); if( mxParent.is() ) { @@ -266,7 +266,7 @@ void SAL_CALL AccessibleBrowseBoxBase::addAccessibleEventListener( { if ( _rxListener.is() ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); if ( !getClientId( ) ) setClientId( AccessibleEventNotifier::registerClient( ) ); @@ -280,7 +280,7 @@ void SAL_CALL AccessibleBrowseBoxBase::removeAccessibleEventListener( { if( _rxListener.is() && getClientId( ) ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener( getClientId( ), _rxListener ); if ( !nListenerCount ) { @@ -324,7 +324,7 @@ Sequence< OUString > SAL_CALL AccessibleBrowseBoxBase::getSupportedServiceNames( void AccessibleBrowseBoxBase::setAccessibleName( const OUString& rName ) { - ::osl::ClearableMutexGuard aGuard( getOslMutex() ); + ::osl::ClearableMutexGuard aGuard( getMutex() ); Any aOld; aOld <<= maName; maName = rName; @@ -339,7 +339,7 @@ void AccessibleBrowseBoxBase::setAccessibleName( const OUString& rName ) void AccessibleBrowseBoxBase::setAccessibleDescription( const OUString& rDescription ) { - ::osl::ClearableMutexGuard aGuard( getOslMutex() ); + ::osl::ClearableMutexGuard aGuard( getMutex() ); Any aOld; aOld <<= maDescription; maDescription = rDescription; @@ -405,7 +405,7 @@ Rectangle AccessibleBrowseBoxBase::getBoundingBox() throw ( lang::DisposedException ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); Rectangle aRect = implGetBoundingBox(); if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() ) @@ -419,7 +419,7 @@ Rectangle AccessibleBrowseBoxBase::getBoundingBoxOnScreen() throw ( lang::DisposedException ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); Rectangle aRect = implGetBoundingBoxOnScreen(); if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() ) @@ -432,7 +432,7 @@ Rectangle AccessibleBrowseBoxBase::getBoundingBoxOnScreen() void AccessibleBrowseBoxBase::commitEvent( sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue ) { - ::osl::ClearableMutexGuard aGuard( getOslMutex() ); + ::osl::ClearableMutexGuard aGuard( getMutex() ); if ( !getClientId( ) ) // if we don't have a client id for the notifier, then we don't have listeners, then // we don't need to notify anything @@ -495,7 +495,7 @@ void SAL_CALL AccessibleBrowseBoxBase::disposing( const css::lang::EventObject& sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getForeground( ) throw (css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); sal_Int32 nColor = 0; @@ -521,7 +521,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getForeground( ) throw (css::uno::R sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getBackground( ) throw (css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); sal_Int32 nColor = 0; vcl::Window* pInst = mpBrowseBox->GetWindowInstance(); diff --git a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx index da37ca0baf0a..c8490babdcc8 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx @@ -68,7 +68,7 @@ namespace accessibility Any SAL_CALL AccessibleCheckBoxCell::getCurrentValue( ) throw (RuntimeException, std::exception) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); sal_Int32 nValue = 0; switch( m_eState ) @@ -93,7 +93,7 @@ namespace accessibility Any SAL_CALL AccessibleCheckBoxCell::getMaximumValue( ) throw (RuntimeException, std::exception) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); Any aValue; @@ -132,7 +132,7 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleCheckBoxCell::getAccessibleIndexInParent() throw ( css::uno::RuntimeException, std::exception ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return ( getRowPos() * mpBrowseBox->GetColumnCount() ) + getColumnPos(); } diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx index 7cdefc5274a3..eb1d0ca2823d 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx @@ -57,7 +57,7 @@ AccessibleBrowseBoxHeaderBar::getAccessibleChild( sal_Int32 nChildIndex ) throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidHeaderIndex( nChildIndex ); return implGetChild( nChildIndex, implToVCLColumnPos( nChildIndex ) ); @@ -76,7 +76,7 @@ AccessibleBrowseBoxHeaderBar::getAccessibleAtPoint( const awt::Point& rPoint ) throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); sal_Int32 nRow = 0; @@ -101,7 +101,7 @@ OUString SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleRowDescription( sal throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidRow( nRow ); return OUString(); // no headers in headers @@ -111,7 +111,7 @@ OUString SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleColumnDescription( throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidColumn( nColumn ); return OUString(); // no headers in headers @@ -135,7 +135,7 @@ Sequence< sal_Int32 > SAL_CALL AccessibleBrowseBoxHeaderBar::getSelectedAccessib throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); Sequence< sal_Int32 > aSelSeq; @@ -149,7 +149,7 @@ Sequence< sal_Int32 > SAL_CALL AccessibleBrowseBoxHeaderBar::getSelectedAccessib throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); Sequence< sal_Int32 > aSelSeq; @@ -163,7 +163,7 @@ sal_Bool SAL_CALL AccessibleBrowseBoxHeaderBar::isAccessibleRowSelected( sal_Int throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidRow( nRow ); return isRowBar() && implIsRowSelected( nRow ); @@ -173,7 +173,7 @@ sal_Bool SAL_CALL AccessibleBrowseBoxHeaderBar::isAccessibleColumnSelected( sal_ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidColumn( nColumn ); return isColumnBar() && implIsColumnSelected( nColumn ); @@ -184,7 +184,7 @@ Reference< XAccessible > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleCel throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidAddress( nRow, nColumn ); return implGetChild( nRow, implToVCLColumnPos( nColumn ) ); @@ -195,7 +195,7 @@ sal_Bool SAL_CALL AccessibleBrowseBoxHeaderBar::isAccessibleSelected( throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidAddress( nRow, nColumn ); return isRowBar() ? implIsRowSelected( nRow ) : implIsColumnSelected( nColumn ); @@ -207,7 +207,7 @@ void SAL_CALL AccessibleBrowseBoxHeaderBar::selectAccessibleChild( sal_Int32 nCh throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidHeaderIndex( nChildIndex ); if( isRowBar() ) @@ -229,7 +229,7 @@ void SAL_CALL AccessibleBrowseBoxHeaderBar::clearAccessibleSelection() throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); mpBrowseBox->SetNoSelection(); } @@ -238,7 +238,7 @@ void SAL_CALL AccessibleBrowseBoxHeaderBar::selectAllAccessibleChildren() throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); // no multiselection of columns possible if( isRowBar() ) @@ -251,7 +251,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxHeaderBar::getSelectedAccessibleChildCount throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return isRowBar() ? implGetSelectedRowCount() : implGetSelectedColumnCount(); } @@ -261,7 +261,7 @@ AccessibleBrowseBoxHeaderBar::getSelectedAccessibleChild( sal_Int32 nSelectedChi throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); // method may throw lang::IndexOutOfBoundsException @@ -274,7 +274,7 @@ void SAL_CALL AccessibleBrowseBoxHeaderBar::deselectAccessibleChild( throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); // method may throw lang::IndexOutOfBoundsException diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx index c40b79885200..af592e25c645 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx @@ -50,7 +50,7 @@ AccessibleBrowseBoxHeaderCell::AccessibleBrowseBoxHeaderCell(sal_Int32 _nColumnR */ ::utl::AccessibleStateSetHelper* AccessibleBrowseBoxHeaderCell::implCreateStateSetHelper() { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ::utl::AccessibleStateSetHelper* pStateSetHelper = new ::utl::AccessibleStateSetHelper; @@ -102,7 +102,7 @@ void SAL_CALL AccessibleBrowseBoxHeaderCell::grabFocus() throw ( css::uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); if ( isRowBarCell() ) mpBrowseBox->SelectRow(m_nColumnRowId); @@ -150,7 +150,7 @@ Rectangle AccessibleBrowseBoxHeaderCell::implGetBoundingBoxOnScreen() sal_Int32 SAL_CALL AccessibleBrowseBoxHeaderCell::getAccessibleIndexInParent() throw ( RuntimeException, std::exception ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); sal_Int32 nIndex = m_nColumnRowId; if ( mpBrowseBox->HasRowHeader() ) diff --git a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx index 4123dd8b0cc9..2585166d5e1d 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx @@ -52,7 +52,7 @@ AccessibleBrowseBoxTable::getAccessibleChild( sal_Int32 nChildIndex ) throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidIndex( nChildIndex ); return mpBrowseBox->CreateAccessibleCell( @@ -73,7 +73,7 @@ AccessibleBrowseBoxTable::getAccessibleAtPoint( const awt::Point& rPoint ) throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); Reference< XAccessible > xChild; @@ -89,7 +89,7 @@ void SAL_CALL AccessibleBrowseBoxTable::grabFocus() throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); mpBrowseBox->GrabTableFocus(); } @@ -100,7 +100,7 @@ OUString SAL_CALL AccessibleBrowseBoxTable::getAccessibleRowDescription( sal_Int throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidRow( nRow ); return mpBrowseBox->GetRowDescription( nRow ); @@ -110,7 +110,7 @@ OUString SAL_CALL AccessibleBrowseBoxTable::getAccessibleColumnDescription( sal_ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidColumn( nColumn ); return mpBrowseBox->GetColumnDescription( (sal_uInt16)nColumn ); @@ -119,7 +119,7 @@ OUString SAL_CALL AccessibleBrowseBoxTable::getAccessibleColumnDescription( sal_ Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxTable::getAccessibleRowHeaders() throw ( uno::RuntimeException, std::exception ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return implGetHeaderBar( BBINDEX_ROWHEADERBAR ); } @@ -127,7 +127,7 @@ Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxTable::getAccessibleRo Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxTable::getAccessibleColumnHeaders() throw ( uno::RuntimeException, std::exception ) { - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return implGetHeaderBar( BBINDEX_COLUMNHEADERBAR ); } @@ -136,7 +136,7 @@ Sequence< sal_Int32 > SAL_CALL AccessibleBrowseBoxTable::getSelectedAccessibleRo throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); Sequence< sal_Int32 > aSelSeq; @@ -148,7 +148,7 @@ Sequence< sal_Int32 > SAL_CALL AccessibleBrowseBoxTable::getSelectedAccessibleCo throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); Sequence< sal_Int32 > aSelSeq; @@ -160,7 +160,7 @@ sal_Bool SAL_CALL AccessibleBrowseBoxTable::isAccessibleRowSelected( sal_Int32 n throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidRow( nRow ); return implIsRowSelected( nRow ); @@ -170,7 +170,7 @@ sal_Bool SAL_CALL AccessibleBrowseBoxTable::isAccessibleColumnSelected( sal_Int3 throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidColumn( nColumn ); return implIsColumnSelected( nColumn ); @@ -181,7 +181,7 @@ Reference< XAccessible > SAL_CALL AccessibleBrowseBoxTable::getAccessibleCellAt( throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidAddress( nRow, nColumn ); return mpBrowseBox->CreateAccessibleCell( nRow, (sal_Int16)nColumn ); @@ -192,7 +192,7 @@ sal_Bool SAL_CALL AccessibleBrowseBoxTable::isAccessibleSelected( throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidAddress( nRow, nColumn ); return implIsRowSelected( nRow ) || implIsColumnSelected( nColumn ); diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx index 5bc990dce7ac..1fa4cbe95f40 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx @@ -56,7 +56,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleChildCount() throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return implGetChildCount(); } @@ -74,7 +74,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleRowCount() throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return implGetRowCount(); } @@ -83,7 +83,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleColumnCount() throw ( uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return implGetColumnCount(); } @@ -93,7 +93,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleRowExtentAt( throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidAddress( nRow, nColumn ); return 1; // merged cells not supported @@ -104,7 +104,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleColumnExtentAt( throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidAddress( nRow, nColumn ); return 1; // merged cells not supported @@ -129,7 +129,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleIndex( throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidAddress( nRow, nColumn ); return nRow * implGetColumnCount() + nColumn; @@ -139,7 +139,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleRow( sal_Int32 nCh throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidIndex( nChildIndex ); return implGetRow( nChildIndex ); @@ -149,7 +149,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleColumn( sal_Int32 throw ( lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureIsValidIndex( nChildIndex ); return implGetColumn( nChildIndex ); diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx index a8b5a5377184..d6d8d1fce312 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx @@ -120,7 +120,7 @@ namespace accessibility css::awt::Rectangle SAL_CALL AccessibleBrowseBoxTableCell::getCharacterBounds( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); if ( !implIsValidIndex( nIndex, implGetText().getLength() ) ) @@ -141,7 +141,7 @@ namespace accessibility //! TODO CTL bidi // OSL_FAIL("Need to be done by base class!"); SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return mpBrowseBox->GetFieldIndexAtPoint( getRowPos(), getColumnPos(), VCLPoint( _aPoint ) ); @@ -180,7 +180,7 @@ namespace accessibility ::utl::AccessibleStateSetHelper* AccessibleBrowseBoxTableCell::implCreateStateSetHelper() { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ::utl::AccessibleStateSetHelper* pStateSetHelper = new ::utl::AccessibleStateSetHelper; @@ -214,7 +214,7 @@ namespace accessibility throw ( css::uno::RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return /*BBINDEX_FIRSTCONTROL*/ m_nOffset + ( getRowPos() * mpBrowseBox->GetColumnCount() ) + getColumnPos(); @@ -227,7 +227,7 @@ namespace accessibility sal_Bool SAL_CALL AccessibleBrowseBoxTableCell::setCaretPosition ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) ) throw IndexOutOfBoundsException(); @@ -237,13 +237,13 @@ namespace accessibility sal_Unicode SAL_CALL AccessibleBrowseBoxTableCell::getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return OCommonAccessibleText::getCharacter( nIndex ); } css::uno::Sequence< css::beans::PropertyValue > SAL_CALL AccessibleBrowseBoxTableCell::getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); OUString sText( implGetText() ); @@ -255,32 +255,32 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getCharacterCount( ) throw (css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return OCommonAccessibleText::getCharacterCount( ); } OUString SAL_CALL AccessibleBrowseBoxTableCell::getSelectedText( ) throw (css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return OCommonAccessibleText::getSelectedText( ); } sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getSelectionStart( ) throw (css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return OCommonAccessibleText::getSelectionStart( ); } sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getSelectionEnd( ) throw (css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return OCommonAccessibleText::getSelectionEnd( ); } sal_Bool SAL_CALL AccessibleBrowseBoxTableCell::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); if ( !implIsValidRange( nStartIndex, nEndIndex, implGetText().getLength() ) ) throw IndexOutOfBoundsException(); @@ -289,37 +289,37 @@ namespace accessibility OUString SAL_CALL AccessibleBrowseBoxTableCell::getText( ) throw (css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return OCommonAccessibleText::getText( ); } OUString SAL_CALL AccessibleBrowseBoxTableCell::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return OCommonAccessibleText::getTextRange( nStartIndex, nEndIndex ); } css::accessibility::TextSegment SAL_CALL AccessibleBrowseBoxTableCell::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return OCommonAccessibleText::getTextAtIndex( nIndex ,aTextType); } css::accessibility::TextSegment SAL_CALL AccessibleBrowseBoxTableCell::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return OCommonAccessibleText::getTextBeforeIndex( nIndex ,aTextType); } css::accessibility::TextSegment SAL_CALL AccessibleBrowseBoxTableCell::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); return OCommonAccessibleText::getTextBehindIndex( nIndex ,aTextType); } sal_Bool SAL_CALL AccessibleBrowseBoxTableCell::copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); OUString sText = implGetText(); checkIndex_Impl( nStartIndex, sText ); checkIndex_Impl( nEndIndex, sText ); diff --git a/accessibility/source/extended/accessibletablistbox.cxx b/accessibility/source/extended/accessibletablistbox.cxx index b92d0d82dbce..4437291a84d1 100644 --- a/accessibility/source/extended/accessibletablistbox.cxx +++ b/accessibility/source/extended/accessibletablistbox.cxx @@ -92,7 +92,7 @@ namespace accessibility throw ( IndexOutOfBoundsException, RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); if ( nChildIndex < 0 || nChildIndex > 1 ) diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx index 6b73a4a09b47..2536ba06943e 100644 --- a/accessibility/source/extended/accessibletablistboxtable.cxx +++ b/accessibility/source/extended/accessibletablistboxtable.cxx @@ -321,7 +321,7 @@ namespace accessibility void SAL_CALL AccessibleTabListBoxTable::selectAccessibleChild( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureValidIndex( nChildIndex ); @@ -332,7 +332,7 @@ namespace accessibility sal_Bool SAL_CALL AccessibleTabListBoxTable::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureValidIndex( nChildIndex ); @@ -343,7 +343,7 @@ namespace accessibility void SAL_CALL AccessibleTabListBoxTable::clearAccessibleSelection( ) throw (RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); @@ -353,7 +353,7 @@ namespace accessibility void SAL_CALL AccessibleTabListBoxTable::selectAllAccessibleChildren( ) throw (RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); @@ -363,7 +363,7 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleTabListBoxTable::getSelectedAccessibleChildCount( ) throw (RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); @@ -373,7 +373,7 @@ namespace accessibility Reference< XAccessible > SAL_CALL AccessibleTabListBoxTable::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); @@ -389,7 +389,7 @@ namespace accessibility void SAL_CALL AccessibleTabListBoxTable::deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); ensureValidIndex( nSelectedChildIndex ); |