merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / controller / inc / AccessibleTextHelper.hxx
blob03db46faa91c1a2c30a72113515694b7568385a6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AccessibleTextHelper.hxx,v $
10 * $Revision: 1.3 $
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 CHART2_ACCESSIBLETEXTHELPER_HXX
31 #define CHART2_ACCESSIBLETEXTHELPER_HXX
33 #include "MutexContainer.hxx"
34 #include <cppuhelper/compbase2.hxx>
35 #include <com/sun/star/lang/XInitialization.hpp>
36 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
38 // forward declaration of helper class from svx
39 namespace accessibility
41 class AccessibleTextHelper;
44 namespace chart
47 class DrawViewWrapper;
49 namespace impl
51 typedef ::cppu::WeakComponentImplHelper2<
52 ::com::sun::star::lang::XInitialization,
53 ::com::sun::star::accessibility::XAccessibleContext >
54 AccessibleTextHelper_Base;
57 class AccessibleTextHelper :
58 public MutexContainer,
59 public impl::AccessibleTextHelper_Base
61 public:
62 explicit AccessibleTextHelper( DrawViewWrapper * pDrawViewWrapper );
63 virtual ~AccessibleTextHelper();
65 // ____ XInitialization ____
66 /** Must be called at least once for this helper class to work.
68 mandatory parameter 0: type string. This is the CID that is used to find
69 the corresponding drawing object that contains the text that should
70 be handled by this helper class.
72 mandatory parameter 1: type XAccessible. Is used as EventSource for the
73 ::accessibility::AccessibleTextHelper (svx)
75 mandatory parameter 2: type awt::XWindow. The Window that shows the
76 text currently.
78 virtual void SAL_CALL initialize(
79 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
80 throw (::com::sun::star::uno::Exception,
81 ::com::sun::star::uno::RuntimeException);
83 // ____ XAccessibleContext ____
84 virtual ::sal_Int32 SAL_CALL getAccessibleChildCount()
85 throw (::com::sun::star::uno::RuntimeException);
86 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild(
87 ::sal_Int32 i )
88 throw (::com::sun::star::lang::IndexOutOfBoundsException,
89 ::com::sun::star::uno::RuntimeException);
90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent()
91 throw (::com::sun::star::uno::RuntimeException);
92 virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent()
93 throw (::com::sun::star::uno::RuntimeException);
94 virtual ::sal_Int16 SAL_CALL getAccessibleRole()
95 throw (::com::sun::star::uno::RuntimeException);
96 virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
97 throw (::com::sun::star::uno::RuntimeException);
98 virtual ::rtl::OUString SAL_CALL getAccessibleName()
99 throw (::com::sun::star::uno::RuntimeException);
100 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet()
101 throw (::com::sun::star::uno::RuntimeException);
102 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet()
103 throw (::com::sun::star::uno::RuntimeException);
104 virtual ::com::sun::star::lang::Locale SAL_CALL getLocale()
105 throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException,
106 ::com::sun::star::uno::RuntimeException);
108 private:
109 ::accessibility::AccessibleTextHelper * m_pTextHelper;
110 DrawViewWrapper * m_pDrawViewWrapper;
113 } // namespace chart
115 // CHART2_ACCESSIBLETEXTHELPER_HXX
116 #endif