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