LCOV - code coverage report
Current view: top level - accessibility/source/extended - AccessibleToolPanelDeckTabBarItem.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 148 0.0 %
Date: 2012-08-25 Functions: 0 41 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 226 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       4                 :            :  *
       5                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       6                 :            :  *
       7                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       8                 :            :  *
       9                 :            :  * This file is part of OpenOffice.org.
      10                 :            :  *
      11                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      12                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      13                 :            :  * only, as published by the Free Software Foundation.
      14                 :            :  *
      15                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      16                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      17                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      18                 :            :  * GNU Lesser General Public License version 3 for more details
      19                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      20                 :            :  *
      21                 :            :  * You should have received a copy of the GNU Lesser General Public License
      22                 :            :  * version 3 along with OpenOffice.org.  If not, see
      23                 :            :  * <http://www.openoffice.org/license.html>
      24                 :            :  * for a copy of the LGPLv3 License.
      25                 :            :  *
      26                 :            :  ************************************************************************/
      27                 :            : 
      28                 :            : 
      29                 :            : #include "accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx"
      30                 :            : 
      31                 :            : #include <com/sun/star/accessibility/AccessibleRole.hpp>
      32                 :            : #include <com/sun/star/accessibility/AccessibleStateType.hpp>
      33                 :            : #include <com/sun/star/accessibility/AccessibleEventId.hpp>
      34                 :            : #include <com/sun/star/lang/DisposedException.hpp>
      35                 :            : 
      36                 :            : #include <svtools/toolpanel/toolpaneldeck.hxx>
      37                 :            : #include <svtools/toolpanel/paneltabbar.hxx>
      38                 :            : #include <unotools/accessiblestatesethelper.hxx>
      39                 :            : #include <unotools/accessiblerelationsethelper.hxx>
      40                 :            : #include <tools/diagnose_ex.h>
      41                 :            : #include <vcl/svapp.hxx>
      42                 :            : #include <osl/mutex.hxx>
      43                 :            : 
      44                 :            : //......................................................................................................................
      45                 :            : namespace accessibility
      46                 :            : {
      47                 :            : //......................................................................................................................
      48                 :            : 
      49                 :            :     typedef ::com::sun::star::awt::Rectangle    UnoRectangle;
      50                 :            :     typedef ::com::sun::star::awt::Point        UnoPoint;
      51                 :            : 
      52                 :            :     /** === begin UNO using === **/
      53                 :            :     using ::com::sun::star::uno::Reference;
      54                 :            :     using ::com::sun::star::uno::XInterface;
      55                 :            :     using ::com::sun::star::uno::UNO_QUERY;
      56                 :            :     using ::com::sun::star::uno::UNO_QUERY_THROW;
      57                 :            :     using ::com::sun::star::uno::UNO_SET_THROW;
      58                 :            :     using ::com::sun::star::uno::Exception;
      59                 :            :     using ::com::sun::star::uno::RuntimeException;
      60                 :            :     using ::com::sun::star::uno::Any;
      61                 :            :     using ::com::sun::star::uno::makeAny;
      62                 :            :     using ::com::sun::star::uno::Sequence;
      63                 :            :     using ::com::sun::star::uno::Type;
      64                 :            :     using ::com::sun::star::accessibility::XAccessible;
      65                 :            :     using ::com::sun::star::lang::DisposedException;
      66                 :            :     using ::com::sun::star::lang::IndexOutOfBoundsException;
      67                 :            :     using ::com::sun::star::accessibility::XAccessibleRelationSet;
      68                 :            :     using ::com::sun::star::accessibility::XAccessibleStateSet;
      69                 :            :     using ::com::sun::star::accessibility::XAccessibleComponent;
      70                 :            :     using ::com::sun::star::accessibility::XAccessibleExtendedComponent;
      71                 :            :     using ::com::sun::star::awt::XFont;
      72                 :            :     /** === end UNO using === **/
      73                 :            : 
      74                 :            :     namespace AccessibleRole = ::com::sun::star::accessibility::AccessibleRole;
      75                 :            :     namespace AccessibleStateType = ::com::sun::star::accessibility::AccessibleStateType;
      76                 :            :     namespace AccessibleEventId = ::com::sun::star::accessibility::AccessibleEventId;
      77                 :            : 
      78                 :            :     //==================================================================================================================
      79                 :            :     //= AccessibleToolPanelDeckTabBarItem_Impl
      80                 :            :     //==================================================================================================================
      81                 :            :     class AccessibleToolPanelDeckTabBarItem_Impl : public ::svt::IToolPanelDeckListener
      82                 :            :     {
      83                 :            :     public:
      84                 :            :         AccessibleToolPanelDeckTabBarItem_Impl(
      85                 :            :             AccessibleToolPanelDeckTabBarItem& i_rAntiImpl,
      86                 :            :             const Reference< XAccessible >& i_rAccessibleParent,
      87                 :            :             ::svt::IToolPanelDeck& i_rPanelDeck,
      88                 :            :             ::svt::PanelTabBar& i_rTabBar,
      89                 :            :             const size_t i_nItemPos
      90                 :            :         );
      91                 :            :         virtual ~AccessibleToolPanelDeckTabBarItem_Impl();
      92                 :            : 
      93                 :          0 :         ::svt::PanelTabBar* getTabBar() const { return m_pTabBar; }
      94                 :            : 
      95                 :            :         // IToolPanelDeckListener
      96                 :            :         virtual void PanelInserted( const ::svt::PToolPanel& i_pPanel, const size_t i_nPosition );
      97                 :            :         virtual void PanelRemoved( const size_t i_nPosition );
      98                 :            :         virtual void ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive );
      99                 :            :         virtual void LayouterChanged( const ::svt::PDeckLayouter& i_rNewLayouter );
     100                 :            :         virtual void Dying();
     101                 :            : 
     102                 :            :     public:
     103                 :          0 :         bool    isDisposed() const { return m_pPanelDeck == NULL; }
     104                 :            :         void    checkDisposed() const;
     105                 :            :         void    dispose();
     106                 :            : 
     107                 :            :         const Reference< XAccessible >&
     108                 :          0 :                 getAccessibleParent() const { return m_xAccessibleParent; }
     109                 :          0 :         size_t  getItemPos() const { return m_nItemPos; }
     110                 :            : 
     111                 :            :         Reference< XAccessibleComponent >   getParentAccessibleComponent() const;
     112                 :          0 :         ::svt::IToolPanelDeck*              getPanelDeck() const { return m_pPanelDeck; }
     113                 :            :         ::rtl::OUString                     getPanelDisplayName();
     114                 :            : 
     115                 :            :     private:
     116                 :            :         void impl_notifyBoundRectChanges();
     117                 :            :         void impl_notifyStateChange( const sal_Int16 i_nLostState, const sal_Int16 i_nGainedState );
     118                 :            : 
     119                 :            :     private:
     120                 :            :         AccessibleToolPanelDeckTabBarItem&  m_rAntiImpl;
     121                 :            :         Reference< XAccessible >            m_xAccessibleParent;
     122                 :            :         ::svt::IToolPanelDeck*              m_pPanelDeck;
     123                 :            :         ::svt::PanelTabBar*                 m_pTabBar;
     124                 :            :         size_t                              m_nItemPos;
     125                 :            :     };
     126                 :            : 
     127                 :            :     //==================================================================================================================
     128                 :            :     //= AccessibleToolPanelDeckTabBarItem_Impl
     129                 :            :     //==================================================================================================================
     130                 :            :     //------------------------------------------------------------------------------------------------------------------
     131                 :          0 :     AccessibleToolPanelDeckTabBarItem_Impl::AccessibleToolPanelDeckTabBarItem_Impl( AccessibleToolPanelDeckTabBarItem& i_rAntiImpl,
     132                 :            :             const Reference< XAccessible >& i_rAccessibleParent, ::svt::IToolPanelDeck& i_rPanelDeck, ::svt::PanelTabBar& i_rTabBar,
     133                 :            :             const size_t i_nItemPos )
     134                 :            :         :m_rAntiImpl( i_rAntiImpl )
     135                 :            :         ,m_xAccessibleParent( i_rAccessibleParent )
     136                 :            :         ,m_pPanelDeck( &i_rPanelDeck )
     137                 :            :         ,m_pTabBar( &i_rTabBar )
     138                 :          0 :         ,m_nItemPos( i_nItemPos )
     139                 :            :     {
     140         [ #  # ]:          0 :         m_pPanelDeck->AddListener( *this );
     141                 :          0 :     }
     142                 :            : 
     143                 :            :     //------------------------------------------------------------------------------------------------------------------
     144                 :          0 :     AccessibleToolPanelDeckTabBarItem_Impl::~AccessibleToolPanelDeckTabBarItem_Impl()
     145                 :            :     {
     146         [ #  # ]:          0 :     }
     147                 :            : 
     148                 :            :     //------------------------------------------------------------------------------------------------------------------
     149                 :          0 :     void AccessibleToolPanelDeckTabBarItem_Impl::checkDisposed() const
     150                 :            :     {
     151         [ #  # ]:          0 :         if ( isDisposed() )
     152 [ #  # ][ #  # ]:          0 :             throw DisposedException( ::rtl::OUString(), *&m_rAntiImpl );
     153                 :          0 :     }
     154                 :            : 
     155                 :            :     //------------------------------------------------------------------------------------------------------------------
     156                 :          0 :     void AccessibleToolPanelDeckTabBarItem_Impl::dispose()
     157                 :            :     {
     158         [ #  # ]:          0 :         ENSURE_OR_RETURN_VOID( !isDisposed(), "AccessibleToolPanelDeckTabBarItem_Impl::dispose: disposed twice!" );
     159                 :            : 
     160                 :          0 :         m_xAccessibleParent.clear();
     161                 :          0 :         m_pPanelDeck->RemoveListener( *this );
     162                 :          0 :         m_pPanelDeck = NULL;
     163                 :          0 :         m_pTabBar = NULL;
     164                 :            :     }
     165                 :            : 
     166                 :            :     //------------------------------------------------------------------------------------------------------------------
     167                 :          0 :     Reference< XAccessibleComponent > AccessibleToolPanelDeckTabBarItem_Impl::getParentAccessibleComponent() const
     168                 :            :     {
     169 [ #  # ][ #  # ]:          0 :         Reference< XAccessible > xAccessibleParent( m_rAntiImpl.getAccessibleParent(), UNO_QUERY_THROW );
     170 [ #  # ][ #  # ]:          0 :         return Reference< XAccessibleComponent >( xAccessibleParent->getAccessibleContext(), UNO_QUERY );
                 [ #  # ]
     171                 :            :     }
     172                 :            : 
     173                 :            :     //------------------------------------------------------------------------------------------------------------------
     174                 :          0 :     ::rtl::OUString AccessibleToolPanelDeckTabBarItem_Impl::getPanelDisplayName()
     175                 :            :     {
     176         [ #  # ]:          0 :         const ::svt::PToolPanel pPanel( m_pPanelDeck->GetPanel( getItemPos() ) );
     177         [ #  # ]:          0 :         if ( pPanel.get() == NULL )
     178         [ #  # ]:          0 :             throw DisposedException();
     179 [ #  # ][ #  # ]:          0 :         return pPanel->GetDisplayName();
     180                 :            :     }
     181                 :            : 
     182                 :            :     //------------------------------------------------------------------------------------------------------------------
     183                 :          0 :     void AccessibleToolPanelDeckTabBarItem_Impl::impl_notifyBoundRectChanges()
     184                 :            :     {
     185         [ #  # ]:          0 :         m_rAntiImpl.NotifyAccessibleEvent( AccessibleEventId::BOUNDRECT_CHANGED, Any(), Any() );
     186                 :          0 :     }
     187                 :            : 
     188                 :            :     //------------------------------------------------------------------------------------------------------------------
     189                 :          0 :     void AccessibleToolPanelDeckTabBarItem_Impl::impl_notifyStateChange( const sal_Int16 i_nLostState, const sal_Int16 i_nGainedState )
     190                 :            :     {
     191                 :            :         m_rAntiImpl.NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED,
     192                 :            :             i_nLostState > -1 ? makeAny( i_nLostState ) : Any(),
     193                 :            :             i_nGainedState > -1 ? makeAny( i_nGainedState ) : Any()
     194 [ #  # ][ #  # ]:          0 :         );
         [ #  # ][ #  # ]
     195                 :          0 :     }
     196                 :            : 
     197                 :            :     //------------------------------------------------------------------------------------------------------------------
     198                 :          0 :     void AccessibleToolPanelDeckTabBarItem_Impl::PanelInserted( const ::svt::PToolPanel& i_pPanel, const size_t i_nPosition )
     199                 :            :     {
     200                 :            :         (void)i_pPanel;
     201         [ #  # ]:          0 :         if ( i_nPosition <= m_nItemPos )
     202                 :          0 :             ++m_nItemPos;
     203                 :          0 :         impl_notifyBoundRectChanges();
     204                 :          0 :     }
     205                 :            : 
     206                 :            :     //------------------------------------------------------------------------------------------------------------------
     207                 :          0 :     void AccessibleToolPanelDeckTabBarItem_Impl::PanelRemoved( const size_t i_nPosition )
     208                 :            :     {
     209         [ #  # ]:          0 :         if ( i_nPosition == m_nItemPos )
     210                 :            :         {
     211                 :          0 :             m_rAntiImpl.dispose();
     212                 :            :         }
     213         [ #  # ]:          0 :         else if ( i_nPosition < m_nItemPos )
     214                 :            :         {
     215                 :          0 :             --m_nItemPos;
     216                 :          0 :             impl_notifyBoundRectChanges();
     217                 :            :         }
     218                 :          0 :     }
     219                 :            : 
     220                 :            :     //------------------------------------------------------------------------------------------------------------------
     221                 :          0 :     void AccessibleToolPanelDeckTabBarItem_Impl::ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive )
     222                 :            :     {
     223         [ #  # ]:          0 :         if ( m_nItemPos == i_rOldActive )
     224                 :            :         {
     225                 :          0 :             impl_notifyStateChange( AccessibleStateType::ACTIVE, -1 );
     226                 :          0 :             impl_notifyStateChange( AccessibleStateType::SELECTED, -1 );
     227                 :            :         }
     228         [ #  # ]:          0 :         else if ( m_nItemPos == i_rNewActive )
     229                 :            :         {
     230                 :          0 :             impl_notifyStateChange( -1, AccessibleStateType::ACTIVE );
     231                 :          0 :             impl_notifyStateChange( -1, AccessibleStateType::SELECTED );
     232                 :            :         }
     233                 :          0 :     }
     234                 :            : 
     235                 :            :     //------------------------------------------------------------------------------------------------------------------
     236                 :          0 :     void AccessibleToolPanelDeckTabBarItem_Impl::LayouterChanged( const ::svt::PDeckLayouter& i_rNewLayouter )
     237                 :            :     {
     238                 :            :         (void)i_rNewLayouter;
     239                 :            :         // if the tool panel deck has a new layouter, then the old layouter, and thus all items it was
     240                 :            :         // responsible for, died. So do we.
     241                 :          0 :         dispose();
     242                 :          0 :     }
     243                 :            : 
     244                 :            :     //------------------------------------------------------------------------------------------------------------------
     245                 :          0 :     void AccessibleToolPanelDeckTabBarItem_Impl::Dying()
     246                 :            :     {
     247                 :            :         // if the tool panel deck is dying, then its layouter dies, so should we.
     248                 :          0 :         dispose();
     249                 :          0 :     }
     250                 :            : 
     251                 :            :     //==================================================================================================================
     252                 :            :     //= ItemMethodGuard
     253                 :            :     //==================================================================================================================
     254                 :            :     class ItemMethodGuard
     255                 :            :     {
     256                 :            :     public:
     257                 :          0 :         ItemMethodGuard( AccessibleToolPanelDeckTabBarItem_Impl& i_rImpl )
     258                 :          0 :             :m_aGuard()
     259                 :            :         {
     260         [ #  # ]:          0 :             i_rImpl.checkDisposed();
     261                 :          0 :         }
     262                 :          0 :         ~ItemMethodGuard()
     263                 :          0 :         {
     264                 :          0 :         }
     265                 :            : 
     266                 :            :     private:
     267                 :            :         SolarMutexGuard  m_aGuard;
     268                 :            :     };
     269                 :            : 
     270                 :            :     //==================================================================================================================
     271                 :            :     //= AccessibleToolPanelDeckTabBarItem
     272                 :            :     //==================================================================================================================
     273                 :            :     //------------------------------------------------------------------------------------------------------------------
     274                 :          0 :     AccessibleToolPanelDeckTabBarItem::AccessibleToolPanelDeckTabBarItem( const Reference< XAccessible >& i_rAccessibleParent,
     275                 :            :             ::svt::IToolPanelDeck& i_rPanelDeck, ::svt::PanelTabBar& i_rTabBar, const size_t i_nItemPos )
     276 [ #  # ][ #  # ]:          0 :         :m_pImpl( new AccessibleToolPanelDeckTabBarItem_Impl( *this, i_rAccessibleParent, i_rPanelDeck, i_rTabBar, i_nItemPos ) )
     277                 :            :     {
     278                 :          0 :     }
     279                 :            : 
     280                 :            :     //------------------------------------------------------------------------------------------------------------------
     281         [ #  # ]:          0 :     AccessibleToolPanelDeckTabBarItem::~AccessibleToolPanelDeckTabBarItem()
     282                 :            :     {
     283         [ #  # ]:          0 :     }
     284                 :            : 
     285                 :            :     //--------------------------------------------------------------------
     286                 :          0 :     sal_Int32 SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleChildCount(  ) throw (RuntimeException)
     287                 :            :     {
     288                 :          0 :         return 0;
     289                 :            :     }
     290                 :            : 
     291                 :            :     //--------------------------------------------------------------------
     292                 :          0 :     Reference< XAccessible > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleChild( sal_Int32 i ) throw (IndexOutOfBoundsException, RuntimeException)
     293                 :            :     {
     294                 :            :         (void)i;
     295 [ #  # ][ #  # ]:          0 :         throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
     296                 :            :     }
     297                 :            : 
     298                 :            :     //--------------------------------------------------------------------
     299                 :          0 :     Reference< XAccessible > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleParent(  ) throw (RuntimeException)
     300                 :            :     {
     301         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     302         [ #  # ]:          0 :         return m_pImpl->getAccessibleParent();
     303                 :            :     }
     304                 :            : 
     305                 :            :     //--------------------------------------------------------------------
     306                 :          0 :     sal_Int16 SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleRole(  ) throw (RuntimeException)
     307                 :            :     {
     308                 :          0 :         return AccessibleRole::PAGE_TAB;
     309                 :            :     }
     310                 :            : 
     311                 :            :     //--------------------------------------------------------------------
     312                 :          0 :     ::rtl::OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleDescription(  ) throw (RuntimeException)
     313                 :            :     {
     314         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     315 [ #  # ][ #  # ]:          0 :         return m_pImpl->getPanelDisplayName();
     316                 :            :     }
     317                 :            : 
     318                 :            :     //--------------------------------------------------------------------
     319                 :          0 :     ::rtl::OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleName(  ) throw (RuntimeException)
     320                 :            :     {
     321         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     322 [ #  # ][ #  # ]:          0 :         return m_pImpl->getPanelDisplayName();
     323                 :            :     }
     324                 :            : 
     325                 :            :     //--------------------------------------------------------------------
     326                 :          0 :     Reference< XAccessibleRelationSet > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleRelationSet(  ) throw (RuntimeException)
     327                 :            :     {
     328         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     329         [ #  # ]:          0 :         ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper;
     330 [ #  # ][ #  # ]:          0 :         return pRelationSet;
                 [ #  # ]
     331                 :            :     }
     332                 :            : 
     333                 :            :     //--------------------------------------------------------------------
     334                 :          0 :     Reference< XAccessibleStateSet > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleStateSet(  ) throw (RuntimeException)
     335                 :            :     {
     336         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     337                 :            : 
     338         [ #  # ]:          0 :         ::utl::AccessibleStateSetHelper* pStateSet( new ::utl::AccessibleStateSetHelper );
     339         [ #  # ]:          0 :         pStateSet->AddState( AccessibleStateType::FOCUSABLE );
     340         [ #  # ]:          0 :         pStateSet->AddState( AccessibleStateType::SELECTABLE );
     341         [ #  # ]:          0 :         pStateSet->AddState( AccessibleStateType::ICONIFIED );
     342                 :            : 
     343 [ #  # ][ #  # ]:          0 :         if ( m_pImpl->getItemPos() == m_pImpl->getPanelDeck()->GetActivePanel() )
         [ #  # ][ #  # ]
     344                 :            :         {
     345         [ #  # ]:          0 :             pStateSet->AddState( AccessibleStateType::ACTIVE );
     346         [ #  # ]:          0 :             pStateSet->AddState( AccessibleStateType::SELECTED );
     347                 :            :         }
     348                 :            : 
     349 [ #  # ][ #  # ]:          0 :         if ( m_pImpl->getItemPos() == m_pImpl->getTabBar()->GetFocusedPanelItem() )
         [ #  # ][ #  # ]
     350         [ #  # ]:          0 :             pStateSet->AddState( AccessibleStateType::FOCUSED );
     351                 :            : 
     352 [ #  # ][ #  # ]:          0 :         if ( m_pImpl->getTabBar()->IsEnabled() )
     353         [ #  # ]:          0 :             pStateSet->AddState( AccessibleStateType::ENABLED );
     354                 :            : 
     355 [ #  # ][ #  # ]:          0 :         if ( m_pImpl->getTabBar()->IsVisible() )
     356                 :            :         {
     357         [ #  # ]:          0 :             pStateSet->AddState( AccessibleStateType::SHOWING );
     358         [ #  # ]:          0 :             pStateSet->AddState( AccessibleStateType::VISIBLE );
     359                 :            :         }
     360                 :            : 
     361 [ #  # ][ #  # ]:          0 :         return pStateSet;
                 [ #  # ]
     362                 :            :     }
     363                 :            : 
     364                 :            : 
     365                 :            :     //--------------------------------------------------------------------
     366                 :          0 :     Reference< XAccessible > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleAtPoint( const UnoPoint& i_rLocation ) throw (RuntimeException)
     367                 :            :     {
     368         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     369                 :            :         // we do not have children ...
     370                 :            :         (void)i_rLocation;
     371 [ #  # ][ #  # ]:          0 :         return NULL;
     372                 :            :     }
     373                 :            : 
     374                 :            :     //--------------------------------------------------------------------
     375                 :          0 :     void SAL_CALL AccessibleToolPanelDeckTabBarItem::grabFocus(  ) throw (RuntimeException)
     376                 :            :     {
     377         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     378 [ #  # ][ #  # ]:          0 :         m_pImpl->getTabBar()->FocusPanelItem( m_pImpl->getItemPos() );
     379                 :          0 :     }
     380                 :            : 
     381                 :            :     //--------------------------------------------------------------------
     382                 :          0 :     ::sal_Int32 SAL_CALL AccessibleToolPanelDeckTabBarItem::getForeground(  ) throw (RuntimeException)
     383                 :            :     {
     384         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     385 [ #  # ][ #  # ]:          0 :         Reference< XAccessibleComponent > xParentComponent( m_pImpl->getParentAccessibleComponent(), UNO_SET_THROW );
     386 [ #  # ][ #  # ]:          0 :         return xParentComponent->getForeground();
                 [ #  # ]
     387                 :            :     }
     388                 :            : 
     389                 :            :     //--------------------------------------------------------------------
     390                 :          0 :     ::sal_Int32 SAL_CALL AccessibleToolPanelDeckTabBarItem::getBackground(  ) throw (RuntimeException)
     391                 :            :     {
     392         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     393 [ #  # ][ #  # ]:          0 :         Reference< XAccessibleComponent > xParentComponent( m_pImpl->getParentAccessibleComponent(), UNO_SET_THROW );
     394 [ #  # ][ #  # ]:          0 :         return xParentComponent->getBackground();
                 [ #  # ]
     395                 :            :     }
     396                 :            : 
     397                 :            :     //--------------------------------------------------------------------
     398                 :          0 :     Reference< XFont > SAL_CALL AccessibleToolPanelDeckTabBarItem::getFont(  ) throw (RuntimeException)
     399                 :            :     {
     400         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     401 [ #  # ][ #  # ]:          0 :         Reference< XAccessibleExtendedComponent > xParentComponent( m_pImpl->getParentAccessibleComponent(), UNO_QUERY_THROW );
     402                 :            :         // TODO: strictly, this is not correct: The TabBar implementation of the TabLayouter might use
     403                 :            :         // a different font ...
     404 [ #  # ][ #  # ]:          0 :         return xParentComponent->getFont();
                 [ #  # ]
     405                 :            :     }
     406                 :            : 
     407                 :            :     //--------------------------------------------------------------------
     408                 :          0 :     ::rtl::OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getTitledBorderText(  ) throw (RuntimeException)
     409                 :            :     {
     410         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     411                 :            :         // no support
     412         [ #  # ]:          0 :         return ::rtl::OUString();
     413                 :            :     }
     414                 :            : 
     415                 :            :     //--------------------------------------------------------------------
     416                 :          0 :     ::rtl::OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getToolTipText(  ) throw (RuntimeException)
     417                 :            :     {
     418         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     419 [ #  # ][ #  # ]:          0 :         return m_pImpl->getPanelDisplayName();
     420                 :            :     }
     421                 :            : 
     422                 :            :     //--------------------------------------------------------------------
     423                 :          0 :     UnoRectangle SAL_CALL AccessibleToolPanelDeckTabBarItem::implGetBounds() throw (RuntimeException)
     424                 :            :     {
     425         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     426                 :            : 
     427         [ #  # ]:          0 :         const ::Rectangle aItemScreenRect( m_pImpl->getTabBar()->GetItemScreenRect( m_pImpl->getItemPos() ) );
     428                 :            : 
     429 [ #  # ][ #  # ]:          0 :         Reference< XAccessibleComponent > xParentComponent( m_pImpl->getParentAccessibleComponent(), UNO_SET_THROW );
     430 [ #  # ][ #  # ]:          0 :         const UnoPoint aParentLocation( xParentComponent->getLocationOnScreen() );
     431                 :            :         return UnoRectangle(
     432                 :          0 :             aItemScreenRect.Left() - aParentLocation.X,
     433                 :          0 :             aItemScreenRect.Top() - aParentLocation.Y,
     434         [ #  # ]:          0 :             aItemScreenRect.GetWidth(),
     435         [ #  # ]:          0 :             aItemScreenRect.GetHeight()
     436         [ #  # ]:          0 :         );
     437                 :            :     }
     438                 :            : 
     439                 :            :     //--------------------------------------------------------------------
     440                 :          0 :     void SAL_CALL AccessibleToolPanelDeckTabBarItem::disposing()
     441                 :            :     {
     442         [ #  # ]:          0 :         ItemMethodGuard aGuard( *m_pImpl );
     443 [ #  # ][ #  # ]:          0 :         m_pImpl->dispose();
     444                 :          0 :     }
     445                 :            : 
     446                 :            : //......................................................................................................................
     447                 :            : } // namespace accessibility
     448                 :            : //......................................................................................................................
     449                 :            : 
     450                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10