xref: /AOO41X/main/svx/source/inc/charmapacc.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #include <vos/mutex.hxx>
29*cdf0e10cSrcweir #include <tools/list.hxx>
30*cdf0e10cSrcweir #include <tools/color.hxx>
31*cdf0e10cSrcweir #include <tools/string.hxx>
32*cdf0e10cSrcweir #ifndef _IMAGE_HXX
33*cdf0e10cSrcweir #include <vcl/image.hxx>
34*cdf0e10cSrcweir #endif
35*cdf0e10cSrcweir #include <rtl/uuid.h>
36*cdf0e10cSrcweir #include <comphelper/accessibleselectionhelper.hxx>
37*cdf0e10cSrcweir #include <com/sun/star/accessibility/XAccessibleTable.hpp>
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir #include <vector>
40*cdf0e10cSrcweir class SvxShowCharSet;
41*cdf0e10cSrcweir 
42*cdf0e10cSrcweir namespace svx
43*cdf0e10cSrcweir {
44*cdf0e10cSrcweir 	typedef	::cppu::ImplHelper1	<	::com::sun::star::accessibility::XAccessible
45*cdf0e10cSrcweir 								>	OAccessibleHelper_Base_2;
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir 	class SvxShowCharSetAcc;
48*cdf0e10cSrcweir 	/** The class SvxShowCharSetVirtualAcc is used as a virtual class which contains the table and the scrollbar.
49*cdf0e10cSrcweir 		In the vcl control, the table and the scrollbar exists in one class. This is not feasible for the accessibility api.
50*cdf0e10cSrcweir 	*/
51*cdf0e10cSrcweir 	class SvxShowCharSetVirtualAcc : public ::comphelper::OAccessibleComponentHelper,
52*cdf0e10cSrcweir 									 public OAccessibleHelper_Base_2
53*cdf0e10cSrcweir 	{
54*cdf0e10cSrcweir 		SvxShowCharSet*		mpParent; // the vcl control
55*cdf0e10cSrcweir 		SvxShowCharSetAcc*	m_pTable; // the table, which holds the characters shown by the vcl control
56*cdf0e10cSrcweir 		::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xAcc; // the ref to the table
57*cdf0e10cSrcweir 	protected:
58*cdf0e10cSrcweir 		virtual ~SvxShowCharSetVirtualAcc();
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir 		virtual void SAL_CALL disposing();
61*cdf0e10cSrcweir 
62*cdf0e10cSrcweir 		virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds(  ) throw (::com::sun::star::uno::RuntimeException);
63*cdf0e10cSrcweir 	public:
64*cdf0e10cSrcweir 		SvxShowCharSetVirtualAcc( SvxShowCharSet* pParent );
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir 		// XInterface
67*cdf0e10cSrcweir 		DECLARE_XINTERFACE( )
68*cdf0e10cSrcweir 		DECLARE_XTYPEPROVIDER( )
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir 		// XAccessibleComponent
71*cdf0e10cSrcweir 		virtual void SAL_CALL grabFocus(  ) throw (::com::sun::star::uno::RuntimeException);
72*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding(  ) throw (::com::sun::star::uno::RuntimeException);
73*cdf0e10cSrcweir 		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);
74*cdf0e10cSrcweir 		//OAccessibleContextHelper
75*cdf0e10cSrcweir 		// XAccessibleContext - still waiting to be overwritten
76*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
77*cdf0e10cSrcweir 		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);
78*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent(  ) throw (::com::sun::star::uno::RuntimeException);
79*cdf0e10cSrcweir 		virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
80*cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getAccessibleDescription(  ) throw (::com::sun::star::uno::RuntimeException);
81*cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getAccessibleName(  ) throw (::com::sun::star::uno::RuntimeException);
82*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet(  ) throw (::com::sun::star::uno::RuntimeException);
83*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet(  ) throw (::com::sun::star::uno::RuntimeException);
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException) { return this; }
86*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getForeground(  ) throw (::com::sun::star::uno::RuntimeException);
87*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getBackground(  ) throw (::com::sun::star::uno::RuntimeException);
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir 
90*cdf0e10cSrcweir 		// call the fireEvent method from the table when it exists.
91*cdf0e10cSrcweir 		void SAL_CALL fireEvent(
92*cdf0e10cSrcweir 					const sal_Int16 _nEventId,
93*cdf0e10cSrcweir 					const ::com::sun::star::uno::Any& _rOldValue,
94*cdf0e10cSrcweir 					const ::com::sun::star::uno::Any& _rNewValue
95*cdf0e10cSrcweir 				);
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir 		// simple access methods
98*cdf0e10cSrcweir 		inline SvxShowCharSetAcc*	getTable() const { return m_pTable; }
99*cdf0e10cSrcweir 		inline SvxShowCharSet* getCharSetControl() const { return mpParent; }
100*cdf0e10cSrcweir 	};
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir 	class SvxShowCharSetItemAcc;
104*cdf0e10cSrcweir 	// ----------------
105*cdf0e10cSrcweir 	// - SvxShowCharSetItem -
106*cdf0e10cSrcweir 	// ----------------
107*cdf0e10cSrcweir 	/** Simple struct to hold some information about the single items of the table.
108*cdf0e10cSrcweir 	*/
109*cdf0e10cSrcweir 	struct SvxShowCharSetItem
110*cdf0e10cSrcweir 	{
111*cdf0e10cSrcweir 		SvxShowCharSet&				mrParent;
112*cdf0e10cSrcweir 		sal_uInt16						mnId;
113*cdf0e10cSrcweir 		XubString					maText;
114*cdf0e10cSrcweir 		Rectangle					maRect;
115*cdf0e10cSrcweir 		SvxShowCharSetItemAcc*		m_pItem;
116*cdf0e10cSrcweir 		SvxShowCharSetAcc*			m_pParent;
117*cdf0e10cSrcweir 		::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xAcc;
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir 		SvxShowCharSetItem( SvxShowCharSet& rParent,SvxShowCharSetAcc*	_pParent,sal_uInt16 _nPos );
120*cdf0e10cSrcweir 		~SvxShowCharSetItem();
121*cdf0e10cSrcweir 
122*cdf0e10cSrcweir 		::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >    GetAccessible();
123*cdf0e10cSrcweir 		 void                                                                                       ClearAccessible();
124*cdf0e10cSrcweir 	};
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir 	// -----------------------------------------------------------------------------
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir 	typedef	::cppu::ImplHelper2	<	::com::sun::star::accessibility::XAccessible,
129*cdf0e10cSrcweir 									::com::sun::star::accessibility::XAccessibleTable
130*cdf0e10cSrcweir 								>	OAccessibleHelper_Base;
131*cdf0e10cSrcweir 	// ---------------
132*cdf0e10cSrcweir 	// - SvxShowCharSetAcc -
133*cdf0e10cSrcweir 	// ---------------
134*cdf0e10cSrcweir 	/** The table implemtentation of the vcl control.
135*cdf0e10cSrcweir 	*/
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir 	class SvxShowCharSetAcc : public ::comphelper::OAccessibleSelectionHelper,
138*cdf0e10cSrcweir 							  public OAccessibleHelper_Base
139*cdf0e10cSrcweir 	{
140*cdf0e10cSrcweir 		::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > m_aChildren;
141*cdf0e10cSrcweir 		SvxShowCharSetVirtualAcc* m_pParent; // the virtual parent
142*cdf0e10cSrcweir 	protected:
143*cdf0e10cSrcweir 		virtual void SAL_CALL disposing();
144*cdf0e10cSrcweir 	public:
145*cdf0e10cSrcweir 		SvxShowCharSetAcc( SvxShowCharSetVirtualAcc* _pParent );
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir 		DECLARE_XINTERFACE( )
148*cdf0e10cSrcweir 		DECLARE_XTYPEPROVIDER( )
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir 		// XAccessibleComponent
151*cdf0e10cSrcweir 		virtual void SAL_CALL grabFocus(  ) throw (::com::sun::star::uno::RuntimeException);
152*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding(  ) throw (::com::sun::star::uno::RuntimeException);
153*cdf0e10cSrcweir 		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);
154*cdf0e10cSrcweir 
155*cdf0e10cSrcweir 		//OAccessibleContextHelper
156*cdf0e10cSrcweir 		// XAccessibleContext - still waiting to be overwritten
157*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
158*cdf0e10cSrcweir 		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);
159*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent(  ) throw (::com::sun::star::uno::RuntimeException);
160*cdf0e10cSrcweir 		virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
161*cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getAccessibleDescription(  ) throw (::com::sun::star::uno::RuntimeException);
162*cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getAccessibleName(  ) throw (::com::sun::star::uno::RuntimeException);
163*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet(  ) throw (::com::sun::star::uno::RuntimeException);
164*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet(  ) throw (::com::sun::star::uno::RuntimeException);
165*cdf0e10cSrcweir 
166*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException) { return this; }
167*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getForeground(  ) throw (::com::sun::star::uno::RuntimeException);
168*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getBackground(  ) throw (::com::sun::star::uno::RuntimeException);
169*cdf0e10cSrcweir 
170*cdf0e10cSrcweir 		// XAccessibleTable
171*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleRowCount(  ) throw (::com::sun::star::uno::RuntimeException);
172*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleColumnCount(  ) throw (::com::sun::star::uno::RuntimeException);
173*cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
174*cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
175*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
176*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
177*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders(  ) throw (::com::sun::star::uno::RuntimeException);
178*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders(  ) throw (::com::sun::star::uno::RuntimeException);
179*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows(  ) throw (::com::sun::star::uno::RuntimeException);
180*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns(  ) throw (::com::sun::star::uno::RuntimeException);
181*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
182*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
183*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
184*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCaption(  ) throw (::com::sun::star::uno::RuntimeException);
185*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleSummary(  ) throw (::com::sun::star::uno::RuntimeException);
186*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
187*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
188*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
189*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir 
192*cdf0e10cSrcweir 		inline void SAL_CALL fireEvent(
193*cdf0e10cSrcweir 					const sal_Int16 _nEventId,
194*cdf0e10cSrcweir 					const ::com::sun::star::uno::Any& _rOldValue,
195*cdf0e10cSrcweir 					const ::com::sun::star::uno::Any& _rNewValue
196*cdf0e10cSrcweir 				)
197*cdf0e10cSrcweir 		{
198*cdf0e10cSrcweir 			NotifyAccessibleEvent(_nEventId,_rOldValue,_rNewValue);
199*cdf0e10cSrcweir 		}
200*cdf0e10cSrcweir 	protected:
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 		virtual ~SvxShowCharSetAcc();
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir 		// OCommonAccessibleSelection
205*cdf0e10cSrcweir         // return if the specified child is visible => watch for special ChildIndexes (ACCESSIBLE_SELECTION_CHILD_xxx)
206*cdf0e10cSrcweir 	    virtual sal_Bool
207*cdf0e10cSrcweir             implIsSelected( sal_Int32 nAccessibleChildIndex )
208*cdf0e10cSrcweir             throw (::com::sun::star::uno::RuntimeException);
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 	    // select the specified child => watch for special ChildIndexes (ACCESSIBLE_SELECTION_CHILD_xxx)
211*cdf0e10cSrcweir         virtual void
212*cdf0e10cSrcweir             implSelect( sal_Int32 nAccessibleChildIndex, sal_Bool bSelect )
213*cdf0e10cSrcweir             throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
214*cdf0e10cSrcweir 
215*cdf0e10cSrcweir 		// OCommonAccessibleComponent
216*cdf0e10cSrcweir 		/// implements the calculation of the bounding rectangle - still waiting to be overwritten
217*cdf0e10cSrcweir 		virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds(  ) throw (::com::sun::star::uno::RuntimeException);
218*cdf0e10cSrcweir 	};
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir 	// ----------------
221*cdf0e10cSrcweir 	// - SvxShowCharSetItemAcc -
222*cdf0e10cSrcweir 	// ----------------
223*cdf0e10cSrcweir 	/** The child implementation of the table.
224*cdf0e10cSrcweir 	*/
225*cdf0e10cSrcweir 	class SvxShowCharSetItemAcc : public ::comphelper::OAccessibleComponentHelper,
226*cdf0e10cSrcweir 								  public OAccessibleHelper_Base_2
227*cdf0e10cSrcweir 	{
228*cdf0e10cSrcweir 	private:
229*cdf0e10cSrcweir 		SvxShowCharSetItem*	mpParent;
230*cdf0e10cSrcweir 	protected:
231*cdf0e10cSrcweir 		virtual ~SvxShowCharSetItemAcc();
232*cdf0e10cSrcweir 
233*cdf0e10cSrcweir 		// OCommonAccessibleComponent
234*cdf0e10cSrcweir 		/// implements the calculation of the bounding rectangle - still waiting to be overwritten
235*cdf0e10cSrcweir 		virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds(  ) throw (::com::sun::star::uno::RuntimeException);
236*cdf0e10cSrcweir 	public:
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir 		// XInterface
239*cdf0e10cSrcweir 		DECLARE_XINTERFACE( )
240*cdf0e10cSrcweir 		DECLARE_XTYPEPROVIDER( )
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir 		SvxShowCharSetItemAcc( SvxShowCharSetItem* pParent );
243*cdf0e10cSrcweir 
244*cdf0e10cSrcweir 		void    ParentDestroyed();
245*cdf0e10cSrcweir 
246*cdf0e10cSrcweir 		// XAccessibleComponent
247*cdf0e10cSrcweir 		virtual void SAL_CALL grabFocus(  ) throw (::com::sun::star::uno::RuntimeException);
248*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding(  ) throw (::com::sun::star::uno::RuntimeException);
249*cdf0e10cSrcweir 		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);
250*cdf0e10cSrcweir 
251*cdf0e10cSrcweir 		//OAccessibleContextHelper
252*cdf0e10cSrcweir 		// XAccessibleContext - still waiting to be overwritten
253*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
254*cdf0e10cSrcweir 		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);
255*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent(  ) throw (::com::sun::star::uno::RuntimeException);
256*cdf0e10cSrcweir 		virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
257*cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getAccessibleDescription(  ) throw (::com::sun::star::uno::RuntimeException);
258*cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getAccessibleName(  ) throw (::com::sun::star::uno::RuntimeException);
259*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet(  ) throw (::com::sun::star::uno::RuntimeException);
260*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet(  ) throw (::com::sun::star::uno::RuntimeException);
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException) { return this; }
263*cdf0e10cSrcweir 
264*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getForeground(  ) throw (::com::sun::star::uno::RuntimeException) { return mpParent->m_pParent->getForeground(); }
265*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getBackground(  ) throw (::com::sun::star::uno::RuntimeException) { return mpParent->m_pParent->getBackground(); }
266*cdf0e10cSrcweir 
267*cdf0e10cSrcweir 		inline void SAL_CALL fireEvent(
268*cdf0e10cSrcweir 					const sal_Int16 _nEventId,
269*cdf0e10cSrcweir 					const ::com::sun::star::uno::Any& _rOldValue,
270*cdf0e10cSrcweir 					const ::com::sun::star::uno::Any& _rNewValue
271*cdf0e10cSrcweir 				)
272*cdf0e10cSrcweir 		{
273*cdf0e10cSrcweir 			NotifyAccessibleEvent(_nEventId,_rOldValue,_rNewValue);
274*cdf0e10cSrcweir 		}
275*cdf0e10cSrcweir 	};
276*cdf0e10cSrcweir }
277*cdf0e10cSrcweir 
278*cdf0e10cSrcweir 
279