xref: /AOO41X/main/sw/source/core/access/acchyperlink.hxx (revision 1d2dbeb0b7301723c6d13094e87a8714ef81a328)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _ACCHYPERLINK_HXX
24cdf0e10cSrcweir #define _ACCHYPERLINK_HXX
25cdf0e10cSrcweir #include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
26cdf0e10cSrcweir #include <vos/ref.hxx>
27cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
28cdf0e10cSrcweir #include <fmtinfmt.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir class SwAccessibleParagraph;
31cdf0e10cSrcweir class SwTxtAttr;
32cdf0e10cSrcweir 
33cdf0e10cSrcweir class SwAccessibleHyperlink :
34cdf0e10cSrcweir 		public ::cppu::WeakImplHelper1<
35cdf0e10cSrcweir 		::com::sun::star::accessibility::XAccessibleHyperlink >
36cdf0e10cSrcweir {
37cdf0e10cSrcweir 	friend class SwAccessibleParagraph;
38cdf0e10cSrcweir 	friend class SwAccessibleHyperTextData;
39cdf0e10cSrcweir 	sal_uInt16 nHintPos;
40cdf0e10cSrcweir 	::vos::ORef< SwAccessibleParagraph > xPara;
41cdf0e10cSrcweir 	sal_Int32 nStartIdx;
42cdf0e10cSrcweir 	sal_Int32 nEndIdx;
43cdf0e10cSrcweir 
44cdf0e10cSrcweir 	SwAccessibleHyperlink( sal_uInt16 nHintPos,
45cdf0e10cSrcweir 						   SwAccessibleParagraph *p,
46cdf0e10cSrcweir 		   				   sal_Int32 nStt, sal_Int32 nEnd	);
47cdf0e10cSrcweir 
48cdf0e10cSrcweir 	const SwTxtAttr *GetTxtAttr() const;
49cdf0e10cSrcweir 	void Invalidate();
50cdf0e10cSrcweir 
51cdf0e10cSrcweir public:
52cdf0e10cSrcweir 
53cdf0e10cSrcweir 	// XAccessibleAction
54cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getAccessibleActionCount()
55cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
56cdf0e10cSrcweir     virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex )
57cdf0e10cSrcweir 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
58cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
59cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription(
60cdf0e10cSrcweir 				sal_Int32 nIndex )
61cdf0e10cSrcweir 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
62cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
63cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
64cdf0e10cSrcweir 			::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL
65cdf0e10cSrcweir 		   	getAccessibleActionKeyBinding( sal_Int32 nIndex )
66cdf0e10cSrcweir 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
67cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	// XAccessibleHyperlink
70cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionAnchor(
71cdf0e10cSrcweir 				sal_Int32 nIndex )
72cdf0e10cSrcweir 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
73cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
74cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionObject(
75cdf0e10cSrcweir 			sal_Int32 nIndex )
76cdf0e10cSrcweir 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
77cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
78cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getStartIndex()
79cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
80cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getEndIndex()
81cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
82cdf0e10cSrcweir     virtual sal_Bool SAL_CALL isValid(  )
83cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
84cdf0e10cSrcweir };
85cdf0e10cSrcweir 
86cdf0e10cSrcweir #endif
87cdf0e10cSrcweir 
88