1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: TableWindowAccess.hxx,v $
10 * $Revision: 1.7.74.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef DBACCESS_TABLEWINDOWACCESS_HXX
31 #define DBACCESS_TABLEWINDOWACCESS_HXX
33 #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLERELATIONSET_HPP_
34 #include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
36 #ifndef _CPPUHELPER_IMPLBASE2_HXX_
37 #include <cppuhelper/implbase2.hxx>
39 #ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
40 #include <toolkit/awt/vclxaccessiblecomponent.hxx>
45 typedef ::cppu::ImplHelper2
< ::com::sun::star::accessibility::XAccessibleRelationSet
,
46 ::com::sun::star::accessibility::XAccessible
47 > OTableWindowAccess_BASE
;
49 /** the class OTableWindowAccess represents the accessible object for table windows
50 like they are used in the QueryDesign and the RelationDesign
52 class OTableWindowAccess
: public VCLXAccessibleComponent
53 , public OTableWindowAccess_BASE
55 OTableWindow
* m_pTable
; // the window which I should give accessibility to
57 ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> getParentChild(sal_Int32 _nIndex
);
59 /** this function is called upon disposing the component
61 virtual void SAL_CALL
disposing();
63 /** isEditable returns the current editable state
64 @return true if it is editable otherwise false
66 virtual sal_Bool
isEditable() const;
68 virtual void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
);
70 OTableWindowAccess( OTableWindow
* _pTable
);
73 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
) throw (::com::sun::star::uno::RuntimeException
);
74 virtual void SAL_CALL
acquire( ) throw ()
75 { // here inline is allowed because we do not use this class outside this dll
76 VCLXAccessibleComponent::acquire( );
78 virtual void SAL_CALL
release( ) throw ()
79 { // here inline is allowed because we do not use this class outside this dll
80 VCLXAccessibleComponent::release( );
84 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw (::com::sun::star::uno::RuntimeException
);
87 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw(com::sun::star::uno::RuntimeException
);
88 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames() throw(com::sun::star::uno::RuntimeException
);
90 // XServiceInfo - static methods
91 static com::sun::star::uno::Sequence
< ::rtl::OUString
> getSupportedServiceNames_Static(void) throw( com::sun::star::uno::RuntimeException
);
92 static ::rtl::OUString
getImplementationName_Static(void) throw( com::sun::star::uno::RuntimeException
);
95 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException
);
98 virtual sal_Int32 SAL_CALL
getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException
);
99 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
getAccessibleChild( sal_Int32 i
) throw (::com::sun::star::lang::IndexOutOfBoundsException
,::com::sun::star::uno::RuntimeException
);
100 virtual sal_Int32 SAL_CALL
getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException
);
101 virtual sal_Int16 SAL_CALL
getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException
);
102 virtual ::rtl::OUString SAL_CALL
getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException
);
103 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException
);
105 // XAccessibleComponent
106 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
getAccessibleAtPoint( const ::com::sun::star::awt::Point
& aPoint
) throw (::com::sun::star::uno::RuntimeException
);
108 // XAccessibleExtendedComponent
109 virtual ::rtl::OUString SAL_CALL
getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException
);
111 // XAccessibleRelationSet
112 virtual sal_Int32 SAL_CALL
getRelationCount( ) throw (::com::sun::star::uno::RuntimeException
);
113 virtual ::com::sun::star::accessibility::AccessibleRelation SAL_CALL
getRelation( sal_Int32 nIndex
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
114 virtual sal_Bool SAL_CALL
containsRelation( sal_Int16 aRelationType
) throw (::com::sun::star::uno::RuntimeException
);
115 virtual ::com::sun::star::accessibility::AccessibleRelation SAL_CALL
getRelationByType( sal_Int16 aRelationType
) throw (::com::sun::star::uno::RuntimeException
);
117 void notifyAccessibleEvent(
118 const sal_Int16 _nEventId
,
119 const ::com::sun::star::uno::Any
& _rOldValue
,
120 const ::com::sun::star::uno::Any
& _rNewValue
123 NotifyAccessibleEvent(_nEventId
,_rOldValue
,_rNewValue
);
127 #endif // DBACCESS_TABLEWINDOWACCESS_HXX