LibreOffice Module sc (master) 1
AccessiblePreviewHeaderCell.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/XAccessibleValue.hpp>
24#include <tools/gen.hxx>
25#include <address.hxx>
27
28class ScPreviewShell;
30namespace accessibility {
31 class AccessibleTextHelper;
32}
33
36
40{
41public:
42 ScAccessiblePreviewHeaderCell( const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
43 ScPreviewShell* pViewShell,
44 const ScAddress& rCellPos, bool bIsColHdr, bool bIsRowHdr,
45 sal_Int32 nIndex );
46
47protected:
48 virtual ~ScAccessiblePreviewHeaderCell() override;
49
51
52public:
54 virtual void SAL_CALL disposing() override;
55
56 //===== SfxListener =====================================================
57
58 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
59
61
62 virtual css::uno::Any SAL_CALL queryInterface(
63 css::uno::Type const & rType ) override;
64
65 virtual void SAL_CALL acquire() noexcept override;
66
67 virtual void SAL_CALL release() noexcept override;
68
69 //===== XAccessibleValue ================================================
70
71 virtual css::uno::Any SAL_CALL getCurrentValue() override;
72 virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) override;
73 virtual css::uno::Any SAL_CALL getMaximumValue() override;
74 virtual css::uno::Any SAL_CALL getMinimumValue() override;
75 virtual css::uno::Any SAL_CALL getMinimumIncrement() override;
76
77 //===== XAccessibleComponent ============================================
78
79 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
80 getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
81 virtual void SAL_CALL grabFocus() override;
82
83 //===== XAccessibleContext ==============================================
84
85 virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
86 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
87 getAccessibleChild( sal_Int64 i ) override;
88 virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
89 virtual sal_Int64 SAL_CALL getAccessibleStateSet() override;
90
91 //===== XServiceInfo ====================================================
92
93 virtual OUString SAL_CALL getImplementationName() override;
94 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
95
97
98 virtual css::uno::Sequence< css::uno::Type > SAL_CALL
99 getTypes() override;
100
103 virtual css::uno::Sequence<sal_Int8> SAL_CALL
104 getImplementationId() override;
105
106protected:
107 virtual OUString createAccessibleDescription() override;
108 virtual OUString createAccessibleName() override;
109
110 virtual tools::Rectangle GetBoundingBoxOnScreen() const override;
111 virtual tools::Rectangle GetBoundingBox() const override;
112
113private:
115 std::unique_ptr<accessibility::AccessibleTextHelper> mxTextHelper;
116 sal_Int32 mnIndex;
120 mutable std::unique_ptr<ScPreviewTableInfo> mpTableInfo;
121
122 bool IsDefunc(sal_Int64 nParentStates);
123
124 void CreateTextHelper();
125 void FillTableInfo() const;
126};
127
128/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cppu::ImplHelper1< css::accessibility::XAccessibleValue > ScAccessiblePreviewHeaderCellImpl
virtual void SAL_CALL disposing() override
virtual OUString createAccessibleName() override
Return the object's current name.
virtual sal_Bool SAL_CALL setCurrentValue(const css::uno::Any &aNumber) override
virtual css::uno::Any SAL_CALL getMinimumIncrement() override
virtual void SAL_CALL disposing() override
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
std::unique_ptr< accessibility::AccessibleTextHelper > mxTextHelper
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL release() noexcept override
virtual tools::Rectangle GetBoundingBox() const override
Return the object's current bounding box relative to the parent object.
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
Return the set of current states.
virtual css::uno::Any SAL_CALL getMaximumValue() override
virtual css::uno::Any SAL_CALL getMinimumValue() override
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_Int64 SAL_CALL getAccessibleChildCount() override
===== XAccessibleContext ==============================================
virtual OUString createAccessibleDescription() override
Return this object's description.
ScAccessiblePreviewHeaderCell(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScPreviewShell *pViewShell, const ScAddress &rCellPos, bool bIsColHdr, bool bIsRowHdr, sal_Int32 nIndex)
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
Return this objects index among the parents children.
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
===== XInterface =====================================================
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
===== XTypeProvider ===================================================
virtual css::uno::Any SAL_CALL getCurrentValue() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Returns an implementation id.
virtual void SAL_CALL grabFocus() override
std::unique_ptr< ScPreviewTableInfo > mpTableInfo
virtual tools::Rectangle GetBoundingBoxOnScreen() const override
Return the object's current bounding box relative to the desktop.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
sal_Int32 nIndex
int i
unsigned char sal_Bool