LibreOffice Module sc (master)  1
AccessibleTableBase.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLETABLEBASE_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLETABLEBASE_HXX
22 
24 #include <address.hxx>
25 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
26 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
27 #include <com/sun/star/accessibility/XAccessibleTableSelection.hpp>
28 #include <cppuhelper/implbase2.hxx>
29 
35 typedef cppu::ImplHelper2< css::accessibility::XAccessibleTable,
36  css::accessibility::XAccessibleSelection>
38 
41  public css::accessibility::XAccessibleTableSelection,
43 {
44 public:
45  //===== internal ========================================================
47  const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
48  ScDocument* pDoc,
49  const ScRange& rRange);
50 protected:
51  virtual ~ScAccessibleTableBase() override;
52 public:
53 
55  virtual void SAL_CALL disposing() override;
56 
58 
59  virtual css::uno::Any SAL_CALL queryInterface(
60  css::uno::Type const & rType ) override;
61 
62  virtual void SAL_CALL acquire() throw () override;
63 
64  virtual void SAL_CALL release() throw () override;
65 
67 
69  virtual sal_Int32 SAL_CALL
70  getAccessibleRowCount( ) override;
71 
73  virtual sal_Int32 SAL_CALL
74  getAccessibleColumnCount( ) override;
75 
77  virtual OUString SAL_CALL
78  getAccessibleRowDescription( sal_Int32 nRow ) override;
79 
81  virtual OUString SAL_CALL
82  getAccessibleColumnDescription( sal_Int32 nColumn ) override;
83 
87  virtual sal_Int32 SAL_CALL
88  getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
89 
93  virtual sal_Int32 SAL_CALL
94  getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
95 
97  virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL
98  getAccessibleRowHeaders( ) override;
99 
101  virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL
102  getAccessibleColumnHeaders( ) override;
103 
105  virtual css::uno::Sequence< sal_Int32 > SAL_CALL
106  getSelectedAccessibleRows( ) override;
107 
109  virtual css::uno::Sequence< sal_Int32 > SAL_CALL
110  getSelectedAccessibleColumns( ) override;
111 
113  virtual sal_Bool SAL_CALL
114  isAccessibleRowSelected( sal_Int32 nRow ) override;
115 
117  virtual sal_Bool SAL_CALL
118  isAccessibleColumnSelected( sal_Int32 nColumn ) override;
119 
121  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
122  getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
123 
125  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
126  getAccessibleCaption( ) override;
127 
129  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
130  getAccessibleSummary( ) override;
131 
133  virtual sal_Bool SAL_CALL
134  isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) override;
135 
137 
139  virtual sal_Int32 SAL_CALL
140  getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) override;
141 
143  virtual sal_Int32 SAL_CALL
144  getAccessibleRow( sal_Int32 nChildIndex ) override;
145 
147  virtual sal_Int32 SAL_CALL
148  getAccessibleColumn( sal_Int32 nChildIndex ) override;
149 
150  //===== XAccessibleContext ==============================================
151 
154  virtual sal_Int32 SAL_CALL
155  getAccessibleChildCount() override;
156 
159  virtual css::uno::Reference< css::accessibility::XAccessible> SAL_CALL
160  getAccessibleChild(sal_Int32 nIndex) override;
161  virtual sal_Bool SAL_CALL selectRow( sal_Int32 row ) override;
162  virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column ) override;
163  virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row ) override;
164  virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column ) override;
165 
166 protected:
168  virtual OUString
169  createAccessibleDescription() override;
170 
172  virtual OUString
173  createAccessibleName() override;
174 
175 public:
177  virtual css::uno::Reference<css::accessibility::XAccessibleRelationSet> SAL_CALL
178  getAccessibleRelationSet() override;
179 
181  // perhaps sometimes to be implemented
182  virtual css::uno::Reference<css::accessibility::XAccessibleStateSet> SAL_CALL
183  getAccessibleStateSet() override;
184 
186 
187  virtual void SAL_CALL
188  selectAccessibleChild( sal_Int32 nChildIndex ) override;
189 
190  virtual sal_Bool SAL_CALL
191  isAccessibleChildSelected( sal_Int32 nChildIndex ) override;
192 
193  virtual void SAL_CALL
194  clearAccessibleSelection( ) override;
195 
196  virtual void SAL_CALL
197  selectAllAccessibleChildren( ) override;
198 
199  virtual sal_Int32 SAL_CALL
201 
202  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
203  getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
204 
205  virtual void SAL_CALL
206  deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
207 
209 
212  virtual OUString SAL_CALL
213  getImplementationName() override;
214 
216 
218  virtual css::uno::Sequence< css::uno::Type > SAL_CALL
219  getTypes() override;
220 
223  virtual css::uno::Sequence<sal_Int8> SAL_CALL
224  getImplementationId() override;
225 
226 protected:
229 
231 
232  void CommitTableModelChange(sal_Int32 nStartRow, sal_Int32 nStartCol, sal_Int32 nEndRow, sal_Int32 nEndCol, sal_uInt16 nId);
233 };
234 
235 #endif
236 
237 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL release() override
virtual OUString createAccessibleDescription() override
Return this object's description.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the Accessible at a specified row and column in the table.
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
Return the number of currently visible children.
virtual void SAL_CALL selectAllAccessibleChildren() override
sal_Int32 nIndex
virtual void SAL_CALL acquire() override
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
===== XInterface =====================================================
virtual OUString SAL_CALL getAccessibleRowDescription(sal_Int32 nRow) override
Returns the description of the specified row in the table.
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ===================================================
virtual OUString SAL_CALL getAccessibleColumnDescription(sal_Int32 nColumn) override
Returns the description text of the specified column in the table.
virtual sal_Bool SAL_CALL unselectColumn(sal_Int32 column) override
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
===== XAccessibleTable ================================================
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int32 nChildIndex) override
virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount() override
virtual void SAL_CALL clearAccessibleSelection() override
virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override
Returns the number of columns in the table.
virtual void SAL_CALL selectAccessibleChild(sal_Int32 nChildIndex) override
===== XAccessibleSelection ===========================================
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
Returns the caption for the table.
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int32 nChildIndex) override
Returns the column number of an index in the table.
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Returns an implementation id.
virtual sal_Bool SAL_CALL selectRow(sal_Int32 row) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
===== XTypeProvider ===================================================
virtual ~ScAccessibleTableBase() override
void CommitTableModelChange(sal_Int32 nStartRow, sal_Int32 nStartCol, sal_Int32 nEndRow, sal_Int32 nEndCol, sal_uInt16 nId)
virtual sal_Bool SAL_CALL isAccessibleRowSelected(sal_Int32 nRow) override
Returns a boolean value indicating whether the specified row is selected.
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() override
Returns the row headers as an AccessibleTable.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int32 nIndex) override
Return the specified child or NULL if index is invalid.
virtual void SAL_CALL disposing() override
unsigned char sal_Bool
virtual sal_Bool SAL_CALL isAccessibleColumnSelected(sal_Int32 nColumn) override
Returns a boolean value indicating whether the specified column is selected.
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
Return NULL to indicate that an empty relation set.
virtual sal_Bool SAL_CALL selectColumn(sal_Int32 column) override
virtual void SAL_CALL deselectAccessibleChild(sal_Int32 nSelectedChildIndex) override
virtual sal_Bool SAL_CALL isAccessibleSelected(sal_Int32 nRow, sal_Int32 nColumn) override
Returns a boolean value indicating whether the accessible at a specified row and column is selected...
virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the number of columns occupied by the Accessible at a specified row and column in the table...
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int32 nChildIndex) override
Returns the row number of an index in the table.
virtual void SAL_CALL disposing() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
Returns the summary description of the table.
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override
Returns the selected rows in a table.
ScAccessibleTableBase(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScDocument *pDoc, const ScRange &rRange)
virtual OUString createAccessibleName() override
Return the object's current name.
virtual sal_Int32 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
===== XAccessibleExtendedTable ========================================
virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override
Return the set of current states.
virtual sal_Bool SAL_CALL unselectRow(sal_Int32 row) override
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override
Returns the column headers as an AccessibleTable.
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override
Returns the selected columns in a table.
cppu::ImplHelper2< css::accessibility::XAccessibleTable, css::accessibility::XAccessibleSelection > ScAccessibleTableBaseImpl
This base class provides an implementation of the AccessibleTable service.
virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the number of rows occupied by the Accessible at a specified row and column in the table...
ScRange maRange
contains the range of the table, because it could be a subrange of the complete table ...
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int32 nSelectedChildIndex) override