LibreOffice Module sw (master) 1
acccell.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
22#include "acccontext.hxx"
23#include <com/sun/star/accessibility/XAccessibleValue.hpp>
25
26class SwCellFrame;
28class SwFrameFormat;
29
31 public css::accessibility::XAccessibleValue,
32 public css::accessibility::XAccessibleSelection,
33 public css::accessibility::XAccessibleExtendedAttributes
34{
35 // Implementation for XAccessibleSelection interface
37 bool m_bIsSelected; // protected by base class mutex
38
39 bool IsSelected();
40
42 bool InvalidateChildrenCursorPos( const SwFrame *pFrame );
43
45
46protected:
47 // Set states for getAccessibleStateSet.
48 // This derived class additionally sets SELECTABLE(1) and SELECTED(+)
49 virtual void GetStates( sal_Int64& rStateSet ) override;
50
51 virtual void InvalidateCursorPos_() override;
52
53 virtual ~SwAccessibleCell() override;
54
55public:
56 SwAccessibleCell(std::shared_ptr<SwAccessibleMap> const& pInitMap,
57 const SwCellFrame *pCellFrame);
58
59 virtual bool HasCursor() override; // required by map to remember that object
60
61 // XAccessibleContext
62
64 virtual OUString SAL_CALL
65 getAccessibleDescription() override;
66
67 // XServiceInfo
68
69 // Returns an identifier for the implementation of this object.
70 virtual OUString SAL_CALL
71 getImplementationName() override;
72
73 // Return whether the specified service is supported by this class.
74 virtual sal_Bool SAL_CALL
75 supportsService (const OUString& sServiceName) override;
76
77 // Returns a list of all supported services. In this case that is just
78 // the AccessibleContext service.
79 virtual css::uno::Sequence< OUString> SAL_CALL
80 getSupportedServiceNames() override;
81
82 virtual void Dispose(bool bRecursive, bool bCanSkipInvisible = true) override;
83
84 virtual void InvalidatePosOrSize( const SwRect& rFrame ) override;
85
86 // XInterface
87
88 // (XInterface methods need to be implemented to disambiguate
89 // between those inherited through SwAccessibleContext and
90 // XAccessibleValue).
91
92 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
93
94 virtual void SAL_CALL acquire( ) noexcept override
95 { SwAccessibleContext::acquire(); };
96
97 virtual void SAL_CALL release( ) noexcept override
98 { SwAccessibleContext::release(); };
99
100 // XTypeProvider
101 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
102 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
103
104 // XAccessibleExtendedAttributes
105 css::uno::Any SAL_CALL getExtendedAttributes() override ;
106private:
108
109public:
110 // XAccessibleValue
111 virtual css::uno::Any SAL_CALL getCurrentValue( ) override;
112 virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) override;
113 virtual css::uno::Any SAL_CALL getMaximumValue( ) override;
114 virtual css::uno::Any SAL_CALL getMinimumValue( ) override;
115 virtual css::uno::Any SAL_CALL getMinimumIncrement( ) override;
116
117 // XAccessibleComponent
118 sal_Int32 SAL_CALL getBackground() override;
119
120 // XAccessibleSelection
121 virtual void SAL_CALL selectAccessibleChild( sal_Int64 nChildIndex ) override;
122
123 virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int64 nChildIndex ) override;
124 virtual void SAL_CALL clearAccessibleSelection( ) override;
125 virtual void SAL_CALL selectAllAccessibleChildren( ) override;
126 virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount( ) override;
127 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
128 sal_Int64 nSelectedChildIndex ) override;
129
130 virtual void SAL_CALL deselectAccessibleChild( sal_Int64 nSelectedChildIndex ) override;
131};
132
133/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral sServiceName
Definition: accdoc.cxx:54
virtual css::uno::Any SAL_CALL getMinimumValue() override
Definition: acccell.cxx:361
SwFrameFormat * GetTableBoxFormat() const
Definition: acccell.cxx:321
sal_Int32 SAL_CALL getBackground() override
Definition: acccell.cxx:393
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
Definition: acccell.cxx:442
virtual void SAL_CALL release() noexcept override
Definition: acccell.hxx:97
virtual void InvalidatePosOrSize(const SwRect &rFrame) override
Definition: acccell.cxx:266
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: acccell.cxx:278
virtual css::uno::Any SAL_CALL getMinimumIncrement() override
Definition: acccell.cxx:366
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: acccell.cxx:251
bool InvalidateChildrenCursorPos(const SwFrame *pFrame)
Definition: acccell.cxx:152
virtual ~SwAccessibleCell() override
Definition: acccell.cxx:232
bool IsSelected()
Definition: acccell.cxx:53
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
Definition: acccell.cxx:437
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: acccell.cxx:314
SwAccessibleCell(std::shared_ptr< SwAccessibleMap > const &pInitMap, const SwCellFrame *pCellFrame)
Definition: acccell.cxx:101
virtual sal_Bool SAL_CALL setCurrentValue(const css::uno::Any &aNumber) override
Definition: acccell.cxx:340
virtual void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
Definition: acccell.cxx:416
virtual void SAL_CALL clearAccessibleSelection() override
Definition: acccell.cxx:428
virtual OUString SAL_CALL getAccessibleDescription() override
Return this object's description.
Definition: acccell.cxx:236
virtual void Dispose(bool bRecursive, bool bCanSkipInvisible=true) override
Definition: acccell.cxx:256
virtual css::uno::Any SAL_CALL getCurrentValue() override
Definition: acccell.cxx:331
virtual OUString SAL_CALL getImplementationName() override
Definition: acccell.cxx:241
virtual void SAL_CALL selectAllAccessibleChildren() override
Definition: acccell.cxx:432
SwAccessibleSelectionHelper m_aSelectionHelper
Definition: acccell.hxx:36
css::uno::Any SAL_CALL getExtendedAttributes() override
Definition: acccell.cxx:371
virtual void GetStates(sal_Int64 &rStateSet) override
Definition: acccell.cxx:76
rtl::Reference< SwAccessibleTable > m_pAccTable
Definition: acccell.hxx:44
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
Definition: acccell.cxx:422
bool InvalidateMyCursorPos()
Definition: acccell.cxx:123
virtual void SAL_CALL deselectAccessibleChild(sal_Int64 nSelectedChildIndex) override
Definition: acccell.cxx:448
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: acccell.cxx:307
virtual void InvalidateCursorPos_() override
Definition: acccell.cxx:191
virtual css::uno::Any SAL_CALL getMaximumValue() override
Definition: acccell.cxx:356
virtual bool HasCursor() override
Definition: acccell.cxx:226
bool m_bIsSelected
Definition: acccell.hxx:37
virtual void SAL_CALL acquire() noexcept override
Definition: acccell.hxx:94
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Return whether the specified service is supported by this class.
Definition: acccell.cxx:246
SwCellFrame is one table cell in the document layout.
Definition: cellfrm.hxx:31
Style of a layout element.
Definition: frmfmt.hxx:72
Base class of the Writer layout elements.
Definition: frame.hxx:315
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
unsigned char sal_Bool