1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLECELLBASE_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLECELLBASE_HXX
23 #include "AccessibleContextBase.hxx"
25 #include "address.hxx"
26 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
27 #include <cppuhelper/implbase1.hxx>
29 typedef cppu::ImplHelper1
< ::com::sun::star::accessibility::XAccessibleValue
>
30 ScAccessibleCellBaseImpl
;
32 class ScAccessibleCellBase
33 : public ScAccessibleContextBase
,
34 public ScAccessibleCellBaseImpl
37 //===== internal ========================================================
39 const ::com::sun::star::uno::Reference
<
40 ::com::sun::star::accessibility::XAccessible
>& rxParent
,
42 const ScAddress
& rCellAddress
,
45 virtual ~ScAccessibleCellBase();
48 virtual bool SAL_CALL
isVisible()
49 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
51 ///===== XInterface =====================================================
53 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
54 ::com::sun::star::uno::Type
const & rType
)
55 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
57 virtual void SAL_CALL
acquire() throw () SAL_OVERRIDE
;
59 virtual void SAL_CALL
release() throw () SAL_OVERRIDE
;
61 ///===== XAccessibleComponent ============================================
63 virtual sal_Int32 SAL_CALL
getForeground( )
64 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
66 virtual sal_Int32 SAL_CALL
getBackground( )
67 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
69 ///===== XAccessibleContext ==============================================
71 /// Return this objects index among the parents children.
72 virtual sal_Int32 SAL_CALL
73 getAccessibleIndexInParent()
74 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
77 /// Return this object's description.
78 virtual OUString SAL_CALL
79 createAccessibleDescription()
80 throw (::com::sun::star::uno::RuntimeException
) SAL_OVERRIDE
;
82 /// Return the object's current name.
83 virtual OUString SAL_CALL
84 createAccessibleName()
85 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
88 ///===== XAccessibleValue ================================================
90 virtual ::com::sun::star::uno::Any SAL_CALL
92 throw (::com::sun::star::uno::RuntimeException
,
93 std::exception
) SAL_OVERRIDE
;
95 virtual sal_Bool SAL_CALL
96 setCurrentValue( const ::com::sun::star::uno::Any
& aNumber
)
97 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
99 virtual ::com::sun::star::uno::Any SAL_CALL
101 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
103 virtual ::com::sun::star::uno::Any SAL_CALL
105 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
107 ///===== XServiceInfo ====================================================
109 /** Returns an identifier for the implementation of this object.
111 virtual OUString SAL_CALL
112 getImplementationName()
113 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
115 ///===== XTypeProvider ===================================================
117 /// returns the possible types
118 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
120 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
122 /** Returns a implementation id.
124 virtual ::com::sun::star::uno::Sequence
<sal_Int8
> SAL_CALL
125 getImplementationId()
126 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
129 ScAddress maCellAddress
;
136 virtual bool IsEditable(
137 const com::sun::star::uno::Reference
<
138 ::com::sun::star::accessibility::XAccessibleStateSet
>& rxParentStates
);
140 OUString SAL_CALL
GetNote()
141 throw (::com::sun::star::uno::RuntimeException
);
143 OUString SAL_CALL
GetAllDisplayNote()
144 throw (::com::sun::star::uno::RuntimeException
);
145 OUString SAL_CALL
getShadowAttrs()
146 throw (::com::sun::star::uno::RuntimeException
);
147 OUString SAL_CALL
getBorderAttrs()
148 throw (::com::sun::star::uno::RuntimeException
);
150 const ScAddress
& GetCellAddress() const { return maCellAddress
; }
151 bool IsCellInChangeTrack(const ScAddress
&cell
,Color
*pColCellBoder
);
156 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */