1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include "accframebase.hxx"
24 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
28 class SwAccessibleTextFrame
: public SwAccessibleFrameBase
,
29 public css::accessibility::XAccessibleSelection
37 virtual ~SwAccessibleTextFrame() override
;
38 virtual void Notify(const SfxHint
&) override
;
41 SwAccessibleTextFrame(std::shared_ptr
<SwAccessibleMap
> const& pInitMap
,
42 const SwFlyFrame
& rFlyFrame
);
44 virtual css::uno::Any SAL_CALL
queryInterface(
45 css::uno::Type
const & rType
) override
;
46 virtual void SAL_CALL
acquire() noexcept override
;
47 virtual void SAL_CALL
release() noexcept override
;
48 // XAccessibleSelection
49 virtual void SAL_CALL
selectAccessibleChild(
50 sal_Int64 nChildIndex
) override
;
52 virtual sal_Bool SAL_CALL
isAccessibleChildSelected(
53 sal_Int64 nChildIndex
) override
;
55 virtual void SAL_CALL
clearAccessibleSelection( ) override
;
57 virtual void SAL_CALL
selectAllAccessibleChildren( ) override
;
59 virtual sal_Int64 SAL_CALL
getSelectedAccessibleChildCount( ) override
;
61 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getSelectedAccessibleChild(
62 sal_Int64 nSelectedChildIndex
) override
;
64 virtual void SAL_CALL
deselectAccessibleChild(
65 sal_Int64 nSelectedChildIndex
) override
;
69 // #i73249# - Return the object's current name.
70 virtual OUString SAL_CALL
71 getAccessibleName() override
;
72 /// Return this object's description.
73 virtual OUString SAL_CALL
74 getAccessibleDescription() override
;
78 /** Returns an identifier for the implementation of this object.
80 virtual OUString SAL_CALL
81 getImplementationName() override
;
83 /** Return whether the specified service is supported by this class.
85 virtual sal_Bool SAL_CALL
86 supportsService (const OUString
& sServiceName
) override
;
88 /** Returns a list of all supported services. In this case that is just
89 the AccessibleContext service.
91 virtual css::uno::Sequence
< OUString
> SAL_CALL
92 getSupportedServiceNames() override
;
95 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) override
;
97 // XAccessibleContext::getAccessibleRelationSet
99 // text frame may have accessible relations to their
100 // predecessor/successor frames
103 // helper methods for getAccessibleRelationSet:
104 SwFlyFrame
* getFlyFrame() const;
106 css::accessibility::AccessibleRelation
makeRelation(
107 sal_Int16 nType
, const SwFlyFrame
* pFrame
);
110 virtual css::uno::Reference
< css::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet() override
;
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */