LibreOffice Module sc (master)  1
AccessibleCellBase.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 <address.hxx>
24 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
25 #include <cppuhelper/implbase1.hxx>
26 
29 
31  : public ScAccessibleContextBase,
33 {
34 public:
35  //===== internal ========================================================
37  const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
38  ScDocument* pDoc,
39  const ScAddress& rCellAddress,
40  sal_Int32 nIndex);
41 protected:
42  virtual ~ScAccessibleCellBase() override;
43 public:
44 
45  virtual bool isVisible() override;
46 
48 
49  virtual css::uno::Any SAL_CALL queryInterface(
50  css::uno::Type const & rType ) override;
51 
52  virtual void SAL_CALL acquire() noexcept override;
53 
54  virtual void SAL_CALL release() noexcept override;
55 
57 
58  virtual sal_Int32 SAL_CALL getForeground( ) override;
59 
60  virtual sal_Int32 SAL_CALL getBackground( ) override;
61 
63 
65  virtual sal_Int32 SAL_CALL
66  getAccessibleIndexInParent() override;
67 
68 protected:
70  virtual OUString
71  createAccessibleDescription() override;
72 
74  virtual OUString
75  createAccessibleName() override;
76 
77 public:
79 
80  virtual css::uno::Any SAL_CALL
81  getCurrentValue() override;
82 
83  virtual sal_Bool SAL_CALL
84  setCurrentValue( const css::uno::Any& aNumber ) override;
85 
86  virtual css::uno::Any SAL_CALL
87  getMaximumValue( ) override;
88 
89  virtual css::uno::Any SAL_CALL
90  getMinimumValue( ) override;
91 
92  virtual css::uno::Any SAL_CALL
93  getMinimumIncrement( ) override;
94 
96 
99  virtual OUString SAL_CALL
100  getImplementationName() override;
101 
103 
105  virtual css::uno::Sequence< css::uno::Type > SAL_CALL
106  getTypes() override;
107 
110  virtual css::uno::Sequence<sal_Int8> SAL_CALL
111  getImplementationId() override;
112 
113 protected:
115 
117 
118  sal_Int32 mnIndex;
119 
120 private:
121  virtual bool IsEditable(
122  const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
123 protected:
125  OUString GetNote() const;
126 
128  OUString GetAllDisplayNote() const;
130  OUString getShadowAttrs() const;
132  OUString getBorderAttrs();
133 public:
134  const ScAddress& GetCellAddress() const { return maCellAddress; }
135 };
136 
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Bool SAL_CALL setCurrentValue(const css::uno::Any &aNumber) override
virtual bool isVisible() override
sal_Int32 nIndex
virtual css::uno::Any SAL_CALL getMinimumValue() override
virtual OUString createAccessibleDescription() override
Return this object's description.
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Returns an implementation id.
virtual css::uno::Any SAL_CALL getMinimumIncrement() override
ScAccessibleCellBase(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScDocument *pDoc, const ScAddress &rCellAddress, sal_Int32 nIndex)
virtual OUString createAccessibleName() override
Return the object's current name.
cppu::ImplHelper1< css::accessibility::XAccessibleValue > ScAccessibleCellBaseImpl
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
OUString GetNote() const
const ScAddress & GetCellAddress() const
unsigned char sal_Bool
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
===== XTypeProvider ===================================================
virtual void SAL_CALL release() noexcept override
virtual ~ScAccessibleCellBase() override
virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override
===== XAccessibleContext ==============================================
OUString GetAllDisplayNote() const
OUString getShadowAttrs() const
virtual css::uno::Any SAL_CALL getMaximumValue() override
virtual bool IsEditable(const css::uno::Reference< css::accessibility::XAccessibleStateSet > &rxParentStates)
virtual void SAL_CALL acquire() noexcept override
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
===== XInterface =====================================================
virtual sal_Int32 SAL_CALL getForeground() override
===== XAccessibleComponent ============================================
virtual css::uno::Any SAL_CALL getCurrentValue() override
===== XAccessibleValue ================================================