1*4c5491eaSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*4c5491eaSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*4c5491eaSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*4c5491eaSAndrew Rist  * distributed with this work for additional information
6*4c5491eaSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*4c5491eaSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*4c5491eaSAndrew Rist  * "License"); you may not use this file except in compliance
9*4c5491eaSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*4c5491eaSAndrew Rist  *
11*4c5491eaSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*4c5491eaSAndrew Rist  *
13*4c5491eaSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*4c5491eaSAndrew Rist  * software distributed under the License is distributed on an
15*4c5491eaSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*4c5491eaSAndrew Rist  * KIND, either express or implied.  See the License for the
17*4c5491eaSAndrew Rist  * specific language governing permissions and limitations
18*4c5491eaSAndrew Rist  * under the License.
19*4c5491eaSAndrew Rist  *
20*4c5491eaSAndrew Rist  *************************************************************/
21*4c5491eaSAndrew Rist 
22*4c5491eaSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SVX_ACCESSIBLE_HYPERLINK_HXX
25cdf0e10cSrcweir #define _SVX_ACCESSIBLE_HYPERLINK_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <cppuhelper/weakref.hxx>
28cdf0e10cSrcweir #include <cppuhelper/compbase1.hxx>
29cdf0e10cSrcweir #include <cppuhelper/typeprovider.hxx>
30cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx>
33cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
34cdf0e10cSrcweir #include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #include <tools/solar.h>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir class SvxFieldItem;
39cdf0e10cSrcweir class SvxAccessibleTextAdapter;
40cdf0e10cSrcweir 
41cdf0e10cSrcweir namespace accessibility
42cdf0e10cSrcweir {
43cdf0e10cSrcweir 
44cdf0e10cSrcweir     class AccessibleHyperlink : public ::cppu::WeakImplHelper1< ::com::sun::star::accessibility::XAccessibleHyperlink >
45cdf0e10cSrcweir     {
46cdf0e10cSrcweir     private:
47cdf0e10cSrcweir 
48cdf0e10cSrcweir         SvxAccessibleTextAdapter& rTA;
49cdf0e10cSrcweir         SvxFieldItem* pFld;
50cdf0e10cSrcweir     	sal_uInt16 nPara, nRealIdx;  // EE values
51cdf0e10cSrcweir     	sal_Int32 nStartIdx, nEndIdx;   // translated values
52cdf0e10cSrcweir     	::rtl::OUString aDescription;
53cdf0e10cSrcweir 
54cdf0e10cSrcweir     public:
55cdf0e10cSrcweir     	AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD );
56cdf0e10cSrcweir     	~AccessibleHyperlink();
57cdf0e10cSrcweir 
58cdf0e10cSrcweir     	// XAccessibleAction
59cdf0e10cSrcweir         virtual sal_Int32 SAL_CALL getAccessibleActionCount() throw (::com::sun::star::uno::RuntimeException);
60cdf0e10cSrcweir         virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
61cdf0e10cSrcweir         virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
62cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
63cdf0e10cSrcweir 
64cdf0e10cSrcweir     	// XAccessibleHyperlink
65cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionAnchor( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
66cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionObject( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
67cdf0e10cSrcweir         virtual sal_Int32 SAL_CALL getStartIndex() throw (::com::sun::star::uno::RuntimeException);
68cdf0e10cSrcweir         virtual sal_Int32 SAL_CALL getEndIndex() throw (::com::sun::star::uno::RuntimeException);
69cdf0e10cSrcweir         virtual sal_Bool SAL_CALL isValid() throw (::com::sun::star::uno::RuntimeException);
70cdf0e10cSrcweir     };
71cdf0e10cSrcweir 
72cdf0e10cSrcweir } // end of namespace accessibility
73cdf0e10cSrcweir 
74cdf0e10cSrcweir #endif
75cdf0e10cSrcweir 
76