AccessibleBrowseBox.cxx (0841af79) | AccessibleBrowseBox.cxx (c6948b83) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 2 * |
3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at | 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at |
10 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 12 * |
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. | 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. |
19 * | 19 * |
20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_accessibility.hxx" 26#include "accessibility/extended/AccessibleBrowseBox.hxx" 27#include "accessibility/extended/AccessibleBrowseBoxTable.hxx" --- 76 unchanged lines hidden (view full) --- 104{ 105 ::osl::MutexGuard aGuard( getOslMutex() ); 106 107 m_pImpl->m_pTable = NULL; 108 m_pImpl->m_pColumnHeaderBar = NULL; 109 m_pImpl->m_pRowHeaderBar = NULL; 110 m_pImpl->m_aCreator = Reference< XAccessible >(); 111 | 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_accessibility.hxx" 26#include "accessibility/extended/AccessibleBrowseBox.hxx" 27#include "accessibility/extended/AccessibleBrowseBoxTable.hxx" --- 76 unchanged lines hidden (view full) --- 104{ 105 ::osl::MutexGuard aGuard( getOslMutex() ); 106 107 m_pImpl->m_pTable = NULL; 108 m_pImpl->m_pColumnHeaderBar = NULL; 109 m_pImpl->m_pRowHeaderBar = NULL; 110 m_pImpl->m_aCreator = Reference< XAccessible >(); 111 |
112 Reference< XAccessible > xTable = m_pImpl->mxTable; | 112 Reference< XAccessible > xTable = m_pImpl->mxTable; |
113 114 Reference< XComponent > xComp( m_pImpl->mxTable, UNO_QUERY ); 115 if ( xComp.is() ) 116 { 117 xComp->dispose(); 118 119 } 120//! ::comphelper::disposeComponent(m_pImpl->mxTable); --- 146 unchanged lines hidden (view full) --- 267Reference< XAccessible > 268AccessibleBrowseBox::implGetHeaderBar( AccessibleBrowseBoxObjType eObjType ) 269{ 270 Reference< XAccessible > xRet; 271 Reference< XAccessible >* pxMember = NULL; 272 273 if( eObjType == BBTYPE_ROWHEADERBAR ) 274 pxMember = &m_pImpl->mxRowHeaderBar; | 113 114 Reference< XComponent > xComp( m_pImpl->mxTable, UNO_QUERY ); 115 if ( xComp.is() ) 116 { 117 xComp->dispose(); 118 119 } 120//! ::comphelper::disposeComponent(m_pImpl->mxTable); --- 146 unchanged lines hidden (view full) --- 267Reference< XAccessible > 268AccessibleBrowseBox::implGetHeaderBar( AccessibleBrowseBoxObjType eObjType ) 269{ 270 Reference< XAccessible > xRet; 271 Reference< XAccessible >* pxMember = NULL; 272 273 if( eObjType == BBTYPE_ROWHEADERBAR ) 274 pxMember = &m_pImpl->mxRowHeaderBar; |
275 else if( eObjType == BBTYPE_COLUMNHEADERBAR ) | 275 else if( eObjType == BBTYPE_COLUMNHEADERBAR ) |
276 pxMember = &m_pImpl->mxColumnHeaderBar; 277 278 if( pxMember ) 279 { 280 if( !pxMember->is() ) 281 { 282 AccessibleBrowseBoxHeaderBar* pHeaderBar = new AccessibleBrowseBoxHeaderBar( 283 (Reference< XAccessible >)m_pImpl->m_aCreator, *mpBrowseBox, eObjType ); --- 86 unchanged lines hidden (view full) --- 370// ----------------------------------------------------------------------------- 371Reference< XAccessibleContext > SAL_CALL AccessibleBrowseBoxAccess::getAccessibleContext() throw ( RuntimeException ) 372{ 373 ::osl::MutexGuard aGuard( m_aMutex ); 374 375 DBG_ASSERT( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ), 376 "accessibility/extended/AccessibleBrowseBoxAccess::getAccessibleContext: inconsistency!" ); 377 | 276 pxMember = &m_pImpl->mxColumnHeaderBar; 277 278 if( pxMember ) 279 { 280 if( !pxMember->is() ) 281 { 282 AccessibleBrowseBoxHeaderBar* pHeaderBar = new AccessibleBrowseBoxHeaderBar( 283 (Reference< XAccessible >)m_pImpl->m_aCreator, *mpBrowseBox, eObjType ); --- 86 unchanged lines hidden (view full) --- 370// ----------------------------------------------------------------------------- 371Reference< XAccessibleContext > SAL_CALL AccessibleBrowseBoxAccess::getAccessibleContext() throw ( RuntimeException ) 372{ 373 ::osl::MutexGuard aGuard( m_aMutex ); 374 375 DBG_ASSERT( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ), 376 "accessibility/extended/AccessibleBrowseBoxAccess::getAccessibleContext: inconsistency!" ); 377 |
378 // if the context died meanwhile (we're no listener, so it won't tell us explicitily when this happens), | 378 // if the context died meanwhile (we're no listener, so it won't tell us explicitly when this happens), |
379 // then reset an re-create. 380 if ( m_pContext && !m_pContext->isAlive() ) 381 m_xContext = m_pContext = NULL; 382 383 if ( !m_xContext.is() ) 384 m_xContext = m_pContext = new AccessibleBrowseBox( m_xParent, this, m_rBrowseBox ); 385 386 return m_xContext; 387} 388 389// ----------------------------------------------------------------------------- 390bool AccessibleBrowseBoxAccess::isContextAlive() const 391{ | 379 // then reset an re-create. 380 if ( m_pContext && !m_pContext->isAlive() ) 381 m_xContext = m_pContext = NULL; 382 383 if ( !m_xContext.is() ) 384 m_xContext = m_pContext = new AccessibleBrowseBox( m_xParent, this, m_rBrowseBox ); 385 386 return m_xContext; 387} 388 389// ----------------------------------------------------------------------------- 390bool AccessibleBrowseBoxAccess::isContextAlive() const 391{ |
392 return ( NULL != m_pContext ) && m_pContext->isAlive(); | 392 return ( NULL != m_pContext ) && m_pContext->isAlive(); |
393} 394 395// ============================================================================ 396 397} // namespace accessibility | 393} 394 395// ============================================================================ 396 397} // namespace accessibility |
398 |
|