update dev300-m58
[ooovba.git] / sw / source / core / access / acchyperlink.hxx
blob561c54a42d0b880368986f8d6e1a6a11ed2956cb
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: acchyperlink.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _ACCHYPERLINK_HXX
31 #define _ACCHYPERLINK_HXX
32 #include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
33 #include <vos/ref.hxx>
34 #include <cppuhelper/implbase1.hxx>
35 #include <fmtinfmt.hxx>
37 class SwAccessibleParagraph;
38 class SwTxtAttr;
40 class SwAccessibleHyperlink :
41 public ::cppu::WeakImplHelper1<
42 ::com::sun::star::accessibility::XAccessibleHyperlink >
44 friend class SwAccessibleParagraph;
45 friend class SwAccessibleHyperTextData;
46 sal_uInt16 nHintPos;
47 ::vos::ORef< SwAccessibleParagraph > xPara;
48 sal_Int32 nStartIdx;
49 sal_Int32 nEndIdx;
51 SwAccessibleHyperlink( sal_uInt16 nHintPos,
52 SwAccessibleParagraph *p,
53 sal_Int32 nStt, sal_Int32 nEnd );
55 const SwTxtAttr *GetTxtAttr() const;
56 void Invalidate();
58 public:
60 // XAccessibleAction
61 virtual sal_Int32 SAL_CALL getAccessibleActionCount()
62 throw (::com::sun::star::uno::RuntimeException);
63 virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex )
64 throw (::com::sun::star::lang::IndexOutOfBoundsException,
65 ::com::sun::star::uno::RuntimeException);
66 virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription(
67 sal_Int32 nIndex )
68 throw (::com::sun::star::lang::IndexOutOfBoundsException,
69 ::com::sun::star::uno::RuntimeException);
70 virtual ::com::sun::star::uno::Reference<
71 ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL
72 getAccessibleActionKeyBinding( sal_Int32 nIndex )
73 throw (::com::sun::star::lang::IndexOutOfBoundsException,
74 ::com::sun::star::uno::RuntimeException);
76 // XAccessibleHyperlink
77 virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionAnchor(
78 sal_Int32 nIndex )
79 throw (::com::sun::star::lang::IndexOutOfBoundsException,
80 ::com::sun::star::uno::RuntimeException);
81 virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionObject(
82 sal_Int32 nIndex )
83 throw (::com::sun::star::lang::IndexOutOfBoundsException,
84 ::com::sun::star::uno::RuntimeException);
85 virtual sal_Int32 SAL_CALL getStartIndex()
86 throw (::com::sun::star::uno::RuntimeException);
87 virtual sal_Int32 SAL_CALL getEndIndex()
88 throw (::com::sun::star::uno::RuntimeException);
89 virtual sal_Bool SAL_CALL isValid( )
90 throw (::com::sun::star::uno::RuntimeException);
93 #endif