1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPREVIEWTABLE_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPREVIEWTABLE_HXX
23 #include "AccessibleContextBase.hxx"
24 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
25 #include <cppuhelper/implbase1.hxx>
28 class ScPreviewTableInfo
;
30 typedef cppu::ImplHelper1
< css::accessibility::XAccessibleTable
>
31 ScAccessiblePreviewTableImpl
;
33 class ScAccessiblePreviewTable
:
34 public ScAccessibleContextBase
,
35 public ScAccessiblePreviewTableImpl
38 ScAccessiblePreviewTable( const css::uno::Reference
<css::accessibility::XAccessible
>& rxParent
,
39 ScPreviewShell
* pViewShell
, sal_Int32 nIndex
);
42 virtual ~ScAccessiblePreviewTable() override
;
44 using ScAccessibleContextBase::IsDefunc
;
47 using ScAccessibleContextBase::disposing
;
48 virtual void SAL_CALL
disposing() override
;
50 //===== SfxListener =====================================================
52 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
54 ///===== XInterface =====================================================
56 virtual css::uno::Any SAL_CALL
queryInterface(
57 css::uno::Type
const & rType
) override
;
59 virtual void SAL_CALL
acquire() throw () override
;
61 virtual void SAL_CALL
release() throw () override
;
63 //===== XAccessibleTable ================================================
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
;
90 //===== XAccessibleComponent ============================================
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
;
96 //===== XAccessibleContext ==============================================
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
;
105 //===== XServiceInfo ====================================================
107 virtual OUString SAL_CALL
getImplementationName() override
;
108 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
110 //===== XTypeProvider ===================================================
112 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
115 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId() override
;
118 virtual OUString
createAccessibleDescription() override
;
119 virtual OUString
createAccessibleName() override
;
121 virtual tools::Rectangle
GetBoundingBoxOnScreen() const override
;
122 virtual tools::Rectangle
GetBoundingBox() const override
;
125 ScPreviewShell
* mpViewShell
;
127 mutable std::unique_ptr
<ScPreviewTableInfo
> mpTableInfo
;
130 const css::uno::Reference
<css::accessibility::XAccessibleStateSet
>& rxParentStates
);
132 void FillTableInfo() const;
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */