21#include <document.hxx>
27#include <com/sun/star/accessibility/AccessibleRole.hpp>
28#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
29#include <com/sun/star/accessibility/AccessibleEventId.hpp>
30#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
40 const uno::Reference<XAccessible>& rxParent,
68 return uno::Any(uno::Reference<XAccessibleTableSelection>(
this));
73 return aAny.
hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType);
80 ScAccessibleContextBase::acquire();
86 ScAccessibleContextBase::release();
107 OSL_FAIL(
"Here should be an implementation to fill the description");
110 throw lang::IndexOutOfBoundsException();
118 OSL_FAIL(
"Here should be an implementation to fill the description");
121 throw lang::IndexOutOfBoundsException();
134 throw lang::IndexOutOfBoundsException();
146 SCROW nEndRow = nStartRow;
147 SCCOL nStartCol =
static_cast<SCCOL>(nColumn);
148 SCCOL nEndCol = nStartCol;
149 if (pTab->
ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow,
false))
151 if (nEndRow > nStartRow)
152 nCount = nEndRow - nStartRow + 1;
167 throw lang::IndexOutOfBoundsException();
179 SCROW nEndRow = nStartRow;
180 SCCOL nStartCol =
static_cast<SCCOL>(nColumn);
181 SCCOL nEndCol = nStartCol;
182 if (pTab->
ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow,
false))
184 if (nEndCol > nStartCol)
185 nCount = nEndCol - nStartCol + 1;
195 uno::Reference< XAccessibleTable > xAccessibleTable;
196 OSL_FAIL(
"Here should be an implementation to fill the row headers");
199 return xAccessibleTable;
204 uno::Reference< XAccessibleTable > xAccessibleTable;
205 OSL_FAIL(
"Here should be an implementation to fill the column headers");
208 return xAccessibleTable;
213 OSL_FAIL(
"not implemented yet");
214 uno::Sequence< sal_Int32 > aSequence;
220 OSL_FAIL(
"not implemented yet");
221 uno::Sequence< sal_Int32 > aSequence;
227 OSL_FAIL(
"not implemented yet");
233 OSL_FAIL(
"not implemented yet");
239 OSL_FAIL(
"not implemented yet");
240 uno::Reference< XAccessible > xAccessible;
246 OSL_FAIL(
"not implemented yet");
247 uno::Reference< XAccessible > xAccessible;
253 OSL_FAIL(
"not implemented yet");
254 uno::Reference< XAccessible > xAccessible;
260 OSL_FAIL(
"not implemented yet");
275 throw lang::IndexOutOfBoundsException();
279 return (
static_cast<sal_Int64
>(nRow) *
static_cast<sal_Int64
>(
maRange.
aEnd.
Col() + 1)) + nColumn;
288 throw lang::IndexOutOfBoundsException();
299 throw lang::IndexOutOfBoundsException();
320uno::Reference< XAccessible > SAL_CALL
327 throw lang::IndexOutOfBoundsException();
333 sal_Int32 nColumn(0);
355uno::Reference<XAccessibleRelationSet> SAL_CALL
358 OSL_FAIL(
"should be implemented in the abrevated class");
359 return uno::Reference<XAccessibleRelationSet>();
364 OSL_FAIL(
"should be implemented in the abrevated class");
379 throw lang::IndexOutOfBoundsException();
398uno::Reference<XAccessible > SAL_CALL
401 uno::Reference < XAccessible > xAccessible;
413 return "ScAccessibleTableBase";
423uno::Sequence<sal_Int8> SAL_CALL
426 return css::uno::Sequence<sal_Int8>();
431 AccessibleTableModelChange aModelChange;
432 aModelChange.FirstRow = nStartRow;
433 aModelChange.FirstColumn = nStartCol;
434 aModelChange.LastRow = nEndRow;
435 aModelChange.LastColumn = nEndCol;
436 aModelChange.Type =
nId;
438 AccessibleEventObject
aEvent;
439 aEvent.EventId = AccessibleEventId::TABLE_MODEL_CHANGED;
440 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
441 aEvent.NewValue <<= aModelChange;
void IsObjectValid() const
virtual void SAL_CALL disposing() override
void CommitChange(const css::accessibility::AccessibleEventObject &rEvent) const
Calls all Listener to tell they the change.
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
===== XInterface =====================================================
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() override
Returns the row headers as an AccessibleTable.
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.
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
virtual OUString createAccessibleName() override
Return the object's current name.
virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override
Returns the number of columns in the table.
virtual void SAL_CALL acquire() noexcept override
virtual sal_Bool SAL_CALL isAccessibleRowSelected(sal_Int32 nRow) override
Returns a boolean value indicating whether the specified row is selected.
virtual void SAL_CALL release() noexcept override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
virtual OUString SAL_CALL getAccessibleRowDescription(sal_Int32 nRow) override
Returns the description of the specified row in the table.
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Returns an implementation id.
virtual void SAL_CALL clearAccessibleSelection() override
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ===================================================
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
===== XAccessibleTable ================================================
virtual sal_Int64 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
===== XAccessibleExtendedTable ========================================
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int64 nChildIndex) override
Returns the row number of an index in the table.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
Return the specified child or NULL if index is invalid.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
Returns the caption for the table.
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 OUString SAL_CALL getAccessibleColumnDescription(sal_Int32 nColumn) override
Returns the description text of the specified 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 getAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the Accessible at a specified row and column in 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 void SAL_CALL deselectAccessibleChild(sal_Int64 nSelectedChildIndex) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
Returns the summary description of the table.
virtual void SAL_CALL selectAllAccessibleChildren() override
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::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override
Returns the column headers as an AccessibleTable.
virtual ~ScAccessibleTableBase() override
virtual sal_Bool SAL_CALL selectColumn(sal_Int32 column) override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Return the number of currently visible children.
void CommitTableModelChange(sal_Int32 nStartRow, sal_Int32 nStartCol, sal_Int32 nEndRow, sal_Int32 nEndCol, sal_uInt16 nId)
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
Return the set of current states.
virtual OUString createAccessibleDescription() override
Return this object's description.
virtual sal_Bool SAL_CALL selectRow(sal_Int32 row) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
===== XTypeProvider ===================================================
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
virtual sal_Bool SAL_CALL unselectColumn(sal_Int32 column) override
virtual void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
===== XAccessibleSelection ===========================================
virtual sal_Bool SAL_CALL unselectRow(sal_Int32 row) override
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int64 nChildIndex) override
Returns the column number of an index in the table.
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override
Returns the selected columns in a table.
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 disposing() override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
Return NULL to indicate that an empty relation set.
SC_DLLPUBLIC ScTable * FetchTable(SCTAB nTab)
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bRefresh)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
OUString ScResId(TranslateId aId)
constexpr OUStringLiteral STR_ACC_TABLE_DESCR