11d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
31d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
41d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
51d2dbeb0SAndrew Rist  * distributed with this work for additional information
61d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
71d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
81d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
91d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
101d2dbeb0SAndrew Rist  *
111d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
121d2dbeb0SAndrew Rist  *
131d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
141d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
151d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
161d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
171d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
181d2dbeb0SAndrew Rist  * under the License.
191d2dbeb0SAndrew Rist  *
201d2dbeb0SAndrew Rist  *************************************************************/
211d2dbeb0SAndrew Rist 
221d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _ACCTEXTFRAME_HXX
24cdf0e10cSrcweir #define _ACCTEXTFRAME_HXX
25cdf0e10cSrcweir #include "accframebase.hxx"
26cdf0e10cSrcweir 
27*ca62e2c2SSteve Yin #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
28*ca62e2c2SSteve Yin 
29cdf0e10cSrcweir class SwFlyFrm;
30cdf0e10cSrcweir namespace utl { class AccessibleRelationSetHelper; }
31cdf0e10cSrcweir namespace com { namespace star {
32cdf0e10cSrcweir     namespace accessibility { struct AccessibleRelation; }
33cdf0e10cSrcweir } }
34cdf0e10cSrcweir 
35*ca62e2c2SSteve Yin class SwAccessibleTextFrame : public SwAccessibleFrameBase,
36*ca62e2c2SSteve Yin         public ::com::sun::star::accessibility::XAccessibleSelection
37cdf0e10cSrcweir {
38cdf0e10cSrcweir private:
39cdf0e10cSrcweir     // --> OD 2009-07-14 #i73249#
40cdf0e10cSrcweir     ::rtl::OUString msTitle;
41cdf0e10cSrcweir     ::rtl::OUString msDesc;
42cdf0e10cSrcweir     // <--
43cdf0e10cSrcweir 
44cdf0e10cSrcweir protected:
45cdf0e10cSrcweir 
46cdf0e10cSrcweir 	virtual ~SwAccessibleTextFrame();
47cdf0e10cSrcweir 
48cdf0e10cSrcweir 	virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
49cdf0e10cSrcweir 
50cdf0e10cSrcweir public:
51cdf0e10cSrcweir 
52cdf0e10cSrcweir     SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm* pFlyFrm );
53cdf0e10cSrcweir 
54*ca62e2c2SSteve Yin 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
55*ca62e2c2SSteve Yin 		::com::sun::star::uno::Type const & rType )
56*ca62e2c2SSteve Yin 		throw (::com::sun::star::uno::RuntimeException);
57*ca62e2c2SSteve Yin 	virtual void SAL_CALL acquire() throw ();
58*ca62e2c2SSteve Yin 	virtual void SAL_CALL release() throw ();
59*ca62e2c2SSteve Yin 	//=====  XAccessibleSelection  ============================================
60*ca62e2c2SSteve Yin 	virtual void SAL_CALL selectAccessibleChild(
61*ca62e2c2SSteve Yin 		sal_Int32 nChildIndex )
62*ca62e2c2SSteve Yin 		throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
63*ca62e2c2SSteve Yin 		::com::sun::star::uno::RuntimeException );
64*ca62e2c2SSteve Yin 
65*ca62e2c2SSteve Yin 	virtual sal_Bool SAL_CALL isAccessibleChildSelected(
66*ca62e2c2SSteve Yin 		sal_Int32 nChildIndex )
67*ca62e2c2SSteve Yin 		throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
68*ca62e2c2SSteve Yin 		::com::sun::star::uno::RuntimeException );
69*ca62e2c2SSteve Yin 
70*ca62e2c2SSteve Yin 	virtual void SAL_CALL clearAccessibleSelection(  )
71*ca62e2c2SSteve Yin 		throw ( ::com::sun::star::uno::RuntimeException );
72*ca62e2c2SSteve Yin 
73*ca62e2c2SSteve Yin 	virtual void SAL_CALL selectAllAccessibleChildren(  )
74*ca62e2c2SSteve Yin 		throw ( ::com::sun::star::uno::RuntimeException );
75*ca62e2c2SSteve Yin 
76*ca62e2c2SSteve Yin 	virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount(  )
77*ca62e2c2SSteve Yin 		throw ( ::com::sun::star::uno::RuntimeException );
78*ca62e2c2SSteve Yin 
79*ca62e2c2SSteve Yin 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
80*ca62e2c2SSteve Yin 		sal_Int32 nSelectedChildIndex )
81*ca62e2c2SSteve Yin 		throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
82*ca62e2c2SSteve Yin 		::com::sun::star::uno::RuntimeException);
83*ca62e2c2SSteve Yin 
84*ca62e2c2SSteve Yin 	virtual void SAL_CALL deselectAccessibleChild(
85*ca62e2c2SSteve Yin 		sal_Int32 nSelectedChildIndex )
86*ca62e2c2SSteve Yin 		throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
87*ca62e2c2SSteve Yin 		::com::sun::star::uno::RuntimeException );
88*ca62e2c2SSteve Yin 
89cdf0e10cSrcweir 	//=====  XAccessibleContext  ==============================================
90cdf0e10cSrcweir 
91cdf0e10cSrcweir     // --> OD 2009-07-14 #i73249#
92cdf0e10cSrcweir     /// Return the object's current name.
93cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL
94cdf0e10cSrcweir         getAccessibleName (void)
95cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
96cdf0e10cSrcweir     // <--
97cdf0e10cSrcweir     /// Return this object's description.
98cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL
99cdf0e10cSrcweir     	getAccessibleDescription (void)
100cdf0e10cSrcweir         throw (com::sun::star::uno::RuntimeException);
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 	//=====  XServiceInfo  ====================================================
103cdf0e10cSrcweir 
104cdf0e10cSrcweir     /**	Returns an identifier for the implementation of this object.
105cdf0e10cSrcweir     */
106cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL
107cdf0e10cSrcweir     	getImplementationName (void)
108cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
109cdf0e10cSrcweir 
110cdf0e10cSrcweir     /**	Return whether the specified service is supported by this class.
111cdf0e10cSrcweir     */
112cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
113cdf0e10cSrcweir     	supportsService (const ::rtl::OUString& sServiceName)
114cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
115cdf0e10cSrcweir 
116cdf0e10cSrcweir     /** Returns a list of all supported services.  In this case that is just
117cdf0e10cSrcweir     	the AccessibleContext service.
118cdf0e10cSrcweir     */
119cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
120cdf0e10cSrcweir     	getSupportedServiceNames (void)
121cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
122cdf0e10cSrcweir 
123cdf0e10cSrcweir 	//====== XTypeProvider ====================================================
124cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
125cdf0e10cSrcweir 
126cdf0e10cSrcweir 
127cdf0e10cSrcweir     //=====  XAccessibleContext::getAccessibleRelationSet  ====================
128cdf0e10cSrcweir 
129cdf0e10cSrcweir     // text frame may have accessible relations to their
130cdf0e10cSrcweir     // predocesor/successor frames
131cdf0e10cSrcweir 
132cdf0e10cSrcweir private:
133cdf0e10cSrcweir     // helper methods for getAccessibleRelationSet:
134cdf0e10cSrcweir     SwFlyFrm* getFlyFrm() const;
135cdf0e10cSrcweir 
136cdf0e10cSrcweir     com::sun::star::accessibility::AccessibleRelation makeRelation(
137cdf0e10cSrcweir         sal_Int16 nType, const SwFlyFrm* pFrm );
138cdf0e10cSrcweir 
139cdf0e10cSrcweir public:
140cdf0e10cSrcweir 
141cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference<
142cdf0e10cSrcweir             ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
143cdf0e10cSrcweir     	getAccessibleRelationSet (void)
144cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
145cdf0e10cSrcweir };
146cdf0e10cSrcweir 
147cdf0e10cSrcweir 
148cdf0e10cSrcweir #endif
149