tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / AccessiblePreviewTable.hxx
blob34fa7a8d3643236b1de220758ae3977db7cd532c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
22 #include "AccessibleContextBase.hxx"
23 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
24 #include <cppuhelper/implbase1.hxx>
26 class ScPreviewShell;
27 class ScPreviewTableInfo;
29 typedef cppu::ImplHelper1< css::accessibility::XAccessibleTable>
30 ScAccessiblePreviewTableImpl;
32 class ScAccessiblePreviewTable :
33 public ScAccessibleContextBase,
34 public ScAccessiblePreviewTableImpl
36 public:
37 ScAccessiblePreviewTable( const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
38 ScPreviewShell* pViewShell, sal_Int32 nIndex );
40 protected:
41 virtual ~ScAccessiblePreviewTable() override;
43 using ScAccessibleContextBase::IsDefunc;
45 public:
46 using ScAccessibleContextBase::disposing;
47 virtual void SAL_CALL disposing() override;
49 //===== SfxListener =====================================================
51 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
53 ///===== XInterface =====================================================
55 virtual css::uno::Any SAL_CALL queryInterface(
56 css::uno::Type const & rType ) override;
58 virtual void SAL_CALL acquire() noexcept override;
60 virtual void SAL_CALL release() noexcept override;
62 //===== XAccessibleTable ================================================
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
73 getAccessibleColumnHeaders() override;
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_Int64 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) override;
86 virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int64 nChildIndex ) override;
87 virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int64 nChildIndex ) override;
89 //===== XAccessibleComponent ============================================
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;
95 //===== XAccessibleContext ==============================================
97 virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
98 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
99 getAccessibleChild( sal_Int64 i ) override;
100 virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
101 virtual sal_Int64 SAL_CALL getAccessibleStateSet() override;
103 //===== XServiceInfo ====================================================
105 virtual OUString SAL_CALL getImplementationName() override;
106 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
108 //===== XTypeProvider ===================================================
110 virtual css::uno::Sequence< css::uno::Type > SAL_CALL
111 getTypes() override;
113 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
115 protected:
116 virtual OUString createAccessibleDescription() override;
117 virtual OUString createAccessibleName() override;
119 virtual AbsoluteScreenPixelRectangle GetBoundingBoxOnScreen() const override;
120 virtual tools::Rectangle GetBoundingBox() const override;
122 private:
123 ScPreviewShell* mpViewShell;
124 sal_Int32 mnIndex;
125 mutable std::unique_ptr<ScPreviewTableInfo> mpTableInfo;
127 bool IsDefunc(sal_Int64 nParentStates);
129 void FillTableInfo() const;
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */