LCOV - code coverage report
Current view: top level - svx/source/inc - svxrectctaccessiblecontext.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 8 0.0 %
Date: 2014-04-11 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : 
      21             : #ifndef INCLUDED_SVX_SOURCE_INC_SVXRECTCTACCESSIBLECONTEXT_HXX
      22             : #define INCLUDED_SVX_SOURCE_INC_SVXRECTCTACCESSIBLECONTEXT_HXX
      23             : 
      24             : #include <com/sun/star/accessibility/XAccessible.hpp>
      25             : #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
      26             : #include <com/sun/star/accessibility/XAccessibleContext.hpp>
      27             : #include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
      28             : #include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
      29             : #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
      30             : #include <com/sun/star/accessibility/XAccessibleAction.hpp>
      31             : #include <com/sun/star/accessibility/XAccessibleValue.hpp>
      32             : #include <com/sun/star/beans/XPropertyChangeListener.hpp>
      33             : #include <com/sun/star/uno/Reference.hxx>
      34             : #include <cppuhelper/weak.hxx>
      35             : #include <com/sun/star/lang/XServiceInfo.hpp>
      36             : #include <com/sun/star/lang/XTypeProvider.hpp>
      37             : #include <com/sun/star/lang/XServiceName.hpp>
      38             : #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
      39             : #include <com/sun/star/lang/DisposedException.hpp>
      40             : #include <osl/mutex.hxx>
      41             : #include <cppuhelper/interfacecontainer.h>
      42             : #include <cppuhelper/compbase6.hxx>
      43             : #include <cppuhelper/compbase7.hxx>
      44             : #include <comphelper/broadcasthelper.hxx>
      45             : #include <cppuhelper/implbase6.hxx>
      46             : #include <cppuhelper/implbase7.hxx>
      47             : #include <comphelper/servicehelper.hxx>
      48             : #include <svx/rectenum.hxx>
      49             : 
      50             : namespace com { namespace sun { namespace star { namespace awt {
      51             :     struct Point;
      52             :     struct Rectangle;
      53             :     struct Size;
      54             :     class XFocusListener;
      55             : } } } }
      56             : 
      57             : class Rectangle;
      58             : class SvxRectCtl;
      59             : class SvxRectCtlChildAccessibleContext;
      60             : class Window;
      61             : 
      62             : 
      63             : typedef ::cppu::WeakAggComponentImplHelper6<
      64             :             ::com::sun::star::accessibility::XAccessible,
      65             :             ::com::sun::star::accessibility::XAccessibleComponent,
      66             :             ::com::sun::star::accessibility::XAccessibleContext,
      67             :             ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
      68             :             ::com::sun::star::accessibility::XAccessibleSelection,
      69             :             ::com::sun::star::lang::XServiceInfo >
      70             :             SvxRectCtlAccessibleContext_Base;
      71             : 
      72             : class SvxRectCtlAccessibleContext : public ::comphelper::OBaseMutex, public SvxRectCtlAccessibleContext_Base
      73             : {
      74             : public:
      75             :     //=====  internal  ========================================================
      76             :     SvxRectCtlAccessibleContext(
      77             :         const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent,
      78             :         SvxRectCtl&             rRepresentation,
      79             :         const OUString*  pName = NULL,
      80             :         const OUString*  pDescription = NULL );
      81             : protected:
      82             :     virtual ~SvxRectCtlAccessibleContext();
      83             : public:
      84             :     //=====  XAccessible  =====================================================
      85             : 
      86             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
      87             :         getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      88             : 
      89             :     //=====  XAccessibleComponent  ============================================
      90             : 
      91             :     virtual sal_Bool SAL_CALL
      92             :         containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      93             : 
      94             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
      95             :         getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      96             : 
      97             :     virtual ::com::sun::star::awt::Rectangle SAL_CALL
      98             :         getBounds() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      99             : 
     100             :     virtual ::com::sun::star::awt::Point SAL_CALL
     101             :         getLocation() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     102             : 
     103             :     virtual ::com::sun::star::awt::Point SAL_CALL
     104             :         getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     105             : 
     106             :     virtual ::com::sun::star::awt::Size SAL_CALL
     107             :         getSize() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     108             : 
     109             :     virtual sal_Bool SAL_CALL
     110             :         isShowing() throw( ::com::sun::star::uno::RuntimeException );
     111             : 
     112             :     virtual sal_Bool SAL_CALL
     113             :         isVisible() throw( ::com::sun::star::uno::RuntimeException );
     114             : 
     115             :     virtual sal_Bool SAL_CALL
     116             :         isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
     117             : 
     118             :     virtual void SAL_CALL
     119             :         addFocusListener(
     120             :             const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
     121             :             throw( ::com::sun::star::uno::RuntimeException );
     122             : 
     123             :     virtual void SAL_CALL
     124             :         removeFocusListener(
     125             :             const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
     126             :             throw( ::com::sun::star::uno::RuntimeException );
     127             : 
     128             :     virtual void SAL_CALL
     129             :         grabFocus() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     130             : 
     131             :     virtual ::com::sun::star::uno::Any SAL_CALL
     132             :         getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
     133             :     virtual sal_Int32 SAL_CALL
     134             :         getForeground(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     135             :     virtual sal_Int32 SAL_CALL
     136             :         getBackground(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     137             : 
     138             :     //=====  XAccessibleContext  ==============================================
     139             : 
     140             :     virtual sal_Int32 SAL_CALL
     141             :         getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     142             : 
     143             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
     144             :         getAccessibleChild( sal_Int32 nIndex )
     145             :             throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException, std::exception ) SAL_OVERRIDE;
     146             : 
     147             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
     148             :         getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     149             : 
     150             :     virtual sal_Int32 SAL_CALL
     151             :         getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     152             : 
     153             :     virtual sal_Int16 SAL_CALL
     154             :         getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     155             : 
     156             :     virtual OUString SAL_CALL
     157             :         getAccessibleDescription( void ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     158             : 
     159             :     virtual OUString SAL_CALL
     160             :         getAccessibleName( void ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     161             : 
     162             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
     163             :         getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     164             : 
     165             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
     166             :         getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     167             : 
     168             :     virtual ::com::sun::star::lang::Locale SAL_CALL
     169             :         getLocale( void )
     170             :             throw(  ::com::sun::star::uno::RuntimeException,
     171             :                     ::com::sun::star::accessibility::IllegalAccessibleComponentStateException, std::exception ) SAL_OVERRIDE;
     172             : 
     173             :     //=====  XAccessibleEventBroadcaster  =====================================
     174             : 
     175             :     virtual void SAL_CALL
     176             :         addAccessibleEventListener(
     177             :             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
     178             :             throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     179             : 
     180             :     virtual void SAL_CALL
     181             :         removeAccessibleEventListener(
     182             :             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
     183             :             throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     184             : 
     185             :     //=====  XServiceInfo  ====================================================
     186             : 
     187             :     virtual OUString SAL_CALL
     188             :         getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     189             : 
     190             :     virtual sal_Bool SAL_CALL
     191             :         supportsService( const OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     192             : 
     193             :     virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL
     194             :         getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     195             : 
     196             :     //=====  XTypeProvider  ===================================================
     197             : 
     198             :     virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
     199             :         getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     200             : 
     201             :     //=====  XAccessibleSelection =============================================
     202             : 
     203             :     virtual void SAL_CALL
     204             :         selectAccessibleChild( sal_Int32 nChildIndex )
     205             :             throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     206             : 
     207             :     virtual sal_Bool SAL_CALL
     208             :         isAccessibleChildSelected( sal_Int32 nChildIndex )
     209             :             throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     210             : 
     211             :     virtual void SAL_CALL
     212             :         clearAccessibleSelection() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     213             : 
     214             :     virtual void SAL_CALL
     215             :         selectAllAccessibleChildren() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     216             : 
     217             :     virtual sal_Int32 SAL_CALL
     218             :         getSelectedAccessibleChildCount() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     219             : 
     220             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
     221             :         getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
     222             :             throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     223             : 
     224             :     virtual void SAL_CALL
     225             :         deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
     226             :             throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     227             : 
     228             : 
     229             : protected:
     230             :     //=====  internals ========================================================
     231             : 
     232             :     void checkChildIndex( long nIndexOfChild ) throw( ::com::sun::star::lang::IndexOutOfBoundsException );
     233             : 
     234             :     void checkChildIndexOnSelection( long nIndexOfChild ) throw( ::com::sun::star::lang::IndexOutOfBoundsException );
     235             : 
     236             :     /** Selects a new child by index.
     237             : 
     238             :         <p>If the child was not selected before, the state of the child will
     239             :         be updated. If the index is invalid, the index will internally set to NOCHILDSELECTED</p>
     240             : 
     241             :         @param nIndexOfChild
     242             :             Index of the new child which should be selected.
     243             :     */
     244             :     void selectChild( long nIndexOfChild, sal_Bool bFireFocus = sal_True);
     245             : 
     246             : public:
     247             :     /** Selects a new child by point.
     248             : 
     249             :         <p>If the child was not selected before, the state of the child will
     250             :         be updated. If the point is not invalid, the index will internally set to NOCHILDSELECTED</p>
     251             : 
     252             :         @param eButton
     253             :             Button which belongs to the child which should be selected.
     254             :     */
     255             :     void selectChild( RECT_POINT ePoint, sal_Bool bFireFocus = sal_True );
     256             :     void FireChildFocus( RECT_POINT eButton );
     257             : 
     258             : protected:
     259             : 
     260             :     /// @Return the object's current bounding box relative to the desktop.
     261             :     virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
     262             : 
     263             :     /// @Return the object's current bounding box relative to the parent object.
     264             :     virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
     265             : 
     266             :     /// Calls all Listener to tell they the change.
     267             :     void CommitChange( const com::sun::star::accessibility::AccessibleEventObject& rEvent );
     268             : 
     269             :     virtual void SAL_CALL disposing() SAL_OVERRIDE;
     270             : 
     271             :     /// @returns true if it's disposed or in disposing
     272             :     inline bool IsAlive( void ) const;
     273             : 
     274             :     /// @returns true if it's not disposed and no in disposing
     275             :     inline bool IsNotAlive( void ) const;
     276             : 
     277             :     /// throws the exception DisposedException if it's not alive
     278             :     void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
     279             : 
     280             : private:
     281             :     /** Description of this object.  This is not a constant because it can
     282             :         be set from the outside.
     283             :     */
     284             :     OUString                     msDescription;
     285             : 
     286             :     /** Name of this object.
     287             :     */
     288             :     OUString                     msName;
     289             : 
     290             :     /// Reference to the parent object.
     291             :     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
     292             :                                         mxParent;
     293             : 
     294             :     /// pointer to internal representation
     295             :     SvxRectCtl*                         mpRepr;
     296             : 
     297             :     /// array for all possible children
     298             :     SvxRectCtlChildAccessibleContext**  mpChildren;
     299             : 
     300             :     /// client id in the AccessibleEventNotifier queue
     301             :     sal_uInt32 mnClientId;
     302             : 
     303             :     /// actual selected child
     304             :     long                                mnSelectedChild;
     305             : 
     306             :     /// mode of control (true -> 8 points, false -> 9 points)
     307             :     bool                            mbAngleMode;
     308             : };
     309             : 
     310           0 : inline bool SvxRectCtlAccessibleContext::IsAlive( void ) const
     311             : {
     312           0 :     return !rBHelper.bDisposed && !rBHelper.bInDispose;
     313             : }
     314             : 
     315           0 : inline bool SvxRectCtlAccessibleContext::IsNotAlive( void ) const
     316             : {
     317           0 :     return rBHelper.bDisposed || rBHelper.bInDispose;
     318             : }
     319             : 
     320             : typedef ::cppu::WeakAggComponentImplHelper7<
     321             :             ::com::sun::star::accessibility::XAccessible,
     322             :             ::com::sun::star::accessibility::XAccessibleComponent,
     323             :             ::com::sun::star::accessibility::XAccessibleContext,
     324             :             ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
     325             :             ::com::sun::star::accessibility::XAccessibleValue,
     326             :             ::com::sun::star::accessibility::XAccessibleAction,
     327             :             ::com::sun::star::lang::XServiceInfo >
     328             :             SvxRectCtlChildAccessibleContext_Base;
     329             : 
     330             : class SvxRectCtlChildAccessibleContext : public SvxRectCtlChildAccessibleContext_Base
     331             : {
     332             : public:
     333             :     SvxRectCtlChildAccessibleContext(
     334             :         const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent,
     335             :         const Window& rParentWindow,
     336             :         const OUString& rName, const OUString& rDescription,
     337             :         const Rectangle& rBoundingBox,
     338             :         long nIndexInParent );
     339             : protected:
     340             :     virtual ~SvxRectCtlChildAccessibleContext();
     341             : public:
     342             :     //=====  XAccessible  =====================================================
     343             : 
     344             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
     345             :         getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     346             : 
     347             :     //=====  XAccessibleComponent  ============================================
     348             : 
     349             :     virtual sal_Bool SAL_CALL
     350             :         containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     351             : 
     352             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
     353             :         getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     354             : 
     355             :     virtual ::com::sun::star::awt::Rectangle SAL_CALL
     356             :         getBounds() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     357             : 
     358             :     virtual ::com::sun::star::awt::Point SAL_CALL
     359             :         getLocation() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     360             : 
     361             :     virtual ::com::sun::star::awt::Point SAL_CALL
     362             :         getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     363             : 
     364             :     virtual ::com::sun::star::awt::Size SAL_CALL
     365             :         getSize() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     366             : 
     367             :     virtual sal_Bool SAL_CALL
     368             :         isShowing() throw( ::com::sun::star::uno::RuntimeException );
     369             : 
     370             :     virtual sal_Bool SAL_CALL
     371             :         isVisible() throw( ::com::sun::star::uno::RuntimeException );
     372             : 
     373             :     virtual sal_Bool SAL_CALL
     374             :         isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
     375             : 
     376             :     virtual void SAL_CALL
     377             :         addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
     378             :             throw( ::com::sun::star::uno::RuntimeException );
     379             : 
     380             :     virtual void SAL_CALL
     381             :         removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
     382             :             throw (::com::sun::star::uno::RuntimeException);
     383             : 
     384             :     virtual void SAL_CALL
     385             :         grabFocus() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     386             : 
     387             :     virtual ::com::sun::star::uno::Any SAL_CALL
     388             :         getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
     389             :     virtual sal_Int32 SAL_CALL
     390             :         getForeground(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     391             :     virtual sal_Int32 SAL_CALL
     392             :         getBackground(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     393             : 
     394             :     //=====  XAccessibleContext  ==============================================
     395             : 
     396             :     virtual sal_Int32 SAL_CALL
     397             :         getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     398             : 
     399             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
     400             :         getAccessibleChild( sal_Int32 nIndex )
     401             :             throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException, std::exception ) SAL_OVERRIDE;
     402             : 
     403             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
     404             :         getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     405             : 
     406             :     virtual sal_Int32 SAL_CALL
     407             :         getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     408             : 
     409             :     virtual sal_Int16 SAL_CALL
     410             :         getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     411             : 
     412             :     virtual OUString SAL_CALL
     413             :         getAccessibleDescription( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     414             : 
     415             :     virtual OUString SAL_CALL
     416             :         getAccessibleName( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     417             : 
     418             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
     419             :         getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     420             : 
     421             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
     422             :         getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     423             : 
     424             :     virtual ::com::sun::star::lang::Locale SAL_CALL
     425             :         getLocale( void )
     426             :             throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::accessibility::IllegalAccessibleComponentStateException, std::exception ) SAL_OVERRIDE;
     427             : 
     428             :     //=====  XAccessibleEventBroadcaster  =====================================
     429             : 
     430             :     virtual void SAL_CALL
     431             :         addAccessibleEventListener(
     432             :             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
     433             :             throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     434             : 
     435             :     virtual void SAL_CALL
     436             :         removeAccessibleEventListener(
     437             :             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
     438             :             throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     439             : 
     440             :     //=====  XAccessibleValue  ================================================
     441             : 
     442             :     virtual ::com::sun::star::uno::Any SAL_CALL
     443             :         getCurrentValue() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     444             : 
     445             :     virtual sal_Bool SAL_CALL
     446             :         setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     447             : 
     448             :     virtual ::com::sun::star::uno::Any SAL_CALL
     449             :         getMaximumValue() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     450             : 
     451             :     virtual ::com::sun::star::uno::Any SAL_CALL
     452             :         getMinimumValue() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     453             : 
     454             :     // XAccessibleAction
     455             :     virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     456             :     virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     457             :     virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     458             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     459             :     //=====  XServiceInfo  ====================================================
     460             : 
     461             :     virtual OUString SAL_CALL
     462             :         getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     463             : 
     464             :     virtual sal_Bool SAL_CALL
     465             :         supportsService( const OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     466             : 
     467             :     virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL
     468             :         getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     469             : 
     470             : 
     471             :     //=====  XTypeProvider  ===================================================
     472             : 
     473             :     virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
     474             :         getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     475             : 
     476             :     //===== internal ==========================================================
     477             : 
     478             :     /// Sets the checked status
     479             :     void setStateChecked(bool bChecked, bool bFireFocus = true);
     480             :     void FireFocusEvent();
     481             : 
     482             : protected:
     483             :     virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
     484             : 
     485             :     virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
     486             : 
     487             :     void CommitChange( const com::sun::star::accessibility::AccessibleEventObject& rEvent );
     488             : 
     489             :     virtual void SAL_CALL disposing() SAL_OVERRIDE;
     490             : 
     491             :     /// @returns true if it's disposed or in disposing
     492             :     inline bool IsAlive( void ) const;
     493             : 
     494             :     /// @returns true if it's not disposed and no in disposing
     495             :     inline bool IsNotAlive( void ) const;
     496             : 
     497             :     /// throws the exception DisposedException if it's not alive
     498             :     void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
     499             : 
     500             :     /// Mutex guarding this object.
     501             :     ::osl::Mutex                        maMutex;
     502             : 
     503             : private:
     504             : 
     505             :     /** Description of this object.  This is not a constant because it can
     506             :         be set from the outside.  Furthermore, it changes according the the
     507             :         draw page's display mode.
     508             :     */
     509             :     OUString                     msDescription;
     510             : 
     511             :     /** Name of this object.  It changes according the draw page's
     512             :         display mode.
     513             :     */
     514             :     OUString                     msName;
     515             : 
     516             :     /// Reference to the parent object.
     517             :     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
     518             :                                         mxParent;
     519             : 
     520             :     /// Bounding box
     521             :     Rectangle*                          mpBoundingBox;
     522             : 
     523             :     /// window of parent
     524             :     const Window&                       mrParentWindow;
     525             : 
     526             :     /// client id in the AccessibleEventNotifier queue
     527             :     sal_uInt32                          mnClientId;
     528             : 
     529             :     /// index of child in parent
     530             :     long                                mnIndexInParent;
     531             : 
     532             :     /// Indicates, if object is checked
     533             :     bool                            mbIsChecked;
     534             : };
     535             : 
     536           0 : inline bool SvxRectCtlChildAccessibleContext::IsAlive( void ) const
     537             : {
     538           0 :     return !rBHelper.bDisposed && !rBHelper.bInDispose;
     539             : }
     540             : 
     541           0 : inline bool SvxRectCtlChildAccessibleContext::IsNotAlive( void ) const
     542             : {
     543           0 :     return rBHelper.bDisposed || rBHelper.bInDispose;
     544             : }
     545             : 
     546             : 
     547             : #endif
     548             : 
     549             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10