This is an automated email from the ASF dual-hosted git repository. mseidel pushed a commit to branch AOO42X in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO42X by this push: new d69df03 Fixed mixed style (space/tabs) in indentation d69df03 is described below commit d69df03943523d4cc695854a405ee0f422ccdedf Author: mseidel <msei...@apache.org> AuthorDate: Sun Aug 29 19:38:28 2021 +0200 Fixed mixed style (space/tabs) in indentation (cherry picked from commit f9006ef4b87bbc2754a4a031b45bed067df354e8) --- .../extended/AccessibleBrowseBoxCheckBoxCell.cxx | 75 +++-- .../extended/AccessibleBrowseBoxHeaderBar.cxx | 361 ++++++++++----------- .../extended/AccessibleBrowseBoxHeaderCell.cxx | 24 +- .../source/extended/AccessibleBrowseBoxTable.cxx | 239 +++++++------- .../extended/AccessibleBrowseBoxTableBase.cxx | 263 ++++++++------- .../extended/AccessibleGridControlHeaderCell.cxx | 22 +- .../extended/AccessibleGridControlTableBase.cxx | 233 +++++++------ .../source/extended/accessiblebrowseboxcell.cxx | 16 +- .../extended/accessibleeditbrowseboxcell.cxx | 87 ++--- .../source/extended/accessibleiconchoicectrl.cxx | 1 - .../source/extended/accessibletabbarbase.cxx | 84 ++--- .../source/extended/accessibletablistbox.cxx | 83 +++-- .../source/extended/listboxaccessible.cxx | 32 +- 13 files changed, 750 insertions(+), 770 deletions(-) diff --git a/main/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx b/main/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx index e56b5dd..1b464ce 100644 --- a/main/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx +++ b/main/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -32,7 +32,7 @@ namespace accessibility using namespace com::sun::star::accessibility; using namespace com::sun::star::uno; using namespace com::sun::star::accessibility::AccessibleEventId; - using namespace ::svt; + using namespace ::svt; AccessibleCheckBoxCell::AccessibleCheckBoxCell(const Reference<XAccessible >& _rxParent, IAccessibleTableProvider& _rBrowseBox, @@ -42,7 +42,7 @@ namespace accessibility ,const TriState& _eState, sal_Bool _bEnabled, sal_Bool _bIsTriState) - :AccessibleBrowseBoxCell(_rxParent, _rBrowseBox, _xFocusWindow, _nRowPos, _nColPos, BBTYPE_CHECKBOXCELL) + :AccessibleBrowseBoxCell(_rxParent, _rBrowseBox, _xFocusWindow, _nRowPos, _nColPos, BBTYPE_CHECKBOXCELL) ,m_eState(_eState) ,m_bEnabled(_bEnabled) ,m_bIsTriState(_bIsTriState) @@ -61,16 +61,16 @@ namespace accessibility // ----------------------------------------------------------------------------- ::utl::AccessibleStateSetHelper* AccessibleCheckBoxCell::implCreateStateSetHelper() { - ::utl::AccessibleStateSetHelper* pStateSetHelper = - AccessibleBrowseBoxCell::implCreateStateSetHelper(); - if( isAlive() ) - { - mpBrowseBox->FillAccessibleStateSetForCell( - *pStateSetHelper, getRowPos(), static_cast< sal_uInt16 >( getColumnPos() ) ); - if ( m_eState == STATE_CHECK ) - pStateSetHelper->AddState( AccessibleStateType::CHECKED ); - } - return pStateSetHelper; + ::utl::AccessibleStateSetHelper* pStateSetHelper = + AccessibleBrowseBoxCell::implCreateStateSetHelper(); + if( isAlive() ) + { + mpBrowseBox->FillAccessibleStateSetForCell( + *pStateSetHelper, getRowPos(), static_cast< sal_uInt16 >( getColumnPos() ) ); + if ( m_eState == STATE_CHECK ) + pStateSetHelper->AddState( AccessibleStateType::CHECKED ); + } + return pStateSetHelper; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- @@ -116,7 +116,7 @@ namespace accessibility aValue <<= (sal_Int32) 2; else aValue <<= (sal_Int32) 1; - + return aValue; } @@ -126,7 +126,7 @@ namespace accessibility { Any aValue; aValue <<= (sal_Int32) 0; - + return aValue; } // ----------------------------------------------------------------------------- @@ -145,24 +145,23 @@ namespace accessibility { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.TableCheckBoxCell" ) ); } - // ----------------------------------------------------------------------------- - sal_Int32 SAL_CALL AccessibleCheckBoxCell::getAccessibleIndexInParent() - throw ( ::com::sun::star::uno::RuntimeException ) - { - ::osl::MutexGuard aGuard( getOslMutex() ); - - return ( getRowPos() * mpBrowseBox->GetColumnCount() ) + getColumnPos(); - } - // ----------------------------------------------------------------------------- - void AccessibleCheckBoxCell::SetChecked( sal_Bool _bChecked ) - { - m_eState = _bChecked ? STATE_CHECK : STATE_NOCHECK; - Any aOldValue, aNewValue; - if ( _bChecked ) - aNewValue <<= AccessibleStateType::CHECKED; - else - aOldValue <<= AccessibleStateType::CHECKED; - commitEvent( AccessibleEventId::STATE_CHANGED, aNewValue, aOldValue ); - } -} + // ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL AccessibleCheckBoxCell::getAccessibleIndexInParent() + throw ( ::com::sun::star::uno::RuntimeException ) + { + ::osl::MutexGuard aGuard( getOslMutex() ); + return ( getRowPos() * mpBrowseBox->GetColumnCount() ) + getColumnPos(); + } + // ----------------------------------------------------------------------------- + void AccessibleCheckBoxCell::SetChecked( sal_Bool _bChecked ) + { + m_eState = _bChecked ? STATE_CHECK : STATE_NOCHECK; + Any aOldValue, aNewValue; + if ( _bChecked ) + aNewValue <<= AccessibleStateType::CHECKED; + else + aOldValue <<= AccessibleStateType::CHECKED; + commitEvent( AccessibleEventId::STATE_CHANGED, aNewValue, aOldValue ); + } +} diff --git a/main/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx b/main/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx index 238a493..9542b55 100644 --- a/main/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx +++ b/main/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -51,257 +51,257 @@ namespace accessibility { DBG_NAME( AccessibleBrowseBoxHeaderBar ) AccessibleBrowseBoxHeaderBar::AccessibleBrowseBoxHeaderBar( - const Reference< XAccessible >& rxParent, - IAccessibleTableProvider& rBrowseBox, - AccessibleBrowseBoxObjType eObjType ) : - AccessibleBrowseBoxTableBase( rxParent, rBrowseBox,eObjType ) + const Reference< XAccessible >& rxParent, + IAccessibleTableProvider& rBrowseBox, + AccessibleBrowseBoxObjType eObjType ) : + AccessibleBrowseBoxTableBase( rxParent, rBrowseBox,eObjType ) { - DBG_CTOR( AccessibleBrowseBoxHeaderBar, NULL ); + DBG_CTOR( AccessibleBrowseBoxHeaderBar, NULL ); - DBG_ASSERT( isRowBar() || isColumnBar(), - "accessibility/extended/AccessibleBrowseBoxHeaderBar - invalid object type" ); + DBG_ASSERT( isRowBar() || isColumnBar(), + "accessibility/extended/AccessibleBrowseBoxHeaderBar - invalid object type" ); } AccessibleBrowseBoxHeaderBar::~AccessibleBrowseBoxHeaderBar() { - DBG_DTOR( AccessibleBrowseBoxHeaderBar, NULL ); + DBG_DTOR( AccessibleBrowseBoxHeaderBar, NULL ); } // XAccessibleContext --------------------------------------------------------- Reference< XAccessible > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleChild( sal_Int32 nChildIndex ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidHeaderIndex( nChildIndex ); - return implGetChild( nChildIndex, implToVCLColumnPos( nChildIndex ) ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidHeaderIndex( nChildIndex ); + return implGetChild( nChildIndex, implToVCLColumnPos( nChildIndex ) ); } sal_Int32 SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleIndexInParent() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - return isRowBar() ? BBINDEX_ROWHEADERBAR : BBINDEX_COLUMNHEADERBAR; + return isRowBar() ? BBINDEX_ROWHEADERBAR : BBINDEX_COLUMNHEADERBAR; } // XAccessibleComponent ------------------------------------------------------- Reference< XAccessible > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleAtPoint( const awt::Point& rPoint ) - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); - sal_Int32 nRow = 0; - sal_uInt16 nColumnPos = 0; - sal_Bool bConverted = isRowBar() ? - mpBrowseBox->ConvertPointToRowHeader( nRow, VCLPoint( rPoint ) ) : - mpBrowseBox->ConvertPointToColumnHeader( nColumnPos, VCLPoint( rPoint ) ); + sal_Int32 nRow = 0; + sal_uInt16 nColumnPos = 0; + sal_Bool bConverted = isRowBar() ? + mpBrowseBox->ConvertPointToRowHeader( nRow, VCLPoint( rPoint ) ) : + mpBrowseBox->ConvertPointToColumnHeader( nColumnPos, VCLPoint( rPoint ) ); - return bConverted ? implGetChild( nRow, nColumnPos ) : Reference< XAccessible >(); + return bConverted ? implGetChild( nRow, nColumnPos ) : Reference< XAccessible >(); } void SAL_CALL AccessibleBrowseBoxHeaderBar::grabFocus() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - // focus on header not supported + ensureIsAlive(); + // focus on header not supported } Any SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleKeyBinding() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return Any(); // no special key bindings for header + ensureIsAlive(); + return Any(); // no special key bindings for header } // XAccessibleTable ----------------------------------------------------------- OUString SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleRowDescription( sal_Int32 nRow ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidRow( nRow ); - return OUString(); // no headers in headers + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidRow( nRow ); + return OUString(); // no headers in headers } OUString SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleColumnDescription( sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidColumn( nColumn ); - return OUString(); // no headers in headers + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidColumn( nColumn ); + return OUString(); // no headers in headers } Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleRowHeaders() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return NULL; // no headers in headers + ensureIsAlive(); + return NULL; // no headers in headers } Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleColumnHeaders() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return NULL; // no headers in headers + ensureIsAlive(); + return NULL; // no headers in headers } Sequence< sal_Int32 > SAL_CALL AccessibleBrowseBoxHeaderBar::getSelectedAccessibleRows() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); - Sequence< sal_Int32 > aSelSeq; - // row of column header bar not selectable - if( isRowBar() ) - implGetSelectedRows( aSelSeq ); - return aSelSeq; + Sequence< sal_Int32 > aSelSeq; + // row of column header bar not selectable + if( isRowBar() ) + implGetSelectedRows( aSelSeq ); + return aSelSeq; } Sequence< sal_Int32 > SAL_CALL AccessibleBrowseBoxHeaderBar::getSelectedAccessibleColumns() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); - Sequence< sal_Int32 > aSelSeq; - // column of row header bar ("handle column") not selectable - if( isColumnBar() ) - implGetSelectedColumns( aSelSeq ); - return aSelSeq; + Sequence< sal_Int32 > aSelSeq; + // column of row header bar ("handle column") not selectable + if( isColumnBar() ) + implGetSelectedColumns( aSelSeq ); + return aSelSeq; } sal_Bool SAL_CALL AccessibleBrowseBoxHeaderBar::isAccessibleRowSelected( sal_Int32 nRow ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidRow( nRow ); - return isRowBar() ? implIsRowSelected( nRow ) : sal_False; + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidRow( nRow ); + return isRowBar() ? implIsRowSelected( nRow ) : sal_False; } sal_Bool SAL_CALL AccessibleBrowseBoxHeaderBar::isAccessibleColumnSelected( sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidColumn( nColumn ); - return isColumnBar() ? implIsColumnSelected( nColumn ) : sal_False; + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidColumn( nColumn ); + return isColumnBar() ? implIsColumnSelected( nColumn ) : sal_False; } Reference< XAccessible > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleCellAt( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidAddress( nRow, nColumn ); - return implGetChild( nRow, implToVCLColumnPos( nColumn ) ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidAddress( nRow, nColumn ); + return implGetChild( nRow, implToVCLColumnPos( nColumn ) ); } sal_Bool SAL_CALL AccessibleBrowseBoxHeaderBar::isAccessibleSelected( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidAddress( nRow, nColumn ); - return isRowBar() ? implIsRowSelected( nRow ) : implIsColumnSelected( nColumn ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidAddress( nRow, nColumn ); + return isRowBar() ? implIsRowSelected( nRow ) : implIsColumnSelected( nColumn ); } // XAccessibleSelection ------------------------------------------------------- void SAL_CALL AccessibleBrowseBoxHeaderBar::selectAccessibleChild( sal_Int32 nChildIndex ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidHeaderIndex( nChildIndex ); - if( isRowBar() ) - implSelectRow( nChildIndex, sal_True ); - else - implSelectColumn( implToVCLColumnPos( nChildIndex ), sal_True ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidHeaderIndex( nChildIndex ); + if( isRowBar() ) + implSelectRow( nChildIndex, sal_True ); + else + implSelectColumn( implToVCLColumnPos( nChildIndex ), sal_True ); } sal_Bool SAL_CALL AccessibleBrowseBoxHeaderBar::isAccessibleChildSelected( sal_Int32 nChildIndex ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - // using interface methods - no mutex - return isRowBar() ? - isAccessibleRowSelected( nChildIndex ) : - isAccessibleColumnSelected( nChildIndex ); + // using interface methods - no mutex + return isRowBar() ? + isAccessibleRowSelected( nChildIndex ) : + isAccessibleColumnSelected( nChildIndex ); } void SAL_CALL AccessibleBrowseBoxHeaderBar::clearAccessibleSelection() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - mpBrowseBox->SetNoSelection(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + mpBrowseBox->SetNoSelection(); } void SAL_CALL AccessibleBrowseBoxHeaderBar::selectAllAccessibleChildren() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - // no multiselection of columns possible - if( isRowBar() ) - mpBrowseBox->SelectAll(); - else - implSelectColumn( implToVCLColumnPos( 0 ), sal_True ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + // no multiselection of columns possible + if( isRowBar() ) + mpBrowseBox->SelectAll(); + else + implSelectColumn( implToVCLColumnPos( 0 ), sal_True ); } sal_Int32 SAL_CALL AccessibleBrowseBoxHeaderBar::getSelectedAccessibleChildCount() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - return isRowBar() ? implGetSelectedRowCount() : implGetSelectedColumnCount(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + return isRowBar() ? implGetSelectedRowCount() : implGetSelectedColumnCount(); } Reference< XAccessible > SAL_CALL AccessibleBrowseBoxHeaderBar::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); - // method may throw lang::IndexOutOfBoundsException - sal_Int32 nIndex = implGetChildIndexFromSelectedIndex( nSelectedChildIndex ); - return implGetChild( nIndex, implToVCLColumnPos( nIndex ) ); + // method may throw lang::IndexOutOfBoundsException + sal_Int32 nIndex = implGetChildIndexFromSelectedIndex( nSelectedChildIndex ); + return implGetChild( nIndex, implToVCLColumnPos( nIndex ) ); } void SAL_CALL AccessibleBrowseBoxHeaderBar::deselectAccessibleChild( - sal_Int32 nSelectedChildIndex ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nSelectedChildIndex ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); - // method may throw lang::IndexOutOfBoundsException + // method may throw lang::IndexOutOfBoundsException if ( isAccessibleChildSelected(nSelectedChildIndex) ) { if( isRowBar() ) @@ -314,37 +314,37 @@ void SAL_CALL AccessibleBrowseBoxHeaderBar::deselectAccessibleChild( // XInterface ----------------------------------------------------------------- Any SAL_CALL AccessibleBrowseBoxHeaderBar::queryInterface( const uno::Type& rType ) - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - Any aAny( AccessibleBrowseBoxTableBase::queryInterface( rType ) ); - return aAny.hasValue() ? - aAny : AccessibleBrowseBoxHeaderBarImplHelper::queryInterface( rType ); + Any aAny( AccessibleBrowseBoxTableBase::queryInterface( rType ) ); + return aAny.hasValue() ? + aAny : AccessibleBrowseBoxHeaderBarImplHelper::queryInterface( rType ); } void SAL_CALL AccessibleBrowseBoxHeaderBar::acquire() throw () { - AccessibleBrowseBoxTableBase::acquire(); + AccessibleBrowseBoxTableBase::acquire(); } void SAL_CALL AccessibleBrowseBoxHeaderBar::release() throw () { - AccessibleBrowseBoxTableBase::release(); + AccessibleBrowseBoxTableBase::release(); } // XServiceInfo --------------------------------------------------------------- OUString SAL_CALL AccessibleBrowseBoxHeaderBar::getImplementationName() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.AccessibleBrowseBoxHeaderBar" ) ); + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.AccessibleBrowseBoxHeaderBar" ) ); } Sequence< sal_Int8 > SAL_CALL AccessibleBrowseBoxHeaderBar::getImplementationId() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ::osl::MutexGuard aGuard( getOslGlobalMutex() ); - static Sequence< sal_Int8 > aId; - implCreateUuid( aId ); + ::osl::MutexGuard aGuard( getOslGlobalMutex() ); + static Sequence< sal_Int8 > aId; + implCreateUuid( aId ); return aId; } @@ -362,54 +362,51 @@ Rectangle AccessibleBrowseBoxHeaderBar::implGetBoundingBoxOnScreen() sal_Int32 AccessibleBrowseBoxHeaderBar::implGetRowCount() const { - // column header bar: only 1 row - return isRowBar() ? AccessibleBrowseBoxTableBase::implGetRowCount() : 1; + // column header bar: only 1 row + return isRowBar() ? AccessibleBrowseBoxTableBase::implGetRowCount() : 1; } sal_Int32 AccessibleBrowseBoxHeaderBar::implGetColumnCount() const { - // row header bar ("handle column"): only 1 column - return isColumnBar() ? AccessibleBrowseBoxTableBase::implGetColumnCount() : 1; + // row header bar ("handle column"): only 1 column + return isColumnBar() ? AccessibleBrowseBoxTableBase::implGetColumnCount() : 1; } // internal helper methods ---------------------------------------------------- Reference< XAccessible > AccessibleBrowseBoxHeaderBar::implGetChild( - sal_Int32 nRow, sal_uInt16 nColumnPos ) + sal_Int32 nRow, sal_uInt16 nColumnPos ) { - return isRowBar() ? - mpBrowseBox->CreateAccessibleRowHeader( nRow ) : - mpBrowseBox->CreateAccessibleColumnHeader( nColumnPos ); + return isRowBar() ? + mpBrowseBox->CreateAccessibleRowHeader( nRow ) : + mpBrowseBox->CreateAccessibleColumnHeader( nColumnPos ); } sal_Int32 AccessibleBrowseBoxHeaderBar::implGetChildIndexFromSelectedIndex( - sal_Int32 nSelectedChildIndex ) - throw ( lang::IndexOutOfBoundsException ) + sal_Int32 nSelectedChildIndex ) + throw ( lang::IndexOutOfBoundsException ) { - Sequence< sal_Int32 > aSelSeq; - if( isRowBar() ) - implGetSelectedRows( aSelSeq ); - else - implGetSelectedColumns( aSelSeq ); + Sequence< sal_Int32 > aSelSeq; + if( isRowBar() ) + implGetSelectedRows( aSelSeq ); + else + implGetSelectedColumns( aSelSeq ); - if( (nSelectedChildIndex < 0) || (nSelectedChildIndex >= aSelSeq.getLength()) ) - throw lang::IndexOutOfBoundsException(); + if( (nSelectedChildIndex < 0) || (nSelectedChildIndex >= aSelSeq.getLength()) ) + throw lang::IndexOutOfBoundsException(); - return aSelSeq[ nSelectedChildIndex ]; + return aSelSeq[ nSelectedChildIndex ]; } void AccessibleBrowseBoxHeaderBar::ensureIsValidHeaderIndex( sal_Int32 nIndex ) - throw ( lang::IndexOutOfBoundsException ) + throw ( lang::IndexOutOfBoundsException ) { - if( isRowBar() ) - ensureIsValidRow( nIndex ); - else - ensureIsValidColumn( nIndex ); + if( isRowBar() ) + ensureIsValidRow( nIndex ); + else + ensureIsValidColumn( nIndex ); } // ============================================================================ - } // namespace accessibility - // ============================================================================ - diff --git a/main/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx b/main/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx index 61e24c1..eb6d22f 100644 --- a/main/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx +++ b/main/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -33,13 +33,13 @@ namespace accessibility using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; - using namespace ::svt; + using namespace ::svt; AccessibleBrowseBoxHeaderCell::AccessibleBrowseBoxHeaderCell(sal_Int32 _nColumnRowId, const Reference< XAccessible >& rxParent, - IAccessibleTableProvider& rBrowseBox, + IAccessibleTableProvider& rBrowseBox, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow, - AccessibleBrowseBoxObjType eObjType) + AccessibleBrowseBoxObjType eObjType) : BrowseBoxAccessibleElement(rxParent, rBrowseBox, _xFocusWindow, @@ -129,7 +129,7 @@ namespace Rectangle getRectangle(IAccessibleTableProvider* _pBrowseBox,sal_Int32 _nRowColIndex, sal_Bool _bOnScreen,sal_Bool _bRowBar) { sal_Int32 nRow = 0; - sal_uInt16 nCol = (sal_uInt16)_nRowColIndex; + sal_uInt16 nCol = (sal_uInt16)_nRowColIndex; if ( _bRowBar ) { nRow = _nRowColIndex + 1; @@ -153,10 +153,10 @@ Rectangle AccessibleBrowseBoxHeaderCell::implGetBoundingBoxOnScreen() } // ----------------------------------------------------------------------------- sal_Int32 SAL_CALL AccessibleBrowseBoxHeaderCell::getAccessibleIndexInParent() - throw ( RuntimeException ) + throw ( RuntimeException ) { - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); sal_Int32 nIndex = m_nColumnRowId; if ( mpBrowseBox->HasRowHeader() ) --nIndex; @@ -165,5 +165,3 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxHeaderCell::getAccessibleIndexInParent() // ----------------------------------------------------------------------------- } // namespace accessibility // ----------------------------------------------------------------------------- - - diff --git a/main/accessibility/source/extended/AccessibleBrowseBoxTable.cxx b/main/accessibility/source/extended/AccessibleBrowseBoxTable.cxx index f69b33f..8dd470e 100644 --- a/main/accessibility/source/extended/AccessibleBrowseBoxTable.cxx +++ b/main/accessibility/source/extended/AccessibleBrowseBoxTable.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -51,184 +51,184 @@ namespace accessibility { DBG_NAME( AccessibleBrowseBoxTable ) AccessibleBrowseBoxTable::AccessibleBrowseBoxTable( - const Reference< XAccessible >& rxParent, - IAccessibleTableProvider& rBrowseBox ) : - AccessibleBrowseBoxTableBase( rxParent, rBrowseBox, BBTYPE_TABLE ) + const Reference< XAccessible >& rxParent, + IAccessibleTableProvider& rBrowseBox ) : + AccessibleBrowseBoxTableBase( rxParent, rBrowseBox, BBTYPE_TABLE ) { - DBG_CTOR( AccessibleBrowseBoxTable, NULL ); + DBG_CTOR( AccessibleBrowseBoxTable, NULL ); } AccessibleBrowseBoxTable::~AccessibleBrowseBoxTable() { - DBG_DTOR( AccessibleBrowseBoxTable, NULL ); + DBG_DTOR( AccessibleBrowseBoxTable, NULL ); } // XAccessibleContext --------------------------------------------------------- Reference< XAccessible > SAL_CALL AccessibleBrowseBoxTable::getAccessibleChild( sal_Int32 nChildIndex ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidIndex( nChildIndex ); - return mpBrowseBox->CreateAccessibleCell( - implGetRow( nChildIndex ), (sal_Int16)implGetColumn( nChildIndex ) ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidIndex( nChildIndex ); + return mpBrowseBox->CreateAccessibleCell( + implGetRow( nChildIndex ), (sal_Int16)implGetColumn( nChildIndex ) ); } sal_Int32 SAL_CALL AccessibleBrowseBoxTable::getAccessibleIndexInParent() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return BBINDEX_TABLE; + ensureIsAlive(); + return BBINDEX_TABLE; } // XAccessibleComponent ------------------------------------------------------- Reference< XAccessible > SAL_CALL AccessibleBrowseBoxTable::getAccessibleAtPoint( const awt::Point& rPoint ) - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); - Reference< XAccessible > xChild; - sal_Int32 nRow = 0; - sal_uInt16 nColumnPos = 0; - if( mpBrowseBox->ConvertPointToCellAddress( nRow, nColumnPos, VCLPoint( rPoint ) ) ) - xChild = mpBrowseBox->CreateAccessibleCell( nRow, nColumnPos ); + Reference< XAccessible > xChild; + sal_Int32 nRow = 0; + sal_uInt16 nColumnPos = 0; + if( mpBrowseBox->ConvertPointToCellAddress( nRow, nColumnPos, VCLPoint( rPoint ) ) ) + xChild = mpBrowseBox->CreateAccessibleCell( nRow, nColumnPos ); - return xChild; + return xChild; } void SAL_CALL AccessibleBrowseBoxTable::grabFocus() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - mpBrowseBox->GrabTableFocus(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + mpBrowseBox->GrabTableFocus(); } Any SAL_CALL AccessibleBrowseBoxTable::getAccessibleKeyBinding() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return Any(); // no special key bindings for data table + ensureIsAlive(); + return Any(); // no special key bindings for data table } // XAccessibleTable ----------------------------------------------------------- OUString SAL_CALL AccessibleBrowseBoxTable::getAccessibleRowDescription( sal_Int32 nRow ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidRow( nRow ); - return mpBrowseBox->GetRowDescription( nRow ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidRow( nRow ); + return mpBrowseBox->GetRowDescription( nRow ); } OUString SAL_CALL AccessibleBrowseBoxTable::getAccessibleColumnDescription( sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidColumn( nColumn ); - return mpBrowseBox->GetColumnDescription( (sal_uInt16)nColumn ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidColumn( nColumn ); + return mpBrowseBox->GetColumnDescription( (sal_uInt16)nColumn ); } Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxTable::getAccessibleRowHeaders() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - return implGetHeaderBar( BBINDEX_ROWHEADERBAR ); + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + return implGetHeaderBar( BBINDEX_ROWHEADERBAR ); } Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxTable::getAccessibleColumnHeaders() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - return implGetHeaderBar( BBINDEX_COLUMNHEADERBAR ); + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + return implGetHeaderBar( BBINDEX_COLUMNHEADERBAR ); } Sequence< sal_Int32 > SAL_CALL AccessibleBrowseBoxTable::getSelectedAccessibleRows() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); - Sequence< sal_Int32 > aSelSeq; - implGetSelectedRows( aSelSeq ); - return aSelSeq; + Sequence< sal_Int32 > aSelSeq; + implGetSelectedRows( aSelSeq ); + return aSelSeq; } Sequence< sal_Int32 > SAL_CALL AccessibleBrowseBoxTable::getSelectedAccessibleColumns() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); - Sequence< sal_Int32 > aSelSeq; - implGetSelectedColumns( aSelSeq ); - return aSelSeq; + Sequence< sal_Int32 > aSelSeq; + implGetSelectedColumns( aSelSeq ); + return aSelSeq; } sal_Bool SAL_CALL AccessibleBrowseBoxTable::isAccessibleRowSelected( sal_Int32 nRow ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidRow( nRow ); - return implIsRowSelected( nRow ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidRow( nRow ); + return implIsRowSelected( nRow ); } sal_Bool SAL_CALL AccessibleBrowseBoxTable::isAccessibleColumnSelected( sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidColumn( nColumn ); - return implIsColumnSelected( nColumn ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidColumn( nColumn ); + return implIsColumnSelected( nColumn ); } Reference< XAccessible > SAL_CALL AccessibleBrowseBoxTable::getAccessibleCellAt( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidAddress( nRow, nColumn ); - return mpBrowseBox->CreateAccessibleCell( nRow, (sal_Int16)nColumn ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidAddress( nRow, nColumn ); + return mpBrowseBox->CreateAccessibleCell( nRow, (sal_Int16)nColumn ); } sal_Bool SAL_CALL AccessibleBrowseBoxTable::isAccessibleSelected( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidAddress( nRow, nColumn ); - return implIsRowSelected( nRow ) || implIsColumnSelected( nColumn ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidAddress( nRow, nColumn ); + return implIsRowSelected( nRow ) || implIsColumnSelected( nColumn ); } // XServiceInfo --------------------------------------------------------------- OUString SAL_CALL AccessibleBrowseBoxTable::getImplementationName() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.AccessibleBrowseBoxTable" ) ); + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.AccessibleBrowseBoxTable" ) ); } // internal virtual methods --------------------------------------------------- @@ -240,35 +240,32 @@ Rectangle AccessibleBrowseBoxTable::implGetBoundingBox() Rectangle AccessibleBrowseBoxTable::implGetBoundingBoxOnScreen() { - return mpBrowseBox->calcTableRect(); + return mpBrowseBox->calcTableRect(); } // internal helper methods ---------------------------------------------------- Reference< XAccessibleTable > AccessibleBrowseBoxTable::implGetHeaderBar( - sal_Int32 nChildIndex ) - throw ( uno::RuntimeException ) + sal_Int32 nChildIndex ) + throw ( uno::RuntimeException ) { - Reference< XAccessible > xRet; - Reference< XAccessibleContext > xContext( mxParent, uno::UNO_QUERY ); - if( xContext.is() ) - { - try - { - xRet = xContext->getAccessibleChild( nChildIndex ); - } - catch( lang::IndexOutOfBoundsException& ) - { - DBG_ERROR( "implGetHeaderBar - wrong child index" ); - } - // RuntimeException goes to caller - } - return Reference< XAccessibleTable >( xRet, uno::UNO_QUERY ); + Reference< XAccessible > xRet; + Reference< XAccessibleContext > xContext( mxParent, uno::UNO_QUERY ); + if( xContext.is() ) + { + try + { + xRet = xContext->getAccessibleChild( nChildIndex ); + } + catch( lang::IndexOutOfBoundsException& ) + { + DBG_ERROR( "implGetHeaderBar - wrong child index" ); + } + // RuntimeException goes to caller + } + return Reference< XAccessibleTable >( xRet, uno::UNO_QUERY ); } // ============================================================================ - -} // namespace accessibility - +} // namespace accessibility // ============================================================================ - diff --git a/main/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx b/main/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx index 5dbe25f..5686372 100644 --- a/main/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx +++ b/main/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -53,160 +53,160 @@ namespace accessibility { DBG_NAME( AccessibleBrowseBoxTableBase ) AccessibleBrowseBoxTableBase::AccessibleBrowseBoxTableBase( - const Reference< XAccessible >& rxParent, - IAccessibleTableProvider& rBrowseBox, - AccessibleBrowseBoxObjType eObjType ) : - BrowseBoxAccessibleElement( rxParent, rBrowseBox,NULL, eObjType ) + const Reference< XAccessible >& rxParent, + IAccessibleTableProvider& rBrowseBox, + AccessibleBrowseBoxObjType eObjType ) : + BrowseBoxAccessibleElement( rxParent, rBrowseBox,NULL, eObjType ) { - DBG_CTOR( AccessibleBrowseBoxTableBase, NULL ); + DBG_CTOR( AccessibleBrowseBoxTableBase, NULL ); } AccessibleBrowseBoxTableBase::~AccessibleBrowseBoxTableBase() { - DBG_DTOR( AccessibleBrowseBoxTableBase, NULL ); + DBG_DTOR( AccessibleBrowseBoxTableBase, NULL ); } // XAccessibleContext --------------------------------------------------------- sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleChildCount() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - return implGetChildCount(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + return implGetChildCount(); } sal_Int16 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleRole() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return AccessibleRole::TABLE; + ensureIsAlive(); + return AccessibleRole::TABLE; } // XAccessibleTable ----------------------------------------------------------- sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleRowCount() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - return implGetRowCount(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + return implGetRowCount(); } sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleColumnCount() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - return implGetColumnCount(); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + return implGetColumnCount(); } sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleRowExtentAt( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidAddress( nRow, nColumn ); - return 1; // merged cells not supported + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidAddress( nRow, nColumn ); + return 1; // merged cells not supported } sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleColumnExtentAt( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidAddress( nRow, nColumn ); - return 1; // merged cells not supported + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidAddress( nRow, nColumn ); + return 1; // merged cells not supported } Reference< XAccessible > SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleCaption() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return NULL; // not supported + ensureIsAlive(); + return NULL; // not supported } Reference< XAccessible > SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleSummary() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return NULL; // not supported + ensureIsAlive(); + return NULL; // not supported } sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleIndex( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidAddress( nRow, nColumn ); - return implGetChildIndex( nRow, nColumn ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidAddress( nRow, nColumn ); + return implGetChildIndex( nRow, nColumn ); } sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleRow( sal_Int32 nChildIndex ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidIndex( nChildIndex ); - return implGetRow( nChildIndex ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidIndex( nChildIndex ); + return implGetRow( nChildIndex ); } sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleColumn( sal_Int32 nChildIndex ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - BBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidIndex( nChildIndex ); - return implGetColumn( nChildIndex ); + BBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidIndex( nChildIndex ); + return implGetColumn( nChildIndex ); } // XInterface ----------------------------------------------------------------- Any SAL_CALL AccessibleBrowseBoxTableBase::queryInterface( const uno::Type& rType ) - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - Any aAny( BrowseBoxAccessibleElement::queryInterface( rType ) ); - return aAny.hasValue() ? - aAny : AccessibleBrowseBoxTableImplHelper::queryInterface( rType ); + Any aAny( BrowseBoxAccessibleElement::queryInterface( rType ) ); + return aAny.hasValue() ? + aAny : AccessibleBrowseBoxTableImplHelper::queryInterface( rType ); } void SAL_CALL AccessibleBrowseBoxTableBase::acquire() throw () { - BrowseBoxAccessibleElement::acquire(); + BrowseBoxAccessibleElement::acquire(); } void SAL_CALL AccessibleBrowseBoxTableBase::release() throw () { - BrowseBoxAccessibleElement::release(); + BrowseBoxAccessibleElement::release(); } // XTypeProvider -------------------------------------------------------------- Sequence< uno::Type > SAL_CALL AccessibleBrowseBoxTableBase::getTypes() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - return ::comphelper::concatSequences( - BrowseBoxAccessibleElement::getTypes(), - AccessibleBrowseBoxTableImplHelper::getTypes() ); + return ::comphelper::concatSequences( + BrowseBoxAccessibleElement::getTypes(), + AccessibleBrowseBoxTableImplHelper::getTypes() ); } Sequence< sal_Int8 > SAL_CALL AccessibleBrowseBoxTableBase::getImplementationId() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ::osl::MutexGuard aGuard( getOslGlobalMutex() ); - static Sequence< sal_Int8 > aId; - implCreateUuid( aId ); + ::osl::MutexGuard aGuard( getOslGlobalMutex() ); + static Sequence< sal_Int8 > aId; + implCreateUuid( aId ); return aId; } @@ -214,96 +214,96 @@ Sequence< sal_Int8 > SAL_CALL AccessibleBrowseBoxTableBase::getImplementationId( sal_Int32 AccessibleBrowseBoxTableBase::implGetRowCount() const { - return mpBrowseBox->GetRowCount(); + return mpBrowseBox->GetRowCount(); } sal_Int32 AccessibleBrowseBoxTableBase::implGetColumnCount() const { - sal_uInt16 nColumns = mpBrowseBox->GetColumnCount(); - // do not count the "handle column" - if( nColumns && implHasHandleColumn() ) - --nColumns; - return nColumns; + sal_uInt16 nColumns = mpBrowseBox->GetColumnCount(); + // do not count the "handle column" + if( nColumns && implHasHandleColumn() ) + --nColumns; + return nColumns; } // internal helper methods ---------------------------------------------------- sal_Bool AccessibleBrowseBoxTableBase::implHasHandleColumn() const { - return mpBrowseBox->HasRowHeader(); + return mpBrowseBox->HasRowHeader(); } sal_uInt16 AccessibleBrowseBoxTableBase::implToVCLColumnPos( sal_Int32 nColumn ) const { - sal_uInt16 nVCLPos = 0; - if( (0 <= nColumn) && (nColumn < implGetColumnCount()) ) - { - // regard "handle column" - if( implHasHandleColumn() ) - ++nColumn; - nVCLPos = static_cast< sal_uInt16 >( nColumn ); - } - return nVCLPos; + sal_uInt16 nVCLPos = 0; + if( (0 <= nColumn) && (nColumn < implGetColumnCount()) ) + { + // regard "handle column" + if( implHasHandleColumn() ) + ++nColumn; + nVCLPos = static_cast< sal_uInt16 >( nColumn ); + } + return nVCLPos; } sal_Int32 AccessibleBrowseBoxTableBase::implGetChildCount() const { - return implGetRowCount() * implGetColumnCount(); + return implGetRowCount() * implGetColumnCount(); } sal_Int32 AccessibleBrowseBoxTableBase::implGetRow( sal_Int32 nChildIndex ) const { - sal_Int32 nColumns = implGetColumnCount(); - return nColumns ? (nChildIndex / nColumns) : 0; + sal_Int32 nColumns = implGetColumnCount(); + return nColumns ? (nChildIndex / nColumns) : 0; } sal_Int32 AccessibleBrowseBoxTableBase::implGetColumn( sal_Int32 nChildIndex ) const { - sal_Int32 nColumns = implGetColumnCount(); - return nColumns ? (nChildIndex % nColumns) : 0; + sal_Int32 nColumns = implGetColumnCount(); + return nColumns ? (nChildIndex % nColumns) : 0; } sal_Int32 AccessibleBrowseBoxTableBase::implGetChildIndex( - sal_Int32 nRow, sal_Int32 nColumn ) const + sal_Int32 nRow, sal_Int32 nColumn ) const { - return nRow * implGetColumnCount() + nColumn; + return nRow * implGetColumnCount() + nColumn; } sal_Bool AccessibleBrowseBoxTableBase::implIsRowSelected( sal_Int32 nRow ) const { - return mpBrowseBox->IsRowSelected( nRow ); + return mpBrowseBox->IsRowSelected( nRow ); } sal_Bool AccessibleBrowseBoxTableBase::implIsColumnSelected( sal_Int32 nColumn ) const { - if( implHasHandleColumn() ) - --nColumn; - return mpBrowseBox->IsColumnSelected( nColumn ); + if( implHasHandleColumn() ) + --nColumn; + return mpBrowseBox->IsColumnSelected( nColumn ); } void AccessibleBrowseBoxTableBase::implSelectRow( sal_Int32 nRow, sal_Bool bSelect ) { - mpBrowseBox->SelectRow( nRow, bSelect, sal_True ); + mpBrowseBox->SelectRow( nRow, bSelect, sal_True ); } void AccessibleBrowseBoxTableBase::implSelectColumn( sal_Int32 nColumnPos, sal_Bool bSelect ) { - mpBrowseBox->SelectColumn( (sal_uInt16)nColumnPos, bSelect ); + mpBrowseBox->SelectColumn( (sal_uInt16)nColumnPos, bSelect ); } sal_Int32 AccessibleBrowseBoxTableBase::implGetSelectedRowCount() const { - return mpBrowseBox->GetSelectedRowCount(); + return mpBrowseBox->GetSelectedRowCount(); } sal_Int32 AccessibleBrowseBoxTableBase::implGetSelectedColumnCount() const { - return mpBrowseBox->GetSelectedColumnCount(); + return mpBrowseBox->GetSelectedColumnCount(); } void AccessibleBrowseBoxTableBase::implGetSelectedRows( Sequence< sal_Int32 >& rSeq ) { - mpBrowseBox->GetAllSelectedRows( rSeq ); + mpBrowseBox->GetAllSelectedRows( rSeq ); } void AccessibleBrowseBoxTableBase::implGetSelectedColumns( Sequence< sal_Int32 >& rSeq ) @@ -312,40 +312,37 @@ void AccessibleBrowseBoxTableBase::implGetSelectedColumns( Sequence< sal_Int32 > } void AccessibleBrowseBoxTableBase::ensureIsValidRow( sal_Int32 nRow ) - throw ( lang::IndexOutOfBoundsException ) + throw ( lang::IndexOutOfBoundsException ) { - if( nRow >= implGetRowCount() ) - throw lang::IndexOutOfBoundsException( - OUString( RTL_CONSTASCII_USTRINGPARAM( "row index is invalid" ) ), *this ); + if( nRow >= implGetRowCount() ) + throw lang::IndexOutOfBoundsException( + OUString( RTL_CONSTASCII_USTRINGPARAM( "row index is invalid" ) ), *this ); } void AccessibleBrowseBoxTableBase::ensureIsValidColumn( sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException ) + throw ( lang::IndexOutOfBoundsException ) { - if( nColumn >= implGetColumnCount() ) - throw lang::IndexOutOfBoundsException( - OUString( RTL_CONSTASCII_USTRINGPARAM("column index is invalid") ), *this ); + if( nColumn >= implGetColumnCount() ) + throw lang::IndexOutOfBoundsException( + OUString( RTL_CONSTASCII_USTRINGPARAM("column index is invalid") ), *this ); } void AccessibleBrowseBoxTableBase::ensureIsValidAddress( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException ) { - ensureIsValidRow( nRow ); - ensureIsValidColumn( nColumn ); + ensureIsValidRow( nRow ); + ensureIsValidColumn( nColumn ); } void AccessibleBrowseBoxTableBase::ensureIsValidIndex( sal_Int32 nChildIndex ) - throw ( lang::IndexOutOfBoundsException ) + throw ( lang::IndexOutOfBoundsException ) { - if( nChildIndex >= implGetChildCount() ) - throw lang::IndexOutOfBoundsException( - OUString( RTL_CONSTASCII_USTRINGPARAM("child index is invalid") ), *this ); + if( nChildIndex >= implGetChildCount() ) + throw lang::IndexOutOfBoundsException( + OUString( RTL_CONSTASCII_USTRINGPARAM("child index is invalid") ), *this ); } // ============================================================================ - -} // namespace accessibility - +} // namespace accessibility // ============================================================================ - diff --git a/main/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx b/main/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx index 097513e..ce39a7b 100644 --- a/main/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx +++ b/main/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -33,7 +33,7 @@ namespace accessibility using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; - using namespace ::svt; + using namespace ::svt; using namespace ::svt::table; AccessibleGridControlHeaderCell::AccessibleGridControlHeaderCell(sal_Int32 _nColumnRowId, @@ -167,15 +167,13 @@ Rectangle AccessibleGridControlHeaderCell::implGetBoundingBoxOnScreen() } // ----------------------------------------------------------------------------- sal_Int32 SAL_CALL AccessibleGridControlHeaderCell::getAccessibleIndexInParent() - throw ( RuntimeException ) + throw ( RuntimeException ) { - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - sal_Int32 nIndex = m_nColumnRowId; - return nIndex; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + sal_Int32 nIndex = m_nColumnRowId; + return nIndex; } // ----------------------------------------------------------------------------- } // namespace accessibility // ----------------------------------------------------------------------------- - - diff --git a/main/accessibility/source/extended/AccessibleGridControlTableBase.cxx b/main/accessibility/source/extended/AccessibleGridControlTableBase.cxx index e939997..a9076a1 100644 --- a/main/accessibility/source/extended/AccessibleGridControlTableBase.cxx +++ b/main/accessibility/source/extended/AccessibleGridControlTableBase.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -52,10 +52,10 @@ namespace accessibility { DBG_NAME( AccessibleGridControlTableBase ) AccessibleGridControlTableBase::AccessibleGridControlTableBase( - const Reference< XAccessible >& rxParent, - IAccessibleTable& rTable, - AccessibleTableControlObjType eObjType ) : - GridControlAccessibleElement( rxParent, rTable, eObjType ) + const Reference< XAccessible >& rxParent, + IAccessibleTable& rTable, + AccessibleTableControlObjType eObjType ) : + GridControlAccessibleElement( rxParent, rTable, eObjType ) { } @@ -66,222 +66,219 @@ AccessibleGridControlTableBase::~AccessibleGridControlTableBase() // XAccessibleContext --------------------------------------------------------- sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleChildCount() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - TCSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - sal_Int32 nChildren = 0; - if(m_eObjType == TCTYPE_ROWHEADERBAR) - nChildren = m_aTable.GetRowCount(); - else if(m_eObjType == TCTYPE_TABLE) - nChildren = m_aTable.GetRowCount()*m_aTable.GetColumnCount(); - else if(m_eObjType == TCTYPE_COLUMNHEADERBAR) - nChildren = m_aTable.GetColumnCount(); - return nChildren; + TCSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + sal_Int32 nChildren = 0; + if(m_eObjType == TCTYPE_ROWHEADERBAR) + nChildren = m_aTable.GetRowCount(); + else if(m_eObjType == TCTYPE_TABLE) + nChildren = m_aTable.GetRowCount()*m_aTable.GetColumnCount(); + else if(m_eObjType == TCTYPE_COLUMNHEADERBAR) + nChildren = m_aTable.GetColumnCount(); + return nChildren; } sal_Int16 SAL_CALL AccessibleGridControlTableBase::getAccessibleRole() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return AccessibleRole::TABLE; + ensureIsAlive(); + return AccessibleRole::TABLE; } // XAccessibleTable ----------------------------------------------------------- sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleRowCount() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - TCSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - return m_aTable.GetRowCount(); + TCSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + return m_aTable.GetRowCount(); } sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumnCount() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - TCSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - return m_aTable.GetColumnCount(); + TCSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + return m_aTable.GetColumnCount(); } sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleRowExtentAt( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - TCSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidAddress( nRow, nColumn ); - return 1; // merged cells not supported + TCSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidAddress( nRow, nColumn ); + return 1; // merged cells not supported } sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumnExtentAt( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - TCSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidAddress( nRow, nColumn ); - return 1; // merged cells not supported + TCSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidAddress( nRow, nColumn ); + return 1; // merged cells not supported } Reference< XAccessible > SAL_CALL AccessibleGridControlTableBase::getAccessibleCaption() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return NULL; // not supported + ensureIsAlive(); + return NULL; // not supported } Reference< XAccessible > SAL_CALL AccessibleGridControlTableBase::getAccessibleSummary() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ensureIsAlive(); - return NULL; // not supported + ensureIsAlive(); + return NULL; // not supported } sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleIndex( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - TCSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidAddress( nRow, nColumn ); - return implGetChildIndex( nRow, nColumn ); + TCSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidAddress( nRow, nColumn ); + return implGetChildIndex( nRow, nColumn ); } sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleRow( sal_Int32 nChildIndex ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - TCSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidIndex( nChildIndex ); - return implGetRow( nChildIndex ); + TCSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidIndex( nChildIndex ); + return implGetRow( nChildIndex ); } sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumn( sal_Int32 nChildIndex ) - throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { - TCSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); - ensureIsValidIndex( nChildIndex ); - return implGetColumn( nChildIndex ); + TCSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); + ensureIsValidIndex( nChildIndex ); + return implGetColumn( nChildIndex ); } // XInterface ----------------------------------------------------------------- Any SAL_CALL AccessibleGridControlTableBase::queryInterface( const uno::Type& rType ) - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - Any aAny( GridControlAccessibleElement::queryInterface( rType ) ); - return aAny.hasValue() ? - aAny : AccessibleGridControlTableImplHelper::queryInterface( rType ); + Any aAny( GridControlAccessibleElement::queryInterface( rType ) ); + return aAny.hasValue() ? + aAny : AccessibleGridControlTableImplHelper::queryInterface( rType ); } void SAL_CALL AccessibleGridControlTableBase::acquire() throw () { - GridControlAccessibleElement::acquire(); + GridControlAccessibleElement::acquire(); } void SAL_CALL AccessibleGridControlTableBase::release() throw () { - GridControlAccessibleElement::release(); + GridControlAccessibleElement::release(); } // XTypeProvider -------------------------------------------------------------- Sequence< uno::Type > SAL_CALL AccessibleGridControlTableBase::getTypes() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - return ::comphelper::concatSequences( - GridControlAccessibleElement::getTypes(), - AccessibleGridControlTableImplHelper::getTypes() ); + return ::comphelper::concatSequences( + GridControlAccessibleElement::getTypes(), + AccessibleGridControlTableImplHelper::getTypes() ); } Sequence< sal_Int8 > SAL_CALL AccessibleGridControlTableBase::getImplementationId() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - ::osl::MutexGuard aGuard( getOslGlobalMutex() ); - static Sequence< sal_Int8 > aId; - implCreateUuid( aId ); - return aId; + ::osl::MutexGuard aGuard( getOslGlobalMutex() ); + static Sequence< sal_Int8 > aId; + implCreateUuid( aId ); + return aId; } // internal helper methods ---------------------------------------------------- sal_Int32 AccessibleGridControlTableBase::implGetChildCount() const { - return m_aTable.GetRowCount()*m_aTable.GetColumnCount(); + return m_aTable.GetRowCount()*m_aTable.GetColumnCount(); } sal_Int32 AccessibleGridControlTableBase::implGetRow( sal_Int32 nChildIndex ) const { - sal_Int32 nColumns = m_aTable.GetColumnCount(); - return nColumns ? (nChildIndex / nColumns) : 0; + sal_Int32 nColumns = m_aTable.GetColumnCount(); + return nColumns ? (nChildIndex / nColumns) : 0; } sal_Int32 AccessibleGridControlTableBase::implGetColumn( sal_Int32 nChildIndex ) const { - sal_Int32 nColumns = m_aTable.GetColumnCount(); - return nColumns ? (nChildIndex % nColumns) : 0; + sal_Int32 nColumns = m_aTable.GetColumnCount(); + return nColumns ? (nChildIndex % nColumns) : 0; } sal_Int32 AccessibleGridControlTableBase::implGetChildIndex( - sal_Int32 nRow, sal_Int32 nColumn ) const + sal_Int32 nRow, sal_Int32 nColumn ) const { - return nRow * m_aTable.GetColumnCount() + nColumn; + return nRow * m_aTable.GetColumnCount() + nColumn; } void AccessibleGridControlTableBase::implGetSelectedRows( Sequence< sal_Int32 >& rSeq ) { - sal_Int32 const selectionCount( m_aTable.GetSelectedRowCount() ); - rSeq.realloc( selectionCount ); - for ( sal_Int32 i=0; i<selectionCount; ++i ) - rSeq[i] = m_aTable.GetSelectedRowIndex(i); + sal_Int32 const selectionCount( m_aTable.GetSelectedRowCount() ); + rSeq.realloc( selectionCount ); + for ( sal_Int32 i=0; i<selectionCount; ++i ) + rSeq[i] = m_aTable.GetSelectedRowIndex(i); } void AccessibleGridControlTableBase::ensureIsValidRow( sal_Int32 nRow ) - throw ( lang::IndexOutOfBoundsException ) + throw ( lang::IndexOutOfBoundsException ) { - if( nRow >= m_aTable.GetRowCount() ) - throw lang::IndexOutOfBoundsException( - OUString( RTL_CONSTASCII_USTRINGPARAM( "row index is invalid" ) ), *this ); + if( nRow >= m_aTable.GetRowCount() ) + throw lang::IndexOutOfBoundsException( + OUString( RTL_CONSTASCII_USTRINGPARAM( "row index is invalid" ) ), *this ); } void AccessibleGridControlTableBase::ensureIsValidColumn( sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException ) + throw ( lang::IndexOutOfBoundsException ) { - if( nColumn >= m_aTable.GetColumnCount() ) - throw lang::IndexOutOfBoundsException( - OUString( RTL_CONSTASCII_USTRINGPARAM("column index is invalid") ), *this ); + if( nColumn >= m_aTable.GetColumnCount() ) + throw lang::IndexOutOfBoundsException( + OUString( RTL_CONSTASCII_USTRINGPARAM("column index is invalid") ), *this ); } void AccessibleGridControlTableBase::ensureIsValidAddress( - sal_Int32 nRow, sal_Int32 nColumn ) - throw ( lang::IndexOutOfBoundsException ) + sal_Int32 nRow, sal_Int32 nColumn ) + throw ( lang::IndexOutOfBoundsException ) { - ensureIsValidRow( nRow ); - ensureIsValidColumn( nColumn ); + ensureIsValidRow( nRow ); + ensureIsValidColumn( nColumn ); } void AccessibleGridControlTableBase::ensureIsValidIndex( sal_Int32 nChildIndex ) - throw ( lang::IndexOutOfBoundsException ) + throw ( lang::IndexOutOfBoundsException ) { - if( nChildIndex >= implGetChildCount() ) - throw lang::IndexOutOfBoundsException( - OUString( RTL_CONSTASCII_USTRINGPARAM("child index is invalid") ), *this ); + if( nChildIndex >= implGetChildCount() ) + throw lang::IndexOutOfBoundsException( + OUString( RTL_CONSTASCII_USTRINGPARAM("child index is invalid") ), *this ); } // ============================================================================ - -} // namespace accessibility - +} // namespace accessibility // ============================================================================ - diff --git a/main/accessibility/source/extended/accessiblebrowseboxcell.cxx b/main/accessibility/source/extended/accessiblebrowseboxcell.cxx index 833fa5a..195d3e6 100644 --- a/main/accessibility/source/extended/accessiblebrowseboxcell.cxx +++ b/main/accessibility/source/extended/accessiblebrowseboxcell.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -34,7 +34,7 @@ namespace accessibility using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::accessibility; - using namespace ::svt; + using namespace ::svt; // ============================================================================= // = AccessibleBrowseBoxCell @@ -44,8 +44,8 @@ namespace accessibility AccessibleBrowseBoxCell::AccessibleBrowseBoxCell( const Reference< XAccessible >& _rxParent, IAccessibleTableProvider& _rBrowseBox, const Reference< XWindow >& _xFocusWindow, - sal_Int32 _nRowPos, sal_uInt16 _nColPos, AccessibleBrowseBoxObjType _eType ) - :AccessibleBrowseBoxBase( _rxParent, _rBrowseBox, _xFocusWindow, _eType ) + sal_Int32 _nRowPos, sal_uInt16 _nColPos, AccessibleBrowseBoxObjType _eType ) + :AccessibleBrowseBoxBase( _rxParent, _rBrowseBox, _xFocusWindow, _eType ) ,m_nRowPos( _nRowPos ) ,m_nColPos( _nColPos ) { @@ -84,5 +84,3 @@ namespace accessibility // ................................................................................. } // namespace accessibility // ................................................................................. - - diff --git a/main/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/main/accessibility/source/extended/accessibleeditbrowseboxcell.cxx index 67e39fe..cbdf666 100644 --- a/main/accessibility/source/extended/accessibleeditbrowseboxcell.cxx +++ b/main/accessibility/source/extended/accessibleeditbrowseboxcell.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -129,19 +129,19 @@ namespace accessibility { SolarMethodGuard aGuard( *this ); - // TODO: localize this! - //String sName = mpBrowseBox->GetColumnDescription( getColumnPos( ) ); - - //if ( 0 == sName.Len() ) - //{ - // sName = String::CreateFromAscii( "Column " ); - String sName = String::CreateFromAscii( "Column " ); - sName += String::CreateFromInt32( getColumnPos( ) - 1 ); - //} - sName += String::CreateFromAscii( ", Row " ); - sName += String::CreateFromInt32( getRowPos( ) ); + // TODO: localize this! + //String sName = mpBrowseBox->GetColumnDescription( getColumnPos( ) ); - return ::rtl::OUString( sName ); + //if ( 0 == sName.Len() ) + //{ + // sName = String::CreateFromAscii( "Column " ); + String sName = String::CreateFromAscii( "Column " ); + sName += String::CreateFromInt32( getColumnPos( ) - 1 ); + //} + sName += String::CreateFromAscii( ", Row " ); + sName += String::CreateFromInt32( getRowPos( ) ); + + return ::rtl::OUString( sName ); } // ----------------------------------------------------------------------------- @@ -230,41 +230,42 @@ namespace accessibility { if ( !m_pBrowseBox || !m_xControlAccessible.is() ) throw DisposedException(); - Reference< XAccessibleContext > xMyContext( m_aContext ); - if ( !xMyContext.is() ) - { - Reference< XAccessibleContext > xInnerContext = m_xControlAccessible->getAccessibleContext(); - Reference< XAccessible > xMe( this ); + Reference< XAccessibleContext > xMyContext( m_aContext ); + if ( !xMyContext.is() ) + { + Reference< XAccessibleContext > xInnerContext = m_xControlAccessible->getAccessibleContext(); + Reference< XAccessible > xMe( this ); - xMyContext = new EditBrowseBoxTableCell( m_xParent, xMe, xInnerContext, *m_pBrowseBox, m_xFocusWindow, m_nRowPos, m_nColPos ); - m_aContext = xMyContext; - } + xMyContext = new EditBrowseBoxTableCell( m_xParent, xMe, xInnerContext, *m_pBrowseBox, m_xFocusWindow, m_nRowPos, m_nColPos ); + m_aContext = xMyContext; + } return xMyContext; } //-------------------------------------------------------------------- void SAL_CALL EditBrowseBoxTableCellAccess::disposing() { - // dispose our context, if it still alive - Reference< XComponent > xMyContext( (Reference< XAccessibleContext >)m_aContext, UNO_QUERY ); - if ( xMyContext.is() ) - { - try - { - xMyContext->dispose(); - } - catch( const Exception& e ) - { - (void)e; - OSL_ENSURE( false, "EditBrowseBoxTableCellAccess::disposing: caught an exception while disposing the context!" ); - } - } + // dispose our context, if it is still alive + Reference< XComponent > xMyContext( (Reference< XAccessibleContext >)m_aContext, UNO_QUERY ); + if ( xMyContext.is() ) + { + try + { + xMyContext->dispose(); + } + catch( const Exception& e ) + { + (void)e; + OSL_ENSURE( false, "EditBrowseBoxTableCellAccess::disposing: caught an exception while disposing the context!" ); + } + } - m_pBrowseBox = NULL; - m_xControlAccessible.clear(); - m_aContext = Reference< XAccessibleContext >( ); - // NO dispose of the inner object there: it is the XAccessible of an window, and disposing - // it would delete the respective VCL window + m_pBrowseBox = NULL; + m_xControlAccessible.clear(); + m_aContext = Reference< XAccessibleContext >( ); + // NO dispose of the inner object there: it is the XAccessible of an window, and disposing + // it would delete the respective VCL window } + // ................................................................................. } // namespace accessibility // ................................................................................. diff --git a/main/accessibility/source/extended/accessibleiconchoicectrl.cxx b/main/accessibility/source/extended/accessibleiconchoicectrl.cxx index 8e7a0fb..2211977 100644 --- a/main/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/main/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -392,4 +392,3 @@ namespace accessibility //........................................................................ }// namespace accessibility //........................................................................ - diff --git a/main/accessibility/source/extended/accessibletabbarbase.cxx b/main/accessibility/source/extended/accessibletabbarbase.cxx index 2082291..7a405b5 100644 --- a/main/accessibility/source/extended/accessibletabbarbase.cxx +++ b/main/accessibility/source/extended/accessibletabbarbase.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -36,75 +36,75 @@ namespace accessibility //......................................................................... AccessibleTabBarBase::AccessibleTabBarBase( TabBar* pTabBar ) : - AccessibleExtendedComponentHelper_BASE( new VCLExternalSolarLock() ), - m_pTabBar( 0 ) + AccessibleExtendedComponentHelper_BASE( new VCLExternalSolarLock() ), + m_pTabBar( 0 ) { - m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() ); - SetTabBarPointer( pTabBar ); + m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() ); + SetTabBarPointer( pTabBar ); } AccessibleTabBarBase::~AccessibleTabBarBase() { - ClearTabBarPointer(); - DELETEZ( m_pExternalLock ); + ClearTabBarPointer(); + DELETEZ( m_pExternalLock ); } IMPL_LINK( AccessibleTabBarBase, WindowEventListener, VclSimpleEvent*, pEvent ) { - VclWindowEvent* pWinEvent = dynamic_cast< VclWindowEvent* >( pEvent ); - DBG_ASSERT( pWinEvent, "AccessibleTabBarBase::WindowEventListener - unknown window event" ); - if( pWinEvent ) - { - Window* pEventWindow = pWinEvent->GetWindow(); - DBG_ASSERT( pEventWindow, "AccessibleTabBarBase::WindowEventListener: no window!" ); - - if( ( pWinEvent->GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) && - ( (sal_uInt16)(sal_IntPtr) pWinEvent->GetData() == TabBar::PAGE_NOT_FOUND ) && - ( dynamic_cast< AccessibleTabBarPageList *> (this) != NULL ) ) - { - return 0; - } - - if ( !pEventWindow->IsAccessibilityEventsSuppressed() || (pWinEvent->GetId() == VCLEVENT_OBJECT_DYING) ) - ProcessWindowEvent( *pWinEvent ); - } - return 0; + VclWindowEvent* pWinEvent = dynamic_cast< VclWindowEvent* >( pEvent ); + DBG_ASSERT( pWinEvent, "AccessibleTabBarBase::WindowEventListener - unknown window event" ); + if( pWinEvent ) + { + Window* pEventWindow = pWinEvent->GetWindow(); + DBG_ASSERT( pEventWindow, "AccessibleTabBarBase::WindowEventListener: no window!" ); + + if( ( pWinEvent->GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) && + ( (sal_uInt16)(sal_IntPtr) pWinEvent->GetData() == TabBar::PAGE_NOT_FOUND ) && + ( dynamic_cast< AccessibleTabBarPageList *> (this) != NULL ) ) + { + return 0; + } + + if ( !pEventWindow->IsAccessibilityEventsSuppressed() || (pWinEvent->GetId() == VCLEVENT_OBJECT_DYING) ) + ProcessWindowEvent( *pWinEvent ); + } + return 0; } void AccessibleTabBarBase::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { - if( rVclWindowEvent.GetId() == VCLEVENT_OBJECT_DYING ) - ClearTabBarPointer(); + if( rVclWindowEvent.GetId() == VCLEVENT_OBJECT_DYING ) + ClearTabBarPointer(); } // XComponent void AccessibleTabBarBase::disposing() { - AccessibleExtendedComponentHelper_BASE::disposing(); - ClearTabBarPointer(); + AccessibleExtendedComponentHelper_BASE::disposing(); + ClearTabBarPointer(); } // private void AccessibleTabBarBase::SetTabBarPointer( TabBar* pTabBar ) { - DBG_ASSERT( !m_pTabBar, "AccessibleTabBarBase::SetTabBarPointer - multiple call" ); - m_pTabBar = pTabBar; - if( m_pTabBar ) - m_pTabBar->AddEventListener( LINK( this, AccessibleTabBarBase, WindowEventListener ) ); + DBG_ASSERT( !m_pTabBar, "AccessibleTabBarBase::SetTabBarPointer - multiple call" ); + m_pTabBar = pTabBar; + if( m_pTabBar ) + m_pTabBar->AddEventListener( LINK( this, AccessibleTabBarBase, WindowEventListener ) ); } void AccessibleTabBarBase::ClearTabBarPointer() { - if( m_pTabBar ) - { - m_pTabBar->RemoveEventListener( LINK( this, AccessibleTabBarBase, WindowEventListener ) ); - m_pTabBar = 0; - } + if( m_pTabBar ) + { + m_pTabBar->RemoveEventListener( LINK( this, AccessibleTabBarBase, WindowEventListener ) ); + m_pTabBar = 0; + } } //......................................................................... -} // namespace accessibility +} // namespace accessibility //......................................................................... diff --git a/main/accessibility/source/extended/accessibletablistbox.cxx b/main/accessibility/source/extended/accessibletablistbox.cxx index ef4e61d..c60e5b0 100644 --- a/main/accessibility/source/extended/accessibletablistbox.cxx +++ b/main/accessibility/source/extended/accessibletablistbox.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -42,7 +42,7 @@ namespace accessibility class TLBSolarGuard : public ::vos::OGuard { public: - inline TLBSolarGuard() : ::vos::OGuard( Application::GetSolarMutex() ) {} + inline TLBSolarGuard() : ::vos::OGuard( Application::GetSolarMutex() ) {} }; // class AccessibleTabListBox ----------------------------------------------------- @@ -58,17 +58,17 @@ namespace accessibility // Ctor() and Dtor() // ----------------------------------------------------------------------------- AccessibleTabListBox::AccessibleTabListBox( const Reference< XAccessible >& rxParent, SvHeaderTabListBox& rBox ) - :AccessibleBrowseBox( rxParent, NULL, rBox ) - ,m_pTabListBox( &rBox ) + :AccessibleBrowseBox( rxParent, NULL, rBox ) + ,m_pTabListBox( &rBox ) { DBG_CTOR( AccessibleTabListBox, NULL ); - osl_incrementInterlockedCount( &m_refCount ); - { - setCreator( this ); - } - osl_decrementInterlockedCount( &m_refCount ); + osl_incrementInterlockedCount( &m_refCount ); + { + setCreator( this ); + } + osl_decrementInterlockedCount( &m_refCount ); } // ----------------------------------------------------------------------------- @@ -79,8 +79,8 @@ namespace accessibility if ( isAlive() ) { // increment ref count to prevent double call of Dtor - osl_incrementInterlockedCount( &m_refCount ); - dispose(); + osl_incrementInterlockedCount( &m_refCount ); + dispose(); } } // ----------------------------------------------------------------------------- @@ -89,49 +89,49 @@ namespace accessibility return new AccessibleTabListBoxTable( this, *m_pTabListBox ); } - // XInterface ----------------------------------------------------------------- - IMPLEMENT_FORWARD_XINTERFACE2( AccessibleTabListBox, AccessibleBrowseBox, AccessibleTabListBox_Base ) + // XInterface ----------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( AccessibleTabListBox, AccessibleBrowseBox, AccessibleTabListBox_Base ) - // XTypeProvider -------------------------------------------------------------- - IMPLEMENT_FORWARD_XTYPEPROVIDER2( AccessibleTabListBox, AccessibleBrowseBox, AccessibleTabListBox_Base ) + // XTypeProvider -------------------------------------------------------------- + IMPLEMENT_FORWARD_XTYPEPROVIDER2( AccessibleTabListBox, AccessibleBrowseBox, AccessibleTabListBox_Base ) - // XAccessibleContext --------------------------------------------------------- + // XAccessibleContext --------------------------------------------------------- sal_Int32 SAL_CALL AccessibleTabListBox::getAccessibleChildCount() - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException ) { - return 2; // header and table + return 2; // header and table } - // ----------------------------------------------------------------------------- - Reference< XAccessibleContext > SAL_CALL AccessibleTabListBox::getAccessibleContext() throw ( RuntimeException ) - { - return this; - } + // ----------------------------------------------------------------------------- + Reference< XAccessibleContext > SAL_CALL AccessibleTabListBox::getAccessibleContext() throw ( RuntimeException ) + { + return this; + } - // ----------------------------------------------------------------------------- + // ----------------------------------------------------------------------------- Reference< XAccessible > SAL_CALL AccessibleTabListBox::getAccessibleChild( sal_Int32 nChildIndex ) - throw ( IndexOutOfBoundsException, RuntimeException ) + throw ( IndexOutOfBoundsException, RuntimeException ) { - TLBSolarGuard aSolarGuard; - ::osl::MutexGuard aGuard( getOslMutex() ); - ensureIsAlive(); + TLBSolarGuard aSolarGuard; + ::osl::MutexGuard aGuard( getOslMutex() ); + ensureIsAlive(); if ( nChildIndex < 0 || nChildIndex > 1 ) throw IndexOutOfBoundsException(); - Reference< XAccessible > xRet; - if (nChildIndex == 0) - { - //! so far the actual implementation object only supports column headers - xRet = implGetFixedChild( ::svt::BBINDEX_COLUMNHEADERBAR ); - } - else if (nChildIndex == 1) - xRet = implGetFixedChild( ::svt::BBINDEX_TABLE ); + Reference< XAccessible > xRet; + if (nChildIndex == 0) + { + //! so far the actual implementation object only supports column headers + xRet = implGetFixedChild( ::svt::BBINDEX_COLUMNHEADERBAR ); + } + else if (nChildIndex == 1) + xRet = implGetFixedChild( ::svt::BBINDEX_TABLE ); - if ( !xRet.is() ) - throw RuntimeException(); + if ( !xRet.is() ) + throw RuntimeException(); return xRet; } @@ -139,4 +139,3 @@ namespace accessibility //........................................................................ }// namespace accessibility //........................................................................ - diff --git a/main/accessibility/source/extended/listboxaccessible.cxx b/main/accessibility/source/extended/listboxaccessible.cxx index 27722b7..fc3be3b 100644 --- a/main/accessibility/source/extended/listboxaccessible.cxx +++ b/main/accessibility/source/extended/listboxaccessible.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -56,15 +56,15 @@ namespace accessibility //-------------------------------------------------------------------- IMPL_LINK( ListBoxAccessibleBase, WindowEventListener, VclSimpleEvent*, pEvent ) { - DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "ListBoxAccessibleBase::WindowEventListener: unexpected WindowEvent!" ); - if ( pEvent && pEvent->ISA( VclWindowEvent ) ) - { - DBG_ASSERT( static_cast< VclWindowEvent* >( pEvent )->GetWindow() , "ListBoxAccessibleBase::WindowEventListener: no event window!" ); - DBG_ASSERT( static_cast< VclWindowEvent* >( pEvent )->GetWindow() == m_pWindow, "ListBoxAccessibleBase::WindowEventListener: where did this come from?" ); + DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "ListBoxAccessibleBase::WindowEventListener: unexpected WindowEvent!" ); + if ( pEvent && pEvent->ISA( VclWindowEvent ) ) + { + DBG_ASSERT( static_cast< VclWindowEvent* >( pEvent )->GetWindow() , "ListBoxAccessibleBase::WindowEventListener: no event window!" ); + DBG_ASSERT( static_cast< VclWindowEvent* >( pEvent )->GetWindow() == m_pWindow, "ListBoxAccessibleBase::WindowEventListener: where did this come from?" ); - ProcessWindowEvent( *static_cast< VclWindowEvent* >( pEvent ) ); - } - return 0; + ProcessWindowEvent( *static_cast< VclWindowEvent* >( pEvent ) ); + } + return 0; } // ----------------------------------------------------------------------------- @@ -82,11 +82,11 @@ namespace accessibility { switch ( _rVclWindowEvent.GetId() ) { - case VCLEVENT_OBJECT_DYING : + case VCLEVENT_OBJECT_DYING : { - if ( m_pWindow ) - m_pWindow->RemoveEventListener( LINK( this, ListBoxAccessibleBase, WindowEventListener ) ); - m_pWindow = NULL; + if ( m_pWindow ) + m_pWindow->RemoveEventListener( LINK( this, ListBoxAccessibleBase, WindowEventListener ) ); + m_pWindow = NULL; dispose(); break; }