update dev300-m58
[ooovba.git] / sc / source / ui / inc / AccessibleCellBase.hxx
blobfe48e1605ca1bad3a3a1b5cdfadb05e3b5c212cc
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: AccessibleCellBase.hxx,v $
10 * $Revision: 1.12 $
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 ************************************************************************/
32 #ifndef _SC_ACCESSIBLECELLBASE_HXX
33 #define _SC_ACCESSIBLECELLBASE_HXX
35 #include "AccessibleContextBase.hxx"
36 #include "global.hxx"
37 #include "address.hxx"
38 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
39 #include <cppuhelper/implbase1.hxx>
41 class ScTabViewShell;
43 typedef cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleValue>
44 ScAccessibleCellBaseImpl;
46 class ScAccessibleCellBase
47 : public ScAccessibleContextBase,
48 public ScAccessibleCellBaseImpl
50 public:
51 //===== internal ========================================================
52 ScAccessibleCellBase(
53 const ::com::sun::star::uno::Reference<
54 ::com::sun::star::accessibility::XAccessible>& rxParent,
55 ScDocument* pDoc,
56 const ScAddress& rCellAddress,
57 sal_Int32 nIndex);
58 protected:
59 virtual ~ScAccessibleCellBase();
60 public:
62 ///===== XInterface =====================================================
64 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
65 ::com::sun::star::uno::Type const & rType )
66 throw (::com::sun::star::uno::RuntimeException);
68 virtual void SAL_CALL acquire() throw ();
70 virtual void SAL_CALL release() throw ();
72 ///===== XAccessibleComponent ============================================
74 virtual sal_Bool SAL_CALL isVisible( )
75 throw (::com::sun::star::uno::RuntimeException);
77 virtual sal_Int32 SAL_CALL getForeground( )
78 throw (::com::sun::star::uno::RuntimeException);
80 virtual sal_Int32 SAL_CALL getBackground( )
81 throw (::com::sun::star::uno::RuntimeException);
83 ///===== XAccessibleContext ==============================================
85 /// Return this objects index among the parents children.
86 virtual sal_Int32 SAL_CALL
87 getAccessibleIndexInParent(void)
88 throw (::com::sun::star::uno::RuntimeException);
90 protected:
91 /// Return this object's description.
92 virtual ::rtl::OUString SAL_CALL
93 createAccessibleDescription(void)
94 throw (::com::sun::star::uno::RuntimeException);
96 /// Return the object's current name.
97 virtual ::rtl::OUString SAL_CALL
98 createAccessibleName(void)
99 throw (::com::sun::star::uno::RuntimeException);
101 public:
102 ///===== XAccessibleValue ================================================
104 virtual ::com::sun::star::uno::Any SAL_CALL
105 getCurrentValue( )
106 throw (::com::sun::star::uno::RuntimeException);
108 virtual sal_Bool SAL_CALL
109 setCurrentValue( const ::com::sun::star::uno::Any& aNumber )
110 throw (::com::sun::star::uno::RuntimeException);
112 virtual ::com::sun::star::uno::Any SAL_CALL
113 getMaximumValue( )
114 throw (::com::sun::star::uno::RuntimeException);
116 virtual ::com::sun::star::uno::Any SAL_CALL
117 getMinimumValue( )
118 throw (::com::sun::star::uno::RuntimeException);
120 ///===== XServiceInfo ====================================================
122 /** Returns an identifier for the implementation of this object.
124 virtual ::rtl::OUString SAL_CALL
125 getImplementationName(void)
126 throw (::com::sun::star::uno::RuntimeException);
128 ///===== XTypeProvider ===================================================
130 /// returns the possible types
131 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
132 getTypes()
133 throw (::com::sun::star::uno::RuntimeException);
135 /** Returns a implementation id.
137 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
138 getImplementationId(void)
139 throw (::com::sun::star::uno::RuntimeException);
141 protected:
142 ScAddress maCellAddress;
144 ScDocument* mpDoc;
146 sal_Int32 mnIndex;
148 private:
149 virtual sal_Bool IsEditable(
150 const com::sun::star::uno::Reference<
151 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
156 #endif