LibreOffice Module accessibility (master) 1
AccessibleBrowseBoxTableBase.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
21#pragma once
22
25#include <com/sun/star/accessibility/XAccessibleTable.hpp>
26
27
28namespace accessibility {
29
30typedef ::cppu::ImplHelper1< css::accessibility::XAccessibleTable >
32
40{
41public:
51 const css::uno::Reference< css::accessibility::XAccessible >& rxParent,
54
55protected:
56 virtual ~AccessibleBrowseBoxTableBase() override = default;
57
58public:
59 // XAccessibleContext
60
62 virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
63
65 virtual sal_Int16 SAL_CALL getAccessibleRole() override;
66
67 /* Derived classes have to implement:
68 - getAccessibleChild,
69 - getAccessibleIndexInParent. */
70
71 // XAccessibleComponent
72
73 /* Derived classes have to implement:
74 - getAccessibleAt,
75 - grabFocus. */
76
77 // XAccessibleTable
78
80 virtual sal_Int32 SAL_CALL getAccessibleRowCount() override;
81
83 virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override;
84
86 virtual sal_Int32 SAL_CALL
87 getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
88
90 virtual sal_Int32 SAL_CALL
91 getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
92
94 virtual css::uno::Reference<
95 css::accessibility::XAccessible > SAL_CALL
96 getAccessibleCaption() override;
97
99 virtual css::uno::Reference<
100 css::accessibility::XAccessible > SAL_CALL
101 getAccessibleSummary() override;
102
104 virtual sal_Int64 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) override;
105
107 virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int64 nChildIndex ) override;
108
110 virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int64 nChildIndex ) override;
111
112 /* Derived classes have to implement:
113 - getAccessibleRowDescription,
114 - getAccessibleColumnDescription,
115 - getAccessibleRowHeaders,
116 - getAccessibleColumnHeaders,
117 - getSelectedAccessibleRows,
118 - getSelectedAccessibleColumns,
119 - isAccessibleRowSelected,
120 - isAccessibleColumnSelected,
121 - getAccessibleCellAt,
122 - isAccessibleSelected. */
123
124 // XInterface
125
127 css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override;
128
130 virtual void SAL_CALL acquire() noexcept override;
131
133 virtual void SAL_CALL release() noexcept override;
134
135 // XTypeProvider
136
138 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
139
141 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
142
143 // XServiceInfo
144
145 /* Derived classes have to implement:
146 - getImplementationName */
147
148protected:
149 // internal virtual methods
150
153 virtual sal_Int32 implGetRowCount() const;
156 virtual sal_Int32 implGetColumnCount() const;
157
158 // internal helper methods
159
161 bool implHasHandleColumn() const;
162
169 sal_uInt16 implToVCLColumnPos( sal_Int32 nColumn ) const;
170
173 sal_Int64 implGetChildCount() const;
174
177 sal_Int32 implGetRow( sal_Int64 nChildIndex ) const;
180 sal_Int32 implGetColumn( sal_Int64 nChildIndex ) const;
181
184 bool implIsRowSelected( sal_Int32 nRow ) const;
187 bool implIsColumnSelected( sal_Int32 nColumn ) const;
188
193 void implSelectRow( sal_Int32 nRow, bool bSelect );
198 void implSelectColumn( sal_Int32 nColumnPos, bool bSelect );
199
202 sal_Int32 implGetSelectedRowCount() const;
205 sal_Int32 implGetSelectedColumnCount() const;
206
210 void implGetSelectedRows( css::uno::Sequence< sal_Int32 >& rSeq );
214 void implGetSelectedColumns( css::uno::Sequence< sal_Int32 >& rSeq );
215
219 void ensureIsValidRow( sal_Int32 nRow );
223 void ensureIsValidColumn( sal_Int32 nColumn );
227 void ensureIsValidAddress( sal_Int32 nRow, sal_Int32 nColumn );
231 void ensureIsValidIndex( sal_Int64 nChildIndex );
232};
233
234
235} // namespace accessibility
236
237
238
239/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AccessibleBrowseBoxObjType
The BrowseBox accessible table objects inherit from this base class.
AccessibleBrowseBoxTableBase(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ::vcl::IAccessibleTableProvider &rBrowseBox, AccessibleBrowseBoxObjType eObjType)
Constructor sets specified name and description.
virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
void implGetSelectedRows(css::uno::Sequence< sal_Int32 > &rSeq)
Fills a sequence with sorted indexes of completely selected rows.
void implGetSelectedColumns(css::uno::Sequence< sal_Int32 > &rSeq)
Fills a sequence with sorted indexes of completely selected columns.
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL release() noexcept override
Releases the object (calls release() on base class).
virtual ~AccessibleBrowseBoxTableBase() override=default
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Queries for a new interface.
virtual void SAL_CALL acquire() noexcept override
Acquires the object (calls acquire() on base class).
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
sal_Int32 implGetColumn(sal_Int64 nChildIndex) const
virtual sal_Int64 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int64 nChildIndex) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int64 nChildIndex) override
sal_uInt16 implToVCLColumnPos(sal_Int32 nColumn) const
virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
void implSelectRow(sal_Int32 nRow, bool bSelect)
Selects/deselects a row (tries to expand selection).
sal_Int32 implGetRow(sal_Int64 nChildIndex) const
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
void implSelectColumn(sal_Int32 nColumnPos, bool bSelect)
Selects/deselects a column (tries to expand selection).
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
void ensureIsValidAddress(sal_Int32 nRow, sal_Int32 nColumn)
virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override
::cppu::ImplHelper1< css::accessibility::XAccessibleTable > AccessibleBrowseBoxTableImplHelper
Type
signed char sal_Int8