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 #pragma once
21 
23 #include <address.hxx>
24 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
25 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
26 #include <com/sun/star/accessibility/XAccessibleTableSelection.hpp>
27 #include <cppuhelper/implbase2.hxx>
28 
34 typedef cppu::ImplHelper2< css::accessibility::XAccessibleTable,
35  css::accessibility::XAccessibleSelection>
37 
40  public css::accessibility::XAccessibleTableSelection,
42 {
43 public:
44  //===== internal ========================================================
46  const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
47  ScDocument* pDoc,
48  const ScRange& rRange);
49 protected:
50  virtual ~ScAccessibleTableBase() override;
51 public:
52 
54  virtual void SAL_CALL disposing() override;
55 
57 
58  virtual css::uno::Any SAL_CALL queryInterface(
59  css::uno::Type const & rType ) override;
60 
61  virtual void SAL_CALL acquire() noexcept override;
62 
63  virtual void SAL_CALL release() noexcept override;
64 
66 
68  virtual sal_Int32 SAL_CALL
69  getAccessibleRowCount( ) override;
70 
72  virtual sal_Int32 SAL_CALL
73  getAccessibleColumnCount( ) override;
74 
76  virtual OUString SAL_CALL
77  getAccessibleRowDescription( sal_Int32 nRow ) override;
78 
80  virtual OUString SAL_CALL
81  getAccessibleColumnDescription( sal_Int32 nColumn ) override;
82 
86  virtual sal_Int32 SAL_CALL
87  getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
88 
92  virtual sal_Int32 SAL_CALL
93  getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
94 
96  virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL
97  getAccessibleRowHeaders( ) override;
98 
100  virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL
101  getAccessibleColumnHeaders( ) override;
102 
104  virtual css::uno::Sequence< sal_Int32 > SAL_CALL
105  getSelectedAccessibleRows( ) override;
106 
108  virtual css::uno::Sequence< sal_Int32 > SAL_CALL
109  getSelectedAccessibleColumns( ) override;
110 
112  virtual sal_Bool SAL_CALL
113  isAccessibleRowSelected( sal_Int32 nRow ) override;
114 
116  virtual sal_Bool SAL_CALL
117  isAccessibleColumnSelected( sal_Int32 nColumn ) override;
118 
120  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
121  getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
122 
124  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
125  getAccessibleCaption( ) override;
126 
128  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
129  getAccessibleSummary( ) override;
130 
132  virtual sal_Bool SAL_CALL
133  isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) override;
134 
136 
138  virtual sal_Int32 SAL_CALL
139  getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) override;
140 
142  virtual sal_Int32 SAL_CALL
143  getAccessibleRow( sal_Int32 nChildIndex ) override;
144 
146  virtual sal_Int32 SAL_CALL
147  getAccessibleColumn( sal_Int32 nChildIndex ) override;
148 
149  //===== XAccessibleContext ==============================================
150 
153  virtual sal_Int32 SAL_CALL
154  getAccessibleChildCount() override;
155 
158  virtual css::uno::Reference< css::accessibility::XAccessible> SAL_CALL
159  getAccessibleChild(sal_Int32 nIndex) override;
160  virtual sal_Bool SAL_CALL selectRow( sal_Int32 row ) override;
161  virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column ) override;
162  virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row ) override;
163  virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column ) override;
164 
165 protected:
167  virtual OUString
168  createAccessibleDescription() override;
169 
171  virtual OUString
172  createAccessibleName() override;
173 
174 public:
176  virtual css::uno::Reference<css::accessibility::XAccessibleRelationSet> SAL_CALL
177  getAccessibleRelationSet() override;
178 
180  // perhaps sometimes to be implemented
181  virtual css::uno::Reference<css::accessibility::XAccessibleStateSet> SAL_CALL
182  getAccessibleStateSet() override;
183 
185 
186  virtual void SAL_CALL
187  selectAccessibleChild( sal_Int32 nChildIndex ) override;
188 
189  virtual sal_Bool SAL_CALL
190  isAccessibleChildSelected( sal_Int32 nChildIndex ) override;
191 
192  virtual void SAL_CALL
193  clearAccessibleSelection( ) override;
194 
195  virtual void SAL_CALL
196  selectAllAccessibleChildren( ) override;
197 
198  virtual sal_Int32 SAL_CALL
200 
201  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
202  getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
203 
204  virtual void SAL_CALL
205  deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
206 
208 
211  virtual OUString SAL_CALL
212  getImplementationName() override;
213 
215 
217  virtual css::uno::Sequence< css::uno::Type > SAL_CALL
218  getTypes() override;
219 
222  virtual css::uno::Sequence<sal_Int8> SAL_CALL
223  getImplementationId() override;
224 
225 protected:
228 
230 
231  void CommitTableModelChange(sal_Int32 nStartRow, sal_Int32 nStartCol, sal_Int32 nEndRow, sal_Int32 nEndCol, sal_uInt16 nId);
232 };
233 
234 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 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 void SAL_CALL release() noexcept override
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 void SAL_CALL acquire() noexcept override
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