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 #ifndef _ACCTEXTFRAME_HXX 24 #define _ACCTEXTFRAME_HXX 25 #include "accframebase.hxx" 26 27 class SwFlyFrm; 28 namespace utl { class AccessibleRelationSetHelper; } 29 namespace com { namespace star { 30 namespace accessibility { struct AccessibleRelation; } 31 } } 32 33 class SwAccessibleTextFrame : public SwAccessibleFrameBase 34 { 35 private: 36 // --> OD 2009-07-14 #i73249# 37 ::rtl::OUString msTitle; 38 ::rtl::OUString msDesc; 39 // <-- 40 41 protected: 42 43 virtual ~SwAccessibleTextFrame(); 44 45 virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); 46 47 public: 48 49 SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm* pFlyFrm ); 50 51 //===== XAccessibleContext ============================================== 52 53 // --> OD 2009-07-14 #i73249# 54 /// Return the object's current name. 55 virtual ::rtl::OUString SAL_CALL 56 getAccessibleName (void) 57 throw (::com::sun::star::uno::RuntimeException); 58 // <-- 59 /// Return this object's description. 60 virtual ::rtl::OUString SAL_CALL 61 getAccessibleDescription (void) 62 throw (com::sun::star::uno::RuntimeException); 63 64 //===== XServiceInfo ==================================================== 65 66 /** Returns an identifier for the implementation of this object. 67 */ 68 virtual ::rtl::OUString SAL_CALL 69 getImplementationName (void) 70 throw (::com::sun::star::uno::RuntimeException); 71 72 /** Return whether the specified service is supported by this class. 73 */ 74 virtual sal_Bool SAL_CALL 75 supportsService (const ::rtl::OUString& sServiceName) 76 throw (::com::sun::star::uno::RuntimeException); 77 78 /** Returns a list of all supported services. In this case that is just 79 the AccessibleContext service. 80 */ 81 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL 82 getSupportedServiceNames (void) 83 throw (::com::sun::star::uno::RuntimeException); 84 85 //====== XTypeProvider ==================================================== 86 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); 87 88 89 //===== XAccessibleContext::getAccessibleRelationSet ==================== 90 91 // text frame may have accessible relations to their 92 // predocesor/successor frames 93 94 private: 95 // helper methods for getAccessibleRelationSet: 96 SwFlyFrm* getFlyFrm() const; 97 98 com::sun::star::accessibility::AccessibleRelation makeRelation( 99 sal_Int16 nType, const SwFlyFrm* pFrm ); 100 101 public: 102 103 virtual ::com::sun::star::uno::Reference< 104 ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL 105 getAccessibleRelationSet (void) 106 throw (::com::sun::star::uno::RuntimeException); 107 }; 108 109 110 #endif 111