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 : #ifndef _ACCCELL_HXX
20 : #define _ACCCELL_HXX
21 :
22 : #include "acccontext.hxx"
23 : #include <com/sun/star/accessibility/XAccessibleValue.hpp>
24 :
25 : class SwCellFrm;
26 : class SwFrmFmt;
27 :
28 : class SwAccessibleCell : public SwAccessibleContext,
29 : ::com::sun::star::accessibility::XAccessibleValue
30 :
31 : {
32 : sal_Bool bIsSelected; // protected by base class mutex
33 :
34 : sal_Bool IsSelected();
35 :
36 : sal_Bool _InvalidateMyCursorPos();
37 : sal_Bool _InvalidateChildrenCursorPos( const SwFrm *pFrm );
38 :
39 : protected:
40 :
41 : // Set states for getAccessibleStateSet.
42 : // This drived class additionaly sets SELECTABLE(1) and SELECTED(+)
43 : virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
44 :
45 : virtual void _InvalidateCursorPos();
46 :
47 : virtual ~SwAccessibleCell();
48 :
49 : public:
50 :
51 : SwAccessibleCell( SwAccessibleMap* pInitMap, const SwCellFrm *pCellFrm );
52 :
53 : virtual sal_Bool HasCursor(); // required by map to remember that object
54 :
55 : //===== XAccessibleContext ==============================================
56 :
57 : /// Return this object's description.
58 : virtual ::rtl::OUString SAL_CALL
59 : getAccessibleDescription (void)
60 : throw (com::sun::star::uno::RuntimeException);
61 :
62 : //===== XServiceInfo ====================================================
63 :
64 : /** Returns an identifier for the implementation of this object.
65 : */
66 : virtual ::rtl::OUString SAL_CALL
67 : getImplementationName (void)
68 : throw (::com::sun::star::uno::RuntimeException);
69 :
70 : /** Return whether the specified service is supported by this class.
71 : */
72 : virtual sal_Bool SAL_CALL
73 : supportsService (const ::rtl::OUString& sServiceName)
74 : throw (::com::sun::star::uno::RuntimeException);
75 :
76 : /** Returns a list of all supported services. In this case that is just
77 : the AccessibleContext service.
78 : */
79 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
80 : getSupportedServiceNames (void)
81 : throw (::com::sun::star::uno::RuntimeException);
82 :
83 : virtual void Dispose( sal_Bool bRecursive = sal_False );
84 :
85 : virtual void InvalidatePosOrSize( const SwRect& rFrm );
86 :
87 : //===== XInterface ======================================================
88 :
89 : // (XInterface methods need to be implemented to disambiguate
90 : // between those inherited through SwAcessibleContext and
91 : // XAccessibleValue).
92 :
93 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
94 : const ::com::sun::star::uno::Type& aType )
95 : throw (::com::sun::star::uno::RuntimeException);
96 :
97 0 : virtual void SAL_CALL acquire( ) throw ()
98 0 : { SwAccessibleContext::acquire(); };
99 :
100 0 : virtual void SAL_CALL release( ) throw ()
101 0 : { SwAccessibleContext::release(); };
102 :
103 : //====== XTypeProvider ====================================================
104 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
105 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
106 :
107 : //===== XAccessibleValue ================================================
108 :
109 : private:
110 : SwFrmFmt* GetTblBoxFormat() const;
111 :
112 : public:
113 : virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue( )
114 : throw (::com::sun::star::uno::RuntimeException);
115 :
116 : virtual sal_Bool SAL_CALL setCurrentValue(
117 : const ::com::sun::star::uno::Any& aNumber )
118 : throw (::com::sun::star::uno::RuntimeException);
119 :
120 : virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue( )
121 : throw (::com::sun::star::uno::RuntimeException);
122 :
123 : virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue( )
124 : throw (::com::sun::star::uno::RuntimeException);
125 : };
126 :
127 :
128 : #endif
129 :
130 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|