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 
24 #ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_OLE_SHAPE_HXX
25 #define _SVX_ACCESSIBILITY_ACCESSIBLE_OLE_SHAPE_HXX
26 
27 #ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_MANAGER_HXX
28 #include <svx/AccessibleShape.hxx>
29 #endif
30 
31 #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_ACTION_HPP_
32 #include <com/sun/star/accessibility/XAccessibleAction.hpp>
33 #endif
34 #include "svx/svxdllapi.h"
35 
36 namespace accessibility {
37 
38 /**	@descr
39         This class makes OLE objects accessible.  With respect to its
40         base class <type>AccessibleShape</type> it supports the additional
41         <type>XAccessibleAction</type> interface.
42 */
43 class SVX_DLLPUBLIC AccessibleOLEShape
44     :	public AccessibleShape,
45         public ::com::sun::star::accessibility::XAccessibleAction
46 {
47 public:
48 	//=====  internal  ========================================================
49 	AccessibleOLEShape (
50         const AccessibleShapeInfo& rShapeInfo,
51         const AccessibleShapeTreeInfo& rShapeTreeInfo);
52 	virtual ~AccessibleOLEShape (void);
53 
54     //=====  XAccessibleAction  ===============================================
55 
56     sal_Int32 SAL_CALL getAccessibleActionCount (void)
57         throw (::com::sun::star::uno::RuntimeException);
58 
59     sal_Bool SAL_CALL doAccessibleAction (sal_Int32 nIndex)
60         throw (::com::sun::star::lang::IndexOutOfBoundsException,
61             ::com::sun::star::uno::RuntimeException);
62 
63     ::rtl::OUString SAL_CALL getAccessibleActionDescription (sal_Int32 nIndex)
64         throw (::com::sun::star::lang::IndexOutOfBoundsException,
65             ::com::sun::star::uno::RuntimeException);
66 
67     ::com::sun::star::uno::Reference<
68         ::com::sun::star::accessibility::XAccessibleKeyBinding> SAL_CALL getAccessibleActionKeyBinding (
69             sal_Int32 nIndex)
70         throw (::com::sun::star::lang::IndexOutOfBoundsException,
71             ::com::sun::star::uno::RuntimeException);
72 
73     //=====  XInterface  ======================================================
74 
75     virtual com::sun::star::uno::Any SAL_CALL
76         queryInterface (const com::sun::star::uno::Type & rType)
77         throw (::com::sun::star::uno::RuntimeException);
78 
79     virtual void SAL_CALL
80         acquire (void)
81         throw ();
82 
83     virtual void SAL_CALL
84         release (void)
85         throw ();
86 
87 	//=====  XServiceInfo  ====================================================
88 
89 	virtual ::rtl::OUString SAL_CALL
90     	getImplementationName (void)
91 	    throw (::com::sun::star::uno::RuntimeException);
92 
93     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
94         getSupportedServiceNames (void)
95         throw (::com::sun::star::uno::RuntimeException);
96 
97     //=====  XTypeProvider  ===================================================
98 
99     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL
100         getTypes (void)
101         throw (::com::sun::star::uno::RuntimeException);
102 // ====== XAccessibleExtendedAttributes =====================================
103     virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes() throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
104 protected:
105     ///	Create a name string that contains the accessible name.
106 	virtual ::rtl::OUString
107     	CreateAccessibleBaseName ()
108         throw (::com::sun::star::uno::RuntimeException);
109 
110     ///	Create a description string that contains the accessible description.
111 	virtual ::rtl::OUString
112     	CreateAccessibleDescription ()
113         throw (::com::sun::star::uno::RuntimeException);
114 
115 private:
116     /** Don't use the default constructor.  Use the public constructor that
117         takes the original shape and the parent as arguments instead.
118     */
119     SVX_DLLPRIVATE AccessibleOLEShape (void);
120 
121     /// Don't use the constructor.  Not yet implemented.
122     SVX_DLLPRIVATE AccessibleOLEShape (const AccessibleOLEShape&);
123 
124     /// Don't use the assignment operator.  Not yet implemented.
125     SVX_DLLPRIVATE AccessibleOLEShape& operator= (const AccessibleOLEShape&);
126 };
127 
128 } // end of namespace accessibility
129 
130 #endif
131