27#include <document.hxx>
32#include <com/sun/star/accessibility/AccessibleRole.hpp>
33#include <com/sun/star/accessibility/AccessibleStateType.hpp>
34#include <com/sun/star/accessibility/AccessibleEventId.hpp>
35#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
50 mpViewShell( pViewShell ),
86 if (
nId == SfxHintId::DataChanged )
92 else if (
nId == SfxHintId::ScAccVisAreaChanged)
94 AccessibleEventObject
aEvent;
95 aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
96 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
108 return aAny.
hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType);
114 ScAccessibleContextBase::acquire();
120 ScAccessibleContextBase::release();
156 throw lang::IndexOutOfBoundsException();
166 throw lang::IndexOutOfBoundsException();
181 throw lang::IndexOutOfBoundsException();
209 sal_Int32 nColumns = 1;
212 throw lang::IndexOutOfBoundsException();
264 throw lang::IndexOutOfBoundsException();
276 throw lang::IndexOutOfBoundsException();
288 uno::Reference<XAccessible> xRet;
289 if (
mpTableInfo && nColumn >= 0 && nRow >= 0 && nColumn < mpTableInfo->GetCols() && nRow < mpTableInfo->GetRows() )
300 const bool bRotatedColHeader = rRowInfo.
bIsHeader;
301 const bool bRotatedRowHeader = rColInfo.
bIsHeader;
303 bRotatedColHeader, bRotatedRowHeader, nNewIndex));
304 xRet = pHeaderCell.get();
316 throw lang::IndexOutOfBoundsException();
342 throw lang::IndexOutOfBoundsException();
356 throw lang::IndexOutOfBoundsException();
359 sal_Int64 nRet =
static_cast<sal_Int64
>(nRow) *
static_cast<sal_Int64
>(
mpTableInfo->GetCols()) + nColumn;
371 throw lang::IndexOutOfBoundsException();
373 sal_Int32 nRow = nChildIndex /
mpTableInfo->GetCols();
385 throw lang::IndexOutOfBoundsException();
387 sal_Int32 nCol = nChildIndex %
static_cast<sal_Int32
>(
mpTableInfo->GetCols());
395 uno::Reference<XAccessible> xRet;
412 awt::Point aMovedPoint = aPoint;
413 aMovedPoint.X += aScreenRect.
Left();
414 aMovedPoint.Y += aScreenRect.
Top();
416 if ( nCols > 0 && nRows > 0 && aMovedPoint.X >= pColInfo[0].
nPixelStart && aMovedPoint.Y >= pRowInfo[0].
nPixelStart )
419 while ( nColIndex < nCols && aMovedPoint.X > pColInfo[nColIndex].nPixelEnd )
422 while ( nRowIndex < nRows && aMovedPoint.Y > pRowInfo[nRowIndex].nPixelEnd )
424 if ( nColIndex < nCols && nRowIndex < nRows )
430 catch (uno::Exception&)
448 if (xAccessibleComponent.is())
449 xAccessibleComponent->grabFocus();
475 uno::Reference<XAccessible> xRet;
482 sal_Int32 nCol =
nIndex % nColumns;
483 sal_Int64 nRow =
nIndex / nColumns;
484 assert(nRow <= std::numeric_limits<sal_Int32>::max());
490 throw lang::IndexOutOfBoundsException();
503 sal_Int64 nParentStates = 0;
506 uno::Reference<XAccessibleContext> xParentContext =
getAccessibleParent()->getAccessibleContext();
507 nParentStates = xParentContext->getAccessibleStateSet();
509 sal_Int64 nStateSet = 0;
511 nStateSet |= AccessibleStateType::DEFUNC;
514 nStateSet |= AccessibleStateType::MANAGES_DESCENDANTS;
515 nStateSet |= AccessibleStateType::ENABLED;
516 nStateSet |= AccessibleStateType::OPAQUE;
518 nStateSet |= AccessibleStateType::SHOWING;
520 nStateSet |= AccessibleStateType::VISIBLE;
529 return "ScAccessiblePreviewTable";
535 sal_Int32 nOldSize(aSequence.getLength());
536 aSequence.realloc(nOldSize + 1);
538 aSequence.getArray()[nOldSize] =
"com.sun.star.table.AccessibleTableView";
552 return css::uno::Sequence<sal_Int8>();
605 if ( nColumns > 0 && nRows > 0 )
611 pRowInfo[0].nPixelStart,
612 pColInfo[nColumns-1].nPixelEnd,
613 pRowInfo[nRows-1].nPixelEnd );
622 (nParentStates & AccessibleStateType::DEFUNC);
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &rPoint) override
===== XAccessibleComponent ============================================
void IsObjectValid() const
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
===== XAccessible =====================================================
virtual void SAL_CALL disposing() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
Return a reference to the parent.
void CommitChange(const css::accessibility::AccessibleEventObject &rEvent) const
Calls all Listener to tell they the change.
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
===== XInterface =====================================================
virtual OUString createAccessibleDescription() override
Return this object's description.
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
Return the set of current states.
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int64 nChildIndex) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
Return this objects index among the parents children.
virtual sal_Bool SAL_CALL isAccessibleColumnSelected(sal_Int32 nColumn) override
ScAccessiblePreviewTable(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScPreviewShell *pViewShell, sal_Int32 nIndex)
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
Return the specified child or NULL if index is invalid.
virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
std::unique_ptr< ScPreviewTableInfo > mpTableInfo
virtual tools::Rectangle GetBoundingBoxOnScreen() const override
Return the object's current bounding box relative to the desktop.
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override
virtual ~ScAccessiblePreviewTable() override
void FillTableInfo() const
ScPreviewShell * mpViewShell
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
virtual OUString SAL_CALL getAccessibleRowDescription(sal_Int32 nRow) override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override
virtual sal_Bool SAL_CALL isAccessibleRowSelected(sal_Int32 nRow) override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
===== XAccessibleContext ==============================================
virtual void SAL_CALL acquire() noexcept override
virtual OUString createAccessibleName() override
Return the object's current name.
virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual tools::Rectangle GetBoundingBox() const override
Return the object's current bounding box relative to the parent object.
virtual OUString SAL_CALL getAccessibleColumnDescription(sal_Int32 nColumn) override
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int64 nChildIndex) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
virtual sal_Bool SAL_CALL isAccessibleSelected(sal_Int32 nRow, sal_Int32 nColumn) override
virtual void SAL_CALL release() noexcept override
virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override
virtual void SAL_CALL grabFocus() override
virtual sal_Int64 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
virtual void SAL_CALL disposing() override
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
SCCOL GetColMerge() const
SCROW GetRowMerge() const
void GetTableInfo(const tools::Rectangle &rVisiblePixel, ScPreviewTableInfo &rInfo) const
const ScPreviewLocationData & GetLocationData()
void AddAccessibilityObject(SfxListener &rObject)
ScDocument & GetDocument()
void RemoveAccessibilityObject(SfxListener &rObject)
vcl::Window * GetWindow() const
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
tools::Rectangle GetWindowExtentsAbsolute() const
Size GetOutputSizePixel() const
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
constexpr OUStringLiteral STR_ACC_TABLE_DESCR