Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_ACCHYPERLINK_HXX
21 : #define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCHYPERLINK_HXX
22 :
23 : #include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
24 : #include <rtl/ref.hxx>
25 : #include <cppuhelper/implbase.hxx>
26 : #include <fmtinfmt.hxx>
27 :
28 : class SwAccessibleParagraph;
29 : class SwTextAttr;
30 :
31 0 : class SwAccessibleHyperlink :
32 : public ::cppu::WeakImplHelper<
33 : ::com::sun::star::accessibility::XAccessibleHyperlink >
34 : {
35 : friend class SwAccessibleParagraph;
36 : friend class SwAccessibleHyperTextData;
37 : size_t nHintPos;
38 : ::rtl::Reference< SwAccessibleParagraph > xPara;
39 : sal_Int32 nStartIdx;
40 : sal_Int32 nEndIdx;
41 :
42 : SwAccessibleHyperlink( size_t nHintPos,
43 : SwAccessibleParagraph *p,
44 : sal_Int32 nStt, sal_Int32 nEnd );
45 :
46 : const SwTextAttr *GetTextAttr() const;
47 : void Invalidate();
48 :
49 : public:
50 : // XAccessibleAction
51 : virtual sal_Int32 SAL_CALL getAccessibleActionCount()
52 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
53 : virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex )
54 : throw (::com::sun::star::lang::IndexOutOfBoundsException,
55 : ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
56 : virtual OUString SAL_CALL getAccessibleActionDescription(
57 : sal_Int32 nIndex )
58 : throw (::com::sun::star::lang::IndexOutOfBoundsException,
59 : ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 : virtual ::com::sun::star::uno::Reference<
61 : ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL
62 : getAccessibleActionKeyBinding( sal_Int32 nIndex )
63 : throw (::com::sun::star::lang::IndexOutOfBoundsException,
64 : ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
65 :
66 : // XAccessibleHyperlink
67 : virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionAnchor(
68 : sal_Int32 nIndex )
69 : throw (::com::sun::star::lang::IndexOutOfBoundsException,
70 : ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
71 : virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionObject(
72 : sal_Int32 nIndex )
73 : throw (::com::sun::star::lang::IndexOutOfBoundsException,
74 : ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
75 : virtual sal_Int32 SAL_CALL getStartIndex()
76 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
77 : virtual sal_Int32 SAL_CALL getEndIndex()
78 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
79 : virtual sal_Bool SAL_CALL isValid( )
80 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 : };
82 :
83 : #endif
84 :
85 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|