138d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
338d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
438d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
538d50f7bSAndrew Rist  * distributed with this work for additional information
638d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
738d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
838d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
938d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
1038d50f7bSAndrew Rist  *
1138d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
1238d50f7bSAndrew Rist  *
1338d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
1438d50f7bSAndrew Rist  * software distributed under the License is distributed on an
1538d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1638d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
1738d50f7bSAndrew Rist  * specific language governing permissions and limitations
1838d50f7bSAndrew Rist  * under the License.
1938d50f7bSAndrew Rist  *
2038d50f7bSAndrew Rist  *************************************************************/
2138d50f7bSAndrew Rist 
2238d50f7bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #ifndef _SC_ACCESSIBLECELLBASE_HXX
26cdf0e10cSrcweir #define _SC_ACCESSIBLECELLBASE_HXX
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include "AccessibleContextBase.hxx"
29cdf0e10cSrcweir #include "global.hxx"
30cdf0e10cSrcweir #include "address.hxx"
31cdf0e10cSrcweir #include <com/sun/star/accessibility/XAccessibleValue.hpp>
32cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir class ScTabViewShell;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir typedef cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleValue>
37cdf0e10cSrcweir 					ScAccessibleCellBaseImpl;
38cdf0e10cSrcweir 
39cdf0e10cSrcweir class ScAccessibleCellBase
40cdf0e10cSrcweir 	:	public ScAccessibleContextBase,
41cdf0e10cSrcweir 		public ScAccessibleCellBaseImpl
42cdf0e10cSrcweir {
43cdf0e10cSrcweir public:
44cdf0e10cSrcweir 	//=====  internal  ========================================================
45cdf0e10cSrcweir 	ScAccessibleCellBase(
46cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
47cdf0e10cSrcweir         ::com::sun::star::accessibility::XAccessible>& rxParent,
48cdf0e10cSrcweir 		ScDocument* pDoc,
49cdf0e10cSrcweir 		const ScAddress& rCellAddress,
50cdf0e10cSrcweir 		sal_Int32 nIndex);
51cdf0e10cSrcweir protected:
52cdf0e10cSrcweir 	virtual ~ScAccessibleCellBase();
53cdf0e10cSrcweir public:
54cdf0e10cSrcweir 
55cdf0e10cSrcweir 	///=====  XInterface  =====================================================
56cdf0e10cSrcweir 
57cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
58cdf0e10cSrcweir 		::com::sun::star::uno::Type const & rType )
59cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	virtual void SAL_CALL acquire() throw ();
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 	virtual void SAL_CALL release() throw ();
64cdf0e10cSrcweir 
65cdf0e10cSrcweir 	///=====  XAccessibleComponent  ============================================
66cdf0e10cSrcweir 
67cdf0e10cSrcweir     virtual sal_Bool SAL_CALL isVisible(  )
68cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
69cdf0e10cSrcweir 
70cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getForeground(  )
71cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
72cdf0e10cSrcweir 
73cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getBackground(  )
74cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
75cdf0e10cSrcweir 
76cdf0e10cSrcweir     ///=====  XAccessibleContext  ==============================================
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     ///	Return this objects index among the parents children.
79cdf0e10cSrcweir 	virtual	sal_Int32 SAL_CALL
80cdf0e10cSrcweir     	getAccessibleIndexInParent(void)
81cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
82cdf0e10cSrcweir 
83cdf0e10cSrcweir protected:
84cdf0e10cSrcweir     ///	Return this object's description.
85cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL
86cdf0e10cSrcweir     	createAccessibleDescription(void)
87cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
88cdf0e10cSrcweir 
89cdf0e10cSrcweir     ///	Return the object's current name.
90cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL
91cdf0e10cSrcweir     	createAccessibleName(void)
92cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
93cdf0e10cSrcweir 
94cdf0e10cSrcweir public:
95cdf0e10cSrcweir 	///=====  XAccessibleValue  ================================================
96cdf0e10cSrcweir 
97cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL
98cdf0e10cSrcweir 		getCurrentValue(  )
99cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
100cdf0e10cSrcweir 
101cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
102cdf0e10cSrcweir 		setCurrentValue( const ::com::sun::star::uno::Any& aNumber )
103cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
104cdf0e10cSrcweir 
105cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL
106cdf0e10cSrcweir 		getMaximumValue(  )
107cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL
110cdf0e10cSrcweir 		getMinimumValue(  )
111cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
112cdf0e10cSrcweir 
113cdf0e10cSrcweir 	///=====  XServiceInfo  ====================================================
114cdf0e10cSrcweir 
115cdf0e10cSrcweir     /**	Returns an identifier for the implementation of this object.
116cdf0e10cSrcweir     */
117cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL
118cdf0e10cSrcweir     	getImplementationName(void)
119cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
120cdf0e10cSrcweir 
121cdf0e10cSrcweir 	///=====  XTypeProvider  ===================================================
122cdf0e10cSrcweir 
123cdf0e10cSrcweir 	/// returns the possible types
124cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
125cdf0e10cSrcweir 		getTypes()
126cdf0e10cSrcweir 		throw (::com::sun::star::uno::RuntimeException);
127cdf0e10cSrcweir 
128cdf0e10cSrcweir 	/**	Returns a implementation id.
129cdf0e10cSrcweir     */
130cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
131cdf0e10cSrcweir         getImplementationId(void)
132cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
133cdf0e10cSrcweir 
134cdf0e10cSrcweir protected:
135cdf0e10cSrcweir 	ScAddress maCellAddress;
136cdf0e10cSrcweir 
137cdf0e10cSrcweir 	ScDocument* mpDoc;
138cdf0e10cSrcweir 
139cdf0e10cSrcweir 	sal_Int32 mnIndex;
140cdf0e10cSrcweir 
141cdf0e10cSrcweir private:
142cdf0e10cSrcweir 	virtual sal_Bool IsEditable(
143cdf0e10cSrcweir 		const com::sun::star::uno::Reference<
144cdf0e10cSrcweir 		::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
145*0deba7fbSSteve Yin protected:
146*0deba7fbSSteve Yin 	virtual ::rtl::OUString SAL_CALL GetNote(void)
147*0deba7fbSSteve Yin         throw (::com::sun::star::uno::RuntimeException);
148*0deba7fbSSteve Yin 
149*0deba7fbSSteve Yin 	virtual ::rtl::OUString SAL_CALL GetAllDisplayNote(void)
150*0deba7fbSSteve Yin         throw (::com::sun::star::uno::RuntimeException);
151*0deba7fbSSteve Yin 	virtual ::rtl::OUString SAL_CALL getShadowAttrs(void)
152*0deba7fbSSteve Yin 		throw (::com::sun::star::uno::RuntimeException);
153*0deba7fbSSteve Yin 	virtual ::rtl::OUString SAL_CALL getBorderAttrs(void)
154*0deba7fbSSteve Yin 		throw (::com::sun::star::uno::RuntimeException);
155*0deba7fbSSteve Yin public:
GetCellAddress() const156*0deba7fbSSteve Yin 	const ScAddress& GetCellAddress() const { return maCellAddress; }
157*0deba7fbSSteve Yin 	sal_Bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder);
158cdf0e10cSrcweir };
159cdf0e10cSrcweir 
160cdf0e10cSrcweir 
161cdf0e10cSrcweir 
162cdf0e10cSrcweir #endif
163