LibreOffice Module sc (master) 1
AccessiblePreviewTable.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 <com/sun/star/accessibility/XAccessibleTable.hpp>
25
26class ScPreviewShell;
28
31
35{
36public:
37 ScAccessiblePreviewTable( const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
38 ScPreviewShell* pViewShell, sal_Int32 nIndex );
39
40protected:
41 virtual ~ScAccessiblePreviewTable() override;
42
44
45public:
47 virtual void SAL_CALL disposing() override;
48
49 //===== SfxListener =====================================================
50
51 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
52
54
55 virtual css::uno::Any SAL_CALL queryInterface(
56 css::uno::Type const & rType ) override;
57
58 virtual void SAL_CALL acquire() noexcept override;
59
60 virtual void SAL_CALL release() noexcept override;
61
62 //===== XAccessibleTable ================================================
63
64 virtual sal_Int32 SAL_CALL getAccessibleRowCount() override;
65 virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override;
66 virtual OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) override;
67 virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) override;
68 virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
69 virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
70 virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL
71 getAccessibleRowHeaders() override;
72 virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL
74 virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override;
75 virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override;
76 virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) override;
77 virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) override;
78 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
79 getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
80 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
81 getAccessibleCaption() override;
82 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
83 getAccessibleSummary() override;
84 virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) override;
85 virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) override;
86 virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) override;
87 virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) override;
88
89 //===== XAccessibleComponent ============================================
90
91 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
92 getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
93 virtual void SAL_CALL grabFocus() override;
94
95 //===== XAccessibleContext ==============================================
96
97 virtual sal_Int32 SAL_CALL getAccessibleChildCount() override;
98 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
99 getAccessibleChild( sal_Int32 i ) override;
100 virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
101 virtual sal_Int64 SAL_CALL getAccessibleStateSet() override;
102
103 //===== XServiceInfo ====================================================
104
105 virtual OUString SAL_CALL getImplementationName() override;
106 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
107
108 //===== XTypeProvider ===================================================
109
110 virtual css::uno::Sequence< css::uno::Type > SAL_CALL
111 getTypes() override;
112
113 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
114
115protected:
116 virtual OUString createAccessibleDescription() override;
117 virtual OUString createAccessibleName() override;
118
119 virtual tools::Rectangle GetBoundingBoxOnScreen() const override;
120 virtual tools::Rectangle GetBoundingBox() const override;
121
122private:
124 sal_Int32 mnIndex;
125 mutable std::unique_ptr<ScPreviewTableInfo> mpTableInfo;
126
127 bool IsDefunc(sal_Int64 nParentStates);
128
129 void FillTableInfo() const;
130};
131
132/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cppu::ImplHelper1< css::accessibility::XAccessibleTable > ScAccessiblePreviewTableImpl
virtual void SAL_CALL disposing() override
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 sal_Int32 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
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 css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
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 sal_Int32 SAL_CALL getAccessibleColumnExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
===== XAccessibleContext ==============================================
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
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int32 nChildIndex) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int32 nChildIndex) 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 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 css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int32 i) override
Return the specified child or NULL if index is invalid.
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_Int32 SAL_CALL getAccessibleIndexInParent() override
Return this objects index among the parents children.
virtual void SAL_CALL disposing() override
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
sal_Int32 nIndex
int i
unsigned char sal_Bool