/src/libreoffice/sc/source/ui/inc/AccessibleCellBase.hxx
Line | Count | Source |
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 | | |
22 | | #include "AccessibleContextBase.hxx" |
23 | | #include <address.hxx> |
24 | | #include <com/sun/star/accessibility/XAccessibleValue.hpp> |
25 | | |
26 | | class ScAccessibleCellBase |
27 | | : public cppu::ImplInheritanceHelper<ScAccessibleContextBase, |
28 | | css::accessibility::XAccessibleValue> |
29 | | { |
30 | | public: |
31 | | ScAccessibleCellBase( |
32 | | const css::uno::Reference<css::accessibility::XAccessible>& rxParent, |
33 | | ScDocument* pDoc, |
34 | | const ScAddress& rCellAddress, |
35 | | sal_Int64 nIndex); |
36 | | protected: |
37 | | virtual ~ScAccessibleCellBase() override; |
38 | | public: |
39 | | |
40 | | virtual bool isVisible() override; |
41 | | |
42 | | ///===== XAccessibleComponent ============================================ |
43 | | |
44 | | virtual sal_Int32 SAL_CALL getForeground( ) override; |
45 | | |
46 | | virtual sal_Int32 SAL_CALL getBackground( ) override; |
47 | | |
48 | | ///===== XAccessibleContext ============================================== |
49 | | |
50 | | /// Return this objects index among the parents children. |
51 | | virtual sal_Int64 SAL_CALL |
52 | | getAccessibleIndexInParent() override; |
53 | | |
54 | | protected: |
55 | | /// Return this object's description. |
56 | | virtual OUString |
57 | | createAccessibleDescription() override; |
58 | | |
59 | | /// Return the object's current name. |
60 | | virtual OUString |
61 | | createAccessibleName() override; |
62 | | |
63 | | public: |
64 | | ///===== XAccessibleValue ================================================ |
65 | | |
66 | | virtual css::uno::Any SAL_CALL |
67 | | getCurrentValue() override; |
68 | | |
69 | | virtual sal_Bool SAL_CALL |
70 | | setCurrentValue( const css::uno::Any& aNumber ) override; |
71 | | |
72 | | virtual css::uno::Any SAL_CALL |
73 | | getMaximumValue( ) override; |
74 | | |
75 | | virtual css::uno::Any SAL_CALL |
76 | | getMinimumValue( ) override; |
77 | | |
78 | | virtual css::uno::Any SAL_CALL |
79 | | getMinimumIncrement( ) override; |
80 | | |
81 | | protected: |
82 | | ScAddress maCellAddress; |
83 | | |
84 | | ScDocument* mpDoc; |
85 | | |
86 | | sal_Int64 mnIndex; |
87 | | |
88 | | private: |
89 | | virtual bool IsEditable(sal_Int64 nParentStates); |
90 | | protected: |
91 | | /// @throw css::uno::RuntimeException |
92 | | OUString GetNote() const; |
93 | | |
94 | | /// @throw css::uno::RuntimeException |
95 | | OUString GetAllDisplayNote() const; |
96 | | /// @throw css::uno::RuntimeException |
97 | | OUString getShadowAttrs() const; |
98 | | /// @throw css::uno::RuntimeException |
99 | | OUString getBorderAttrs(); |
100 | | public: |
101 | 0 | const ScAddress& GetCellAddress() const { return maCellAddress; } |
102 | | }; |
103 | | |
104 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |