Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / AccessibleCellBase.hxx
bloba303c9c64cc5801e019dbc7ba03a10dab640d76e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
21 #ifndef _SC_ACCESSIBLECELLBASE_HXX
22 #define _SC_ACCESSIBLECELLBASE_HXX
24 #include "AccessibleContextBase.hxx"
25 #include "global.hxx"
26 #include "address.hxx"
27 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
28 #include <cppuhelper/implbase1.hxx>
30 typedef cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleValue>
31 ScAccessibleCellBaseImpl;
33 class ScAccessibleCellBase
34 : public ScAccessibleContextBase,
35 public ScAccessibleCellBaseImpl
37 public:
38 //===== internal ========================================================
39 ScAccessibleCellBase(
40 const ::com::sun::star::uno::Reference<
41 ::com::sun::star::accessibility::XAccessible>& rxParent,
42 ScDocument* pDoc,
43 const ScAddress& rCellAddress,
44 sal_Int32 nIndex);
45 protected:
46 virtual ~ScAccessibleCellBase();
47 public:
49 ///===== XInterface =====================================================
51 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
52 ::com::sun::star::uno::Type const & rType )
53 throw (::com::sun::star::uno::RuntimeException);
55 virtual void SAL_CALL acquire() throw ();
57 virtual void SAL_CALL release() throw ();
59 ///===== XAccessibleComponent ============================================
61 virtual sal_Bool SAL_CALL isVisible( )
62 throw (::com::sun::star::uno::RuntimeException);
64 virtual sal_Int32 SAL_CALL getForeground( )
65 throw (::com::sun::star::uno::RuntimeException);
67 virtual sal_Int32 SAL_CALL getBackground( )
68 throw (::com::sun::star::uno::RuntimeException);
70 ///===== XAccessibleContext ==============================================
72 /// Return this objects index among the parents children.
73 virtual sal_Int32 SAL_CALL
74 getAccessibleIndexInParent(void)
75 throw (::com::sun::star::uno::RuntimeException);
77 protected:
78 /// Return this object's description.
79 virtual OUString SAL_CALL
80 createAccessibleDescription(void)
81 throw (::com::sun::star::uno::RuntimeException);
83 /// Return the object's current name.
84 virtual OUString SAL_CALL
85 createAccessibleName(void)
86 throw (::com::sun::star::uno::RuntimeException);
88 public:
89 ///===== XAccessibleValue ================================================
91 virtual ::com::sun::star::uno::Any SAL_CALL
92 getCurrentValue( )
93 throw (::com::sun::star::uno::RuntimeException);
95 virtual sal_Bool SAL_CALL
96 setCurrentValue( const ::com::sun::star::uno::Any& aNumber )
97 throw (::com::sun::star::uno::RuntimeException);
99 virtual ::com::sun::star::uno::Any SAL_CALL
100 getMaximumValue( )
101 throw (::com::sun::star::uno::RuntimeException);
103 virtual ::com::sun::star::uno::Any SAL_CALL
104 getMinimumValue( )
105 throw (::com::sun::star::uno::RuntimeException);
107 ///===== XServiceInfo ====================================================
109 /** Returns an identifier for the implementation of this object.
111 virtual OUString SAL_CALL
112 getImplementationName(void)
113 throw (::com::sun::star::uno::RuntimeException);
115 ///===== XTypeProvider ===================================================
117 /// returns the possible types
118 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
119 getTypes()
120 throw (::com::sun::star::uno::RuntimeException);
122 /** Returns a implementation id.
124 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
125 getImplementationId(void)
126 throw (::com::sun::star::uno::RuntimeException);
128 protected:
129 ScAddress maCellAddress;
131 ScDocument* mpDoc;
133 sal_Int32 mnIndex;
135 private:
136 virtual sal_Bool IsEditable(
137 const com::sun::star::uno::Reference<
138 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
143 #endif
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */