1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _CHART2_ACCESSIBLECHARTSHAPE_HXX_
28 #define _CHART2_ACCESSIBLECHARTSHAPE_HXX_
29 
30 #include "AccessibleBase.hxx"
31 
32 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
33 #include <cppuhelper/implbase1.hxx>
34 #include <svx/AccessibleShapeTreeInfo.hxx>
35 
36 
37 namespace accessibility
38 {
39 class AccessibleShape;
40 }
41 
42 namespace chart
43 {
44 
45 namespace impl
46 {
47 typedef ::cppu::ImplInheritanceHelper1<
48     AccessibleBase,
49     ::com::sun::star::accessibility::XAccessibleExtendedComponent > AccessibleChartShape_Base;
50 }
51 
52 class AccessibleChartShape :
53     public impl::AccessibleChartShape_Base
54 {
55 public:
56     AccessibleChartShape( const AccessibleElementInfo& rAccInfo,
57         bool bMayHaveChildren, bool bAlwaysTransparent = false );
58     virtual ~AccessibleChartShape();
59 
60     // ________ XServiceInfo ________
61     virtual ::rtl::OUString SAL_CALL getImplementationName()
62         throw (::com::sun::star::uno::RuntimeException);
63 
64     // ________ XAccessibleContext ________
65     virtual sal_Int32 SAL_CALL getAccessibleChildCount()
66         throw (::com::sun::star::uno::RuntimeException);
67     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
68         getAccessibleChild( sal_Int32 i )
69         throw (::com::sun::star::lang::IndexOutOfBoundsException,
70                ::com::sun::star::uno::RuntimeException);
71     virtual sal_Int16 SAL_CALL getAccessibleRole()
72         throw (::com::sun::star::uno::RuntimeException);
73     virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
74         throw (::com::sun::star::uno::RuntimeException);
75     virtual ::rtl::OUString SAL_CALL getAccessibleName()
76         throw (::com::sun::star::uno::RuntimeException);
77 
78     // ________ XAccessibleComponent ________
79     virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
80     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);
81     virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds() throw (::com::sun::star::uno::RuntimeException);
82     virtual ::com::sun::star::awt::Point SAL_CALL getLocation() throw (::com::sun::star::uno::RuntimeException);
83     virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen() throw (::com::sun::star::uno::RuntimeException);
84     virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw (::com::sun::star::uno::RuntimeException);
85     virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
86     virtual sal_Int32 SAL_CALL getForeground() throw (::com::sun::star::uno::RuntimeException);
87     virtual sal_Int32 SAL_CALL getBackground() throw (::com::sun::star::uno::RuntimeException);
88 
89     // ________ XAccessibleExtendedComponent ________
90     virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont()
91         throw (::com::sun::star::uno::RuntimeException);
92     virtual ::rtl::OUString SAL_CALL getTitledBorderText()
93         throw (::com::sun::star::uno::RuntimeException);
94     virtual ::rtl::OUString SAL_CALL getToolTipText()
95         throw (::com::sun::star::uno::RuntimeException);
96 
97 private:
98     ::accessibility::AccessibleShape* m_pAccShape;
99     ::accessibility::AccessibleShapeTreeInfo m_aShapeTreeInfo;
100 };
101 
102 }  // namespace chart
103 
104 #endif
105