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 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPREVIEWTABLE_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPREVIEWTABLE_HXX
22 
24 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
25 #include <cppuhelper/implbase1.hxx>
26 
27 class ScPreviewShell;
29 
32 
36 {
37 public:
38  ScAccessiblePreviewTable( const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
39  ScPreviewShell* pViewShell, sal_Int32 nIndex );
40 
41 protected:
42  virtual ~ScAccessiblePreviewTable() override;
43 
45 
46 public:
48  virtual void SAL_CALL disposing() override;
49 
50  //===== SfxListener =====================================================
51 
52  virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
53 
55 
56  virtual css::uno::Any SAL_CALL queryInterface(
57  css::uno::Type const & rType ) override;
58 
59  virtual void SAL_CALL acquire() throw () override;
60 
61  virtual void SAL_CALL release() throw () override;
62 
63  //===== XAccessibleTable ================================================
64 
65  virtual sal_Int32 SAL_CALL getAccessibleRowCount() override;
66  virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override;
67  virtual OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) override;
68  virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) override;
69  virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
70  virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
71  virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL
72  getAccessibleRowHeaders() override;
73  virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL
74  getAccessibleColumnHeaders() override;
75  virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override;
76  virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override;
77  virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) override;
78  virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) override;
79  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
80  getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) override;
81  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
82  getAccessibleCaption() override;
83  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
84  getAccessibleSummary() override;
85  virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) override;
86  virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) override;
87  virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) override;
88  virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) override;
89 
90  //===== XAccessibleComponent ============================================
91 
92  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
93  getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
94  virtual void SAL_CALL grabFocus() override;
95 
96  //===== XAccessibleContext ==============================================
97 
98  virtual sal_Int32 SAL_CALL getAccessibleChildCount() override;
99  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
100  getAccessibleChild( sal_Int32 i ) override;
101  virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
102  virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL
103  getAccessibleStateSet() override;
104 
105  //===== XServiceInfo ====================================================
106 
107  virtual OUString SAL_CALL getImplementationName() override;
108  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
109 
110  //===== XTypeProvider ===================================================
111 
112  virtual css::uno::Sequence< css::uno::Type > SAL_CALL
113  getTypes() override;
114 
115  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
116 
117 protected:
118  virtual OUString createAccessibleDescription() override;
119  virtual OUString createAccessibleName() override;
120 
121  virtual tools::Rectangle GetBoundingBoxOnScreen() const override;
122  virtual tools::Rectangle GetBoundingBox() const override;
123 
124 private:
126  sal_Int32 mnIndex;
127  mutable std::unique_ptr<ScPreviewTableInfo> mpTableInfo;
128 
129  bool IsDefunc(
130  const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
131 
132  void FillTableInfo() const;
133 };
134 
135 #endif
136 
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override
Return this objects index among the parents children.
virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
===== XInterface =====================================================
virtual sal_Int32 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
sal_Int32 nIndex
std::unique_ptr< ScPreviewTableInfo > mpTableInfo
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
===== XAccessibleContext ==============================================
virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int32 nChildIndex) override
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 css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
virtual tools::Rectangle GetBoundingBox() const override
Return the object's current bounding box relative to the parent object.
virtual OUString SAL_CALL getAccessibleRowDescription(sal_Int32 nRow) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual sal_Bool SAL_CALL isAccessibleSelected(sal_Int32 nRow, sal_Int32 nColumn) override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override
cppu::ImplHelper1< css::accessibility::XAccessibleTable > ScAccessiblePreviewTableImpl
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int32 nChildIndex) override
virtual sal_Bool SAL_CALL isAccessibleColumnSelected(sal_Int32 nColumn) override
virtual tools::Rectangle GetBoundingBoxOnScreen() const override
Return the object's current bounding box relative to the desktop.
virtual OUString createAccessibleName() override
Return the object's current name.
virtual ~ScAccessiblePreviewTable() override
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
int i
virtual void SAL_CALL disposing() override
virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override
Return the set of current states.
unsigned char sal_Bool
virtual void SAL_CALL release() override
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
ScAccessiblePreviewTable(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScPreviewShell *pViewShell, sal_Int32 nIndex)
virtual void SAL_CALL grabFocus() override
virtual OUString SAL_CALL getAccessibleColumnDescription(sal_Int32 nColumn) override
virtual void SAL_CALL disposing() override
virtual sal_Bool SAL_CALL isAccessibleRowSelected(sal_Int32 nRow) override
virtual void SAL_CALL acquire() override
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() 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 OUString createAccessibleDescription() override
Return this object's description.
virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================