android: Update app-specific/MIME type icons
[LibreOffice.git] / sw / source / core / access / acccell.hxx
blob5d607d4c4531b4bf702109af5475fb3b027b0a06
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include "acccontext.hxx"
23 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
24 #include "accselectionhelper.hxx"
26 class SwCellFrame;
27 class SwAccessibleTable;
28 class SwFrameFormat;
30 class SwAccessibleCell : public SwAccessibleContext,
31 public css::accessibility::XAccessibleValue,
32 public css::accessibility::XAccessibleSelection,
33 public css::accessibility::XAccessibleExtendedAttributes
35 // Implementation for XAccessibleSelection interface
36 SwAccessibleSelectionHelper m_aSelectionHelper;
37 bool m_bIsSelected; // protected by base class mutex
39 bool IsSelected();
41 bool InvalidateMyCursorPos();
42 bool InvalidateChildrenCursorPos( const SwFrame *pFrame );
44 rtl::Reference<SwAccessibleTable> m_pAccTable;
46 protected:
47 // Set states for getAccessibleStateSet.
48 // This derived class additionally sets SELECTABLE(1) and SELECTED(+)
49 virtual void GetStates( sal_Int64& rStateSet ) override;
51 virtual void InvalidateCursorPos_() override;
53 virtual ~SwAccessibleCell() override;
55 public:
56 SwAccessibleCell(std::shared_ptr<SwAccessibleMap> const& pInitMap,
57 const SwCellFrame *pCellFrame);
59 virtual bool HasCursor() override; // required by map to remember that object
61 // XAccessibleContext
63 /// Return this object's description.
64 virtual OUString SAL_CALL
65 getAccessibleDescription() override;
67 // XServiceInfo
69 // Returns an identifier for the implementation of this object.
70 virtual OUString SAL_CALL
71 getImplementationName() override;
73 // Return whether the specified service is supported by this class.
74 virtual sal_Bool SAL_CALL
75 supportsService (const OUString& sServiceName) override;
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;
82 virtual void Dispose(bool bRecursive, bool bCanSkipInvisible = true) override;
84 virtual void InvalidatePosOrSize( const SwRect& rFrame ) override;
86 // XInterface
88 // (XInterface methods need to be implemented to disambiguate
89 // between those inherited through SwAccessibleContext and
90 // XAccessibleValue).
92 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
94 virtual void SAL_CALL acquire( ) noexcept override
95 { SwAccessibleContext::acquire(); };
97 virtual void SAL_CALL release( ) noexcept override
98 { SwAccessibleContext::release(); };
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;
104 // XAccessibleExtendedAttributes
105 css::uno::Any SAL_CALL getExtendedAttributes() override ;
106 private:
107 SwFrameFormat* GetTableBoxFormat() const;
109 public:
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;
117 // XAccessibleComponent
118 sal_Int32 SAL_CALL getBackground() override;
120 // XAccessibleSelection
121 virtual void SAL_CALL selectAccessibleChild( sal_Int64 nChildIndex ) override;
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;
130 virtual void SAL_CALL deselectAccessibleChild( sal_Int64 nSelectedChildIndex ) override;
133 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */