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>
26 #include <cppuhelper/implbase1.hxx>
27 
28 class ScPreviewShell;
29 class ScPreviewTableInfo;
30 namespace accessibility {
31  class AccessibleTextHelper;
32 }
33 
36 
40 {
41 public:
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 
47 protected:
48  virtual ~ScAccessiblePreviewHeaderCell() override;
49 
51 
52 public:
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 
76  //===== XAccessibleComponent ============================================
77 
78  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
79  getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
80  virtual void SAL_CALL grabFocus() override;
81 
82  //===== XAccessibleContext ==============================================
83 
84  virtual sal_Int32 SAL_CALL getAccessibleChildCount() override;
85  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
86  getAccessibleChild( sal_Int32 i ) override;
87  virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
88  virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL
89  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 
106 protected:
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 
113 private:
115  std::unique_ptr<accessibility::AccessibleTextHelper> mxTextHelper;
116  sal_Int32 mnIndex;
120  mutable std::unique_ptr<ScPreviewTableInfo> mpTableInfo;
121 
122  bool IsDefunc(
123  const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
124 
125  void CreateTextHelper();
126  void FillTableInfo() const;
127 };
128 
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString createAccessibleDescription() override
Return this object's description.
sal_Int32 nIndex
virtual void SAL_CALL disposing() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Returns an implementation id.
virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override
Return the set of current states.
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual tools::Rectangle GetBoundingBoxOnScreen() const override
Return the object's current bounding box relative to the desktop.
virtual css::uno::Any SAL_CALL getMaximumValue() override
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
===== XAccessibleContext ==============================================
virtual css::uno::Any SAL_CALL getMinimumValue() override
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
===== XTypeProvider ===================================================
virtual OUString createAccessibleName() override
Return the object's current name.
virtual sal_Int32 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 =====================================================
int i
ScAccessiblePreviewHeaderCell(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScPreviewShell *pViewShell, const ScAddress &rCellPos, bool bIsColHdr, bool bIsRowHdr, sal_Int32 nIndex)
virtual tools::Rectangle GetBoundingBox() const override
Return the object's current bounding box relative to the parent object.
std::unique_ptr< ScPreviewTableInfo > mpTableInfo
unsigned char sal_Bool
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL grabFocus() override
cppu::ImplHelper1< css::accessibility::XAccessibleValue > ScAccessiblePreviewHeaderCellImpl
virtual sal_Bool SAL_CALL setCurrentValue(const css::uno::Any &aNumber) override
virtual void SAL_CALL disposing() override
virtual css::uno::Any SAL_CALL getCurrentValue() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) 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.
std::unique_ptr< accessibility::AccessibleTextHelper > mxTextHelper
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================