diff options
Diffstat (limited to 'sw/source/core/access/acccell.cxx')
-rw-r--r-- | sw/source/core/access/acccell.cxx | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index f4cf864b7217..dbd1b5196593 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,7 +30,7 @@ #include "precompiled_sw.hxx" -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <com/sun/star/accessibility/AccessibleRole.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> @@ -99,8 +100,8 @@ void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet ) if( IsSelected() ) { rStateSet.AddState( AccessibleStateType::SELECTED ); - ASSERT( bIsSelected, "bSelected out of sync" ); - ::vos::ORef < SwAccessibleContext > xThis( this ); + OSL_ENSURE( bIsSelected, "bSelected out of sync" ); + ::rtl::Reference < SwAccessibleContext > xThis( this ); GetMap()->SetCursorContext( xThis ); } } @@ -110,7 +111,7 @@ SwAccessibleCell::SwAccessibleCell( SwAccessibleMap *pInitMap, : SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrm ) , bIsSelected( sal_False ) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; OUString sBoxName( pCellFrm->GetTabBox()->GetName() ); SetName( sBoxName ); @@ -122,7 +123,7 @@ sal_Bool SwAccessibleCell::_InvalidateMyCursorPos() sal_Bool bNew = IsSelected(); sal_Bool bOld; { - vos::OGuard aGuard( aMutex ); + osl::MutexGuard aGuard( aMutex ); bOld = bIsSelected; bIsSelected = bNew; } @@ -130,7 +131,7 @@ sal_Bool SwAccessibleCell::_InvalidateMyCursorPos() { // remember that object as the one that has the caret. This is // neccessary to notify that object if the cursor leaves it. - ::vos::ORef < SwAccessibleContext > xThis( this ); + ::rtl::Reference < SwAccessibleContext > xThis( this ); GetMap()->SetCursorContext( xThis ); } @@ -155,14 +156,14 @@ sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm ) { if( rLower.IsAccessible( GetMap()->GetShell()->IsPreView() ) ) { - ::vos::ORef< SwAccessibleContext > xAccImpl( + ::rtl::Reference< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pLower, sal_False ) ); - if( xAccImpl.isValid() ) + if( xAccImpl.is() ) { - ASSERT( xAccImpl->GetFrm()->IsCellFrm(), - "table child is not a cell frame" ) + OSL_ENSURE( xAccImpl->GetFrm()->IsCellFrm(), + "table child is not a cell frame" ); bChanged |= static_cast< SwAccessibleCell *>( - xAccImpl.getBodyPtr() )->_InvalidateMyCursorPos(); + xAccImpl.get() )->_InvalidateMyCursorPos(); } else bChanged = sal_True; // If the context is not know we @@ -185,7 +186,7 @@ void SwAccessibleCell::_InvalidateCursorPos() { const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); - ASSERT( pParent->IsTabFrm(), "parent is not a tab frame" ); + OSL_ENSURE( pParent->IsTabFrm(), "parent is not a tab frame" ); const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( pParent ); if( pTabFrm->IsFollow() ) pTabFrm = pTabFrm->FindMaster(); @@ -195,9 +196,9 @@ void SwAccessibleCell::_InvalidateCursorPos() sal_Bool bChanged = _InvalidateChildrenCursorPos( pTabFrm ); if( bChanged ) { - ::vos::ORef< SwAccessibleContext > xAccImpl( + ::rtl::Reference< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pTabFrm, sal_False ) ); - if( xAccImpl.isValid() ) + if( xAccImpl.is() ) { AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::SELECTION_CHANGED; @@ -211,7 +212,7 @@ void SwAccessibleCell::_InvalidateCursorPos() sal_Bool SwAccessibleCell::HasCursor() { - vos::OGuard aGuard( aMutex ); + osl::MutexGuard aGuard( aMutex ); return bIsSelected; } @@ -254,9 +255,9 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames() void SwAccessibleCell::Dispose( sal_Bool bRecursive ) { const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); - ::vos::ORef< SwAccessibleContext > xAccImpl( + ::rtl::Reference< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pParent, sal_False ) ); - if( xAccImpl.isValid() ) + if( xAccImpl.is() ) xAccImpl->DisposeChild( SwAccessibleChild(GetFrm()), bRecursive ); SwAccessibleContext::Dispose( bRecursive ); } @@ -264,9 +265,9 @@ void SwAccessibleCell::Dispose( sal_Bool bRecursive ) void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox ) { const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); - ::vos::ORef< SwAccessibleContext > xAccImpl( + ::rtl::Reference< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pParent, sal_False ) ); - if( xAccImpl.isValid() ) + if( xAccImpl.is() ) xAccImpl->InvalidateChildPosOrSize( SwAccessibleChild(GetFrm()), rOldBox ); SwAccessibleContext::InvalidatePosOrSize( rOldBox ); } @@ -308,7 +309,7 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleCell::getTypes() uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleCell::getImplementationId() throw(uno::RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; static uno::Sequence< sal_Int8 > aId( 16 ); static sal_Bool bInit = sal_False; if(!bInit) @@ -334,7 +335,7 @@ SwFrmFmt* SwAccessibleCell::GetTblBoxFormat() const uno::Any SwAccessibleCell::getCurrentValue( ) throw( uno::RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; CHECK_FOR_DEFUNC( XAccessibleValue ); uno::Any aAny; @@ -345,7 +346,7 @@ uno::Any SwAccessibleCell::getCurrentValue( ) sal_Bool SwAccessibleCell::setCurrentValue( const uno::Any& aNumber ) throw( uno::RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; CHECK_FOR_DEFUNC( XAccessibleValue ); double fValue = 0; @@ -373,3 +374,5 @@ uno::Any SwAccessibleCell::getMinimumValue( ) aAny <<= -DBL_MAX; return aAny; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |