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 _CHART2_ACCESSIBLECHARTSHAPE_HXX_ 24 #define _CHART2_ACCESSIBLECHARTSHAPE_HXX_ 25 26 #include "AccessibleBase.hxx" 27 28 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp> 29 #include <cppuhelper/implbase1.hxx> 30 #include <svx/AccessibleShapeTreeInfo.hxx> 31 32 33 namespace accessibility 34 { 35 class AccessibleShape; 36 } 37 38 namespace chart 39 { 40 41 namespace impl 42 { 43 typedef ::cppu::ImplInheritanceHelper1< 44 AccessibleBase, 45 ::com::sun::star::accessibility::XAccessibleExtendedComponent > AccessibleChartShape_Base; 46 } 47 48 class AccessibleChartShape : 49 public impl::AccessibleChartShape_Base 50 { 51 public: 52 AccessibleChartShape( const AccessibleElementInfo& rAccInfo, 53 bool bMayHaveChildren, bool bAlwaysTransparent = false ); 54 virtual ~AccessibleChartShape(); 55 56 // ________ XServiceInfo ________ 57 virtual ::rtl::OUString SAL_CALL getImplementationName() 58 throw (::com::sun::star::uno::RuntimeException); 59 60 // ________ XAccessibleContext ________ 61 virtual sal_Int32 SAL_CALL getAccessibleChildCount() 62 throw (::com::sun::star::uno::RuntimeException); 63 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL 64 getAccessibleChild( sal_Int32 i ) 65 throw (::com::sun::star::lang::IndexOutOfBoundsException, 66 ::com::sun::star::uno::RuntimeException); 67 virtual sal_Int16 SAL_CALL getAccessibleRole() 68 throw (::com::sun::star::uno::RuntimeException); 69 virtual ::rtl::OUString SAL_CALL getAccessibleDescription() 70 throw (::com::sun::star::uno::RuntimeException); 71 virtual ::rtl::OUString SAL_CALL getAccessibleName() 72 throw (::com::sun::star::uno::RuntimeException); 73 74 // ________ XAccessibleComponent ________ 75 virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException); 76 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); 77 virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds() throw (::com::sun::star::uno::RuntimeException); 78 virtual ::com::sun::star::awt::Point SAL_CALL getLocation() throw (::com::sun::star::uno::RuntimeException); 79 virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen() throw (::com::sun::star::uno::RuntimeException); 80 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw (::com::sun::star::uno::RuntimeException); 81 virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException); 82 virtual sal_Int32 SAL_CALL getForeground() throw (::com::sun::star::uno::RuntimeException); 83 virtual sal_Int32 SAL_CALL getBackground() throw (::com::sun::star::uno::RuntimeException); 84 85 // ________ XAccessibleExtendedComponent ________ 86 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont() 87 throw (::com::sun::star::uno::RuntimeException); 88 virtual ::rtl::OUString SAL_CALL getTitledBorderText() 89 throw (::com::sun::star::uno::RuntimeException); 90 virtual ::rtl::OUString SAL_CALL getToolTipText() 91 throw (::com::sun::star::uno::RuntimeException); 92 93 private: 94 ::accessibility::AccessibleShape* m_pAccShape; 95 ::accessibility::AccessibleShapeTreeInfo m_aShapeTreeInfo; 96 }; 97 98 } // namespace chart 99 100 #endif 101