xref: /aoo42x/main/dbaccess/source/ui/inc/JAccess.hxx (revision 2e2212a7)
1 /**************************************************************
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
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
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.
19  *
20  *************************************************************/
21 
22 
23 #ifndef DBACCESS_JACCESS_HXX
24 #define DBACCESS_JACCESS_HXX
25 
26 #ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
27 #include <toolkit/awt/vclxaccessiblecomponent.hxx>
28 #endif
29 #ifndef _CPPUHELPER_IMPLBASE1_HXX_
30 #include <cppuhelper/implbase1.hxx>
31 #endif
32 
33 namespace dbaui
34 {
35 	class OJoinTableView;
36 	typedef ::cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessible
37 											> OJoinDesignViewAccess_BASE;
38 	/** the class OJoinDesignViewAccess represents the accessible object for join views
39 		like the QueryDesign and the RelationDesign
40 	*/
41 	class OJoinDesignViewAccess		:	public VCLXAccessibleComponent, public OJoinDesignViewAccess_BASE
42 	{
43 		OJoinTableView*	m_pTableView; // the window which I should give accessibility to
44 
45 	protected:
46 		/** isEditable returns the current editable state
47 			@return	true if the controller is not readonly otherwise false
48 		*/
49 		virtual sal_Bool isEditable() const;
50 	public:
51 		/** OJoinDesignViewAccess needs a valid view
52 		*/
53 		OJoinDesignViewAccess(	OJoinTableView* _pTableView);
54 
55 		// XInterface
56 		DECLARE_XINTERFACE( )
57 		DECLARE_XTYPEPROVIDER( )
58 
59 		// XServiceInfo - static methods
60 		static ::rtl::OUString getImplementationName_Static(void) throw( com::sun::star::uno::RuntimeException );
61 
62 		virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
63 
64 		// XAccessible
65 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException);
66 
67 		// XAccessibleContext
68 		virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
69 		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);
70 		virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
71 
getTableView() const72 		OJoinTableView*	getTableView() const { return m_pTableView; }
73 
notifyAccessibleEvent(const sal_Int16 _nEventId,const::com::sun::star::uno::Any & _rOldValue,const::com::sun::star::uno::Any & _rNewValue)74 		void notifyAccessibleEvent(
75 					const sal_Int16 _nEventId,
76 					const ::com::sun::star::uno::Any& _rOldValue,
77 					const ::com::sun::star::uno::Any& _rNewValue
78 				)
79 		{
80 			NotifyAccessibleEvent(_nEventId,_rOldValue,_rNewValue);
81 		}
82 
83         void clearTableView();
84 	};
85 }
86 #endif // DBACCESS_JACCESS_HXX
87