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 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 : virtual OUString SAL_CALL
66 : getImplementationName (void)
67 : throw (::com::sun::star::uno::RuntimeException);
68 :
69 : // Return whether the specified service is supported by this class.
70 : virtual sal_Bool SAL_CALL
71 : supportsService (const OUString& sServiceName)
72 : throw (::com::sun::star::uno::RuntimeException);
73 :
74 : // Returns a list of all supported services. In this case that is just
75 : // the AccessibleContext service.
76 : virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL
77 : getSupportedServiceNames (void)
78 : throw (::com::sun::star::uno::RuntimeException);
79 :
80 : virtual void Dispose( sal_Bool bRecursive = sal_False );
81 :
82 : virtual void InvalidatePosOrSize( const SwRect& rFrm );
83 :
84 : // XInterface
85 :
86 : // (XInterface methods need to be implemented to disambiguate
87 : // between those inherited through SwAcessibleContext and
88 : // XAccessibleValue).
89 :
90 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
91 : const ::com::sun::star::uno::Type& aType )
92 : throw (::com::sun::star::uno::RuntimeException);
93 :
94 323 : virtual void SAL_CALL acquire( ) throw ()
95 323 : { SwAccessibleContext::acquire(); };
96 :
97 323 : virtual void SAL_CALL release( ) throw ()
98 323 : { SwAccessibleContext::release(); };
99 :
100 : // XTypeProvider
101 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
102 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
103 :
104 : // XAccessibleValue
105 :
106 : private:
107 : SwFrmFmt* GetTblBoxFormat() const;
108 :
109 : public:
110 : virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue( )
111 : throw (::com::sun::star::uno::RuntimeException);
112 :
113 : virtual sal_Bool SAL_CALL setCurrentValue(
114 : const ::com::sun::star::uno::Any& aNumber )
115 : throw (::com::sun::star::uno::RuntimeException);
116 :
117 : virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue( )
118 : throw (::com::sun::star::uno::RuntimeException);
119 :
120 : virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue( )
121 : throw (::com::sun::star::uno::RuntimeException);
122 : };
123 :
124 :
125 : #endif
126 :
127 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|