1*2e2212a7SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*2e2212a7SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2e2212a7SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2e2212a7SAndrew Rist * distributed with this work for additional information 6*2e2212a7SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2e2212a7SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2e2212a7SAndrew Rist * "License"); you may not use this file except in compliance 9*2e2212a7SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*2e2212a7SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*2e2212a7SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2e2212a7SAndrew Rist * software distributed under the License is distributed on an 15*2e2212a7SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2e2212a7SAndrew Rist * KIND, either express or implied. See the License for the 17*2e2212a7SAndrew Rist * specific language governing permissions and limitations 18*2e2212a7SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*2e2212a7SAndrew Rist *************************************************************/ 21*2e2212a7SAndrew Rist 22*2e2212a7SAndrew Rist 23cdf0e10cSrcweir #ifndef DBACCESS_JACCESS_HXX 24cdf0e10cSrcweir #define DBACCESS_JACCESS_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_ 27cdf0e10cSrcweir #include <toolkit/awt/vclxaccessiblecomponent.hxx> 28cdf0e10cSrcweir #endif 29cdf0e10cSrcweir #ifndef _CPPUHELPER_IMPLBASE1_HXX_ 30cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 31cdf0e10cSrcweir #endif 32cdf0e10cSrcweir 33cdf0e10cSrcweir namespace dbaui 34cdf0e10cSrcweir { 35cdf0e10cSrcweir class OJoinTableView; 36cdf0e10cSrcweir typedef ::cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessible 37cdf0e10cSrcweir > OJoinDesignViewAccess_BASE; 38cdf0e10cSrcweir /** the class OJoinDesignViewAccess represents the accessible object for join views 39cdf0e10cSrcweir like the QueryDesign and the RelationDesign 40cdf0e10cSrcweir */ 41cdf0e10cSrcweir class OJoinDesignViewAccess : public VCLXAccessibleComponent, public OJoinDesignViewAccess_BASE 42cdf0e10cSrcweir { 43cdf0e10cSrcweir OJoinTableView* m_pTableView; // the window which I should give accessibility to 44cdf0e10cSrcweir 45cdf0e10cSrcweir protected: 46cdf0e10cSrcweir /** isEditable returns the current editable state 47cdf0e10cSrcweir @return true if the controller is not readonly otherwise false 48cdf0e10cSrcweir */ 49cdf0e10cSrcweir virtual sal_Bool isEditable() const; 50cdf0e10cSrcweir public: 51cdf0e10cSrcweir /** OJoinDesignViewAccess needs a valid view 52cdf0e10cSrcweir */ 53cdf0e10cSrcweir OJoinDesignViewAccess( OJoinTableView* _pTableView); 54cdf0e10cSrcweir 55cdf0e10cSrcweir // XInterface 56cdf0e10cSrcweir DECLARE_XINTERFACE( ) 57cdf0e10cSrcweir DECLARE_XTYPEPROVIDER( ) 58cdf0e10cSrcweir 59cdf0e10cSrcweir // XServiceInfo - static methods 60cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static(void) throw( com::sun::star::uno::RuntimeException ); 61cdf0e10cSrcweir 62cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException); 63cdf0e10cSrcweir 64cdf0e10cSrcweir // XAccessible 65cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException); 66cdf0e10cSrcweir 67cdf0e10cSrcweir // XAccessibleContext 68cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); 69cdf0e10cSrcweir 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); 70cdf0e10cSrcweir virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException); 71cdf0e10cSrcweir getTableView() const72cdf0e10cSrcweir OJoinTableView* getTableView() const { return m_pTableView; } 73cdf0e10cSrcweir notifyAccessibleEvent(const sal_Int16 _nEventId,const::com::sun::star::uno::Any & _rOldValue,const::com::sun::star::uno::Any & _rNewValue)74cdf0e10cSrcweir void notifyAccessibleEvent( 75cdf0e10cSrcweir const sal_Int16 _nEventId, 76cdf0e10cSrcweir const ::com::sun::star::uno::Any& _rOldValue, 77cdf0e10cSrcweir const ::com::sun::star::uno::Any& _rNewValue 78cdf0e10cSrcweir ) 79cdf0e10cSrcweir { 80cdf0e10cSrcweir NotifyAccessibleEvent(_nEventId,_rOldValue,_rNewValue); 81cdf0e10cSrcweir } 82cdf0e10cSrcweir 83cdf0e10cSrcweir void clearTableView(); 84cdf0e10cSrcweir }; 85cdf0e10cSrcweir } 86cdf0e10cSrcweir #endif // DBACCESS_JACCESS_HXX 87