xref: /AOO41X/main/sw/source/core/access/accnotexthyperlink.hxx (revision 0deba7fbda3d9908785c25a443701a293b6f4e71)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright IBM Corporation 2010.
6  * Copyright 2000, 2010 Oracle and/or its affiliates.
7  *
8  * OpenOffice.org - a multi-platform office productivity suite
9  *
10  * This file is part of OpenOffice.org.
11  *
12  * OpenOffice.org is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 3
14  * only, as published by the Free Software Foundation.
15  *
16  * OpenOffice.org is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU Lesser General Public License version 3 for more details
20  * (a copy is included in the LICENSE file that accompanied this code).
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * version 3 along with OpenOffice.org.  If not, see
24  * <http://www.openoffice.org/license.html>
25  * for a copy of the LGPLv3 License.
26  *
27  ************************************************************************/
28 
29 #ifndef _ACCNOTEXTHYPERLINK_HXX
30 #define _ACCNOTEXTHYPERLINK_HXX
31 
32 
33 #include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
34 #include <com/sun/star/uno/RuntimeException.hpp>
35 #include <vos/ref.hxx>
36 #include <cppuhelper/implbase1.hxx>
37 #include <fmtinfmt.hxx>
38 #include <frame.hxx>
39 #include <layfrm.hxx>
40 
41 #include "accnotextframe.hxx"
42 /*
43 using namespace ::com::sun::star::lang;
44 using namespace ::com::sun::star::uno;
45 using namespace ::com::sun::star::accessibility;
46 using namespace ::rtl;
47 */
48 class SwAccessibleNoTextHyperlink :
49 		public ::cppu::WeakImplHelper1<
50 		::com::sun::star::accessibility::XAccessibleHyperlink >
51 {
52 	friend class SwAccessibleNoTextFrame;
53 
54 	::vos::ORef< SwAccessibleNoTextFrame > xFrame;
55 	const SwFrm *mpFrm;
56 	sal_uInt16 mnIndex;
57 
58 	SwFrmFmt *GetFmt()
59 	{
60 		return ((SwLayoutFrm*)mpFrm)->GetFmt();
61 	}
62 public:
63 
64 	SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrm* aFrm, sal_uInt16 nIndex = 0xFFFF );
65 
66 	// XAccessibleAction
67     virtual sal_Int32 SAL_CALL getAccessibleActionCount()
68 		throw (::com::sun::star::uno::RuntimeException);
69     virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex )
70 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
71 				::com::sun::star::uno::RuntimeException);
72     virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription(
73 				sal_Int32 nIndex )
74 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
75 				::com::sun::star::uno::RuntimeException);
76     virtual ::com::sun::star::uno::Reference<
77 			::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL
78 		   	getAccessibleActionKeyBinding( sal_Int32 nIndex )
79 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
80 				::com::sun::star::uno::RuntimeException);
81 
82 	// XAccessibleHyperlink
83     virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionAnchor(
84 				sal_Int32 nIndex )
85 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
86 				::com::sun::star::uno::RuntimeException);
87     virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionObject(
88 			sal_Int32 nIndex )
89 		throw (::com::sun::star::lang::IndexOutOfBoundsException,
90 				::com::sun::star::uno::RuntimeException);
91     virtual sal_Int32 SAL_CALL getStartIndex()
92 		throw (::com::sun::star::uno::RuntimeException);
93     virtual sal_Int32 SAL_CALL getEndIndex()
94 		throw (::com::sun::star::uno::RuntimeException);
95     virtual sal_Bool SAL_CALL isValid(  )
96 		throw (::com::sun::star::uno::RuntimeException);
97 };
98 
99 #endif
100 
101