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 #ifndef _ACCNOTEXTHYPERLINK_HXX
23 #define _ACCNOTEXTHYPERLINK_HXX
24 
25 
26 #include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
27 #include <com/sun/star/uno/RuntimeException.hpp>
28 #include <vos/ref.hxx>
29 #include <cppuhelper/implbase1.hxx>
30 #include <fmtinfmt.hxx>
31 #include <frame.hxx>
32 #include <layfrm.hxx>
33 
34 #include "accnotextframe.hxx"
35 /*
36 using namespace ::com::sun::star::lang;
37 using namespace ::com::sun::star::uno;
38 using namespace ::com::sun::star::accessibility;
39 using namespace ::rtl;
40 */
41 class SwAccessibleNoTextHyperlink :
42 		public ::cppu::WeakImplHelper1<
43 		::com::sun::star::accessibility::XAccessibleHyperlink >
44 {
45 	friend class SwAccessibleNoTextFrame;
46 
47 	::vos::ORef< SwAccessibleNoTextFrame > xFrame;
48 	const SwFrm *mpFrm;
49 	sal_uInt16 mnIndex;
50 
GetFmt()51 	SwFrmFmt *GetFmt()
52 	{
53 		return ((SwLayoutFrm*)mpFrm)->GetFmt();
54 	}
55 public:
56 
57 	SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrm* aFrm, sal_uInt16 nIndex = 0xFFFF );
58 
59 	// XAccessibleAction
60     virtual sal_Int32 SAL_CALL getAccessibleActionCount()
61 		throw (::com::sun::star::uno::RuntimeException);
62     virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex )
63 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
64 				::com::sun::star::uno::RuntimeException);
65     virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription(
66 				sal_Int32 nIndex )
67 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
68 				::com::sun::star::uno::RuntimeException);
69     virtual ::com::sun::star::uno::Reference<
70 			::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL
71 		   	getAccessibleActionKeyBinding( sal_Int32 nIndex )
72 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
73 				::com::sun::star::uno::RuntimeException);
74 
75 	// XAccessibleHyperlink
76     virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionAnchor(
77 				sal_Int32 nIndex )
78 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
79 				::com::sun::star::uno::RuntimeException);
80     virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionObject(
81 			sal_Int32 nIndex )
82 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
83 				::com::sun::star::uno::RuntimeException);
84     virtual sal_Int32 SAL_CALL getStartIndex()
85 		throw (::com::sun::star::uno::RuntimeException);
86     virtual sal_Int32 SAL_CALL getEndIndex()
87 		throw (::com::sun::star::uno::RuntimeException);
88     virtual sal_Bool SAL_CALL isValid(  )
89 		throw (::com::sun::star::uno::RuntimeException);
90 };
91 
92 #endif
93 
94