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 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPREVIEWHEADERCELL_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPREVIEWHEADERCELL_HXX
22 
24 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
25 #include <tools/gen.hxx>
26 #include <address.hxx>
27 #include <cppuhelper/implbase1.hxx>
28 
29 class ScPreviewShell;
30 class ScPreviewTableInfo;
31 namespace accessibility {
32  class AccessibleTextHelper;
33 }
34 
37 
41 {
42 public:
43  ScAccessiblePreviewHeaderCell( const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
44  ScPreviewShell* pViewShell,
45  const ScAddress& rCellPos, bool bIsColHdr, bool bIsRowHdr,
46  sal_Int32 nIndex );
47 
48 protected:
49  virtual ~ScAccessiblePreviewHeaderCell() override;
50 
52 
53 public:
55  virtual void SAL_CALL disposing() override;
56 
57  //===== SfxListener =====================================================
58 
59  virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
60 
62 
63  virtual css::uno::Any SAL_CALL queryInterface(
64  css::uno::Type const & rType ) override;
65 
66  virtual void SAL_CALL acquire() throw () override;
67 
68  virtual void SAL_CALL release() throw () override;
69 
70  //===== XAccessibleValue ================================================
71 
72  virtual css::uno::Any SAL_CALL getCurrentValue() override;
73  virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) override;
74  virtual css::uno::Any SAL_CALL getMaximumValue() override;
75  virtual css::uno::Any SAL_CALL getMinimumValue() 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_Int32 SAL_CALL getAccessibleChildCount() override;
86  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
87  getAccessibleChild( sal_Int32 i ) override;
88  virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
89  virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL
90  getAccessibleStateSet() override;
91 
92  //===== XServiceInfo ====================================================
93 
94  virtual OUString SAL_CALL getImplementationName() override;
95  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
96 
98 
99  virtual css::uno::Sequence< css::uno::Type > SAL_CALL
100  getTypes() override;
101 
104  virtual css::uno::Sequence<sal_Int8> SAL_CALL
105  getImplementationId() override;
106 
107 protected:
108  virtual OUString createAccessibleDescription() override;
109  virtual OUString createAccessibleName() override;
110 
111  virtual tools::Rectangle GetBoundingBoxOnScreen() const override;
112  virtual tools::Rectangle GetBoundingBox() const override;
113 
114 private:
116  std::unique_ptr<accessibility::AccessibleTextHelper> mxTextHelper;
117  sal_Int32 mnIndex;
121  mutable std::unique_ptr<ScPreviewTableInfo> mpTableInfo;
122 
123  bool IsDefunc(
124  const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
125 
126  void CreateTextHelper();
127  void FillTableInfo() const;
128 };
129 
130 #endif
131 
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString createAccessibleDescription() override
Return this object's description.
virtual void SAL_CALL acquire() override
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 grabFocus() override
virtual void SAL_CALL release() 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 =====================================================