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