merge the formfield patch from ooo-build
[ooovba.git] / sw / source / core / access / acccell.hxx
blob0afb510652ec4e906c601c4825fc5c8d94f5d74b
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: acccell.hxx,v $
10 * $Revision: 1.10 $
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 _ACCCELL_HXX
31 #define _ACCCELL_HXX
32 #ifndef _ACCCONTEXT_HXX
33 #include "acccontext.hxx"
34 #endif
35 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
37 class SwCellFrm;
39 class SwAccessibleCell : public SwAccessibleContext,
40 ::com::sun::star::accessibility::XAccessibleValue
43 sal_Bool bIsSelected; // protected by base class mutex
45 sal_Bool IsSelected();
47 sal_Bool _InvalidateMyCursorPos();
48 sal_Bool _InvalidateChildrenCursorPos( const SwFrm *pFrm );
50 protected:
52 // Set states for getAccessibleStateSet.
53 // This drived class additionaly sets SELECTABLE(1) and SELECTED(+)
54 virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
56 virtual void _InvalidateCursorPos();
58 virtual ~SwAccessibleCell();
60 public:
62 SwAccessibleCell( SwAccessibleMap* pInitMap, const SwCellFrm *pCellFrm );
64 virtual sal_Bool HasCursor(); // required by map to remember that object
66 //===== XAccessibleContext ==============================================
68 /// Return this object's description.
69 virtual ::rtl::OUString SAL_CALL
70 getAccessibleDescription (void)
71 throw (com::sun::star::uno::RuntimeException);
73 //===== XServiceInfo ====================================================
75 /** Returns an identifier for the implementation of this object.
77 virtual ::rtl::OUString SAL_CALL
78 getImplementationName (void)
79 throw (::com::sun::star::uno::RuntimeException);
81 /** Return whether the specified service is supported by this class.
83 virtual sal_Bool SAL_CALL
84 supportsService (const ::rtl::OUString& sServiceName)
85 throw (::com::sun::star::uno::RuntimeException);
87 /** Returns a list of all supported services. In this case that is just
88 the AccessibleContext service.
90 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
91 getSupportedServiceNames (void)
92 throw (::com::sun::star::uno::RuntimeException);
94 virtual void Dispose( sal_Bool bRecursive = sal_False );
96 virtual void InvalidatePosOrSize( const SwRect& rFrm );
98 //===== XInterface ======================================================
100 // (XInterface methods need to be implemented to disambiguate
101 // between those inherited through SwAcessibleContext and
102 // XAccessibleValue).
104 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
105 const ::com::sun::star::uno::Type& aType )
106 throw (::com::sun::star::uno::RuntimeException);
108 virtual void SAL_CALL acquire( ) throw ()
109 { SwAccessibleContext::acquire(); };
111 virtual void SAL_CALL release( ) throw ()
112 { SwAccessibleContext::release(); };
114 //====== XTypeProvider ====================================================
115 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
116 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
118 //===== XAccessibleValue ================================================
120 private:
121 SwFrmFmt* GetTblBoxFormat() const;
123 public:
124 virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue( )
125 throw (::com::sun::star::uno::RuntimeException);
127 virtual sal_Bool SAL_CALL setCurrentValue(
128 const ::com::sun::star::uno::Any& aNumber )
129 throw (::com::sun::star::uno::RuntimeException);
131 virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue( )
132 throw (::com::sun::star::uno::RuntimeException);
134 virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue( )
135 throw (::com::sun::star::uno::RuntimeException);
139 #endif