LibreOffice Module sw (master)  1
acctextframe.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 #ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_ACCTEXTFRAME_HXX
21 #define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCTEXTFRAME_HXX
22 
23 #include "accframebase.hxx"
24 
25 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
26 
27 class SwFlyFrame;
28 
30  public css::accessibility::XAccessibleSelection
31 {
32 private:
33  // #i73249#
34  OUString msTitle;
35  OUString msDesc;
36 
37 protected:
38  virtual ~SwAccessibleTextFrame() override;
39  virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
40 
41 public:
42  SwAccessibleTextFrame(std::shared_ptr<SwAccessibleMap> const& pInitMap,
43  const SwFlyFrame& rFlyFrame);
44 
45  virtual css::uno::Any SAL_CALL queryInterface(
46  css::uno::Type const & rType ) override;
47  virtual void SAL_CALL acquire() throw () override;
48  virtual void SAL_CALL release() throw () override;
49  // XAccessibleSelection
50  virtual void SAL_CALL selectAccessibleChild(
51  sal_Int32 nChildIndex ) override;
52 
53  virtual sal_Bool SAL_CALL isAccessibleChildSelected(
54  sal_Int32 nChildIndex ) override;
55 
56  virtual void SAL_CALL clearAccessibleSelection( ) override;
57 
58  virtual void SAL_CALL selectAllAccessibleChildren( ) override;
59 
60  virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) override;
61 
62  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
63  sal_Int32 nSelectedChildIndex ) override;
64 
65  virtual void SAL_CALL deselectAccessibleChild(
66  sal_Int32 nSelectedChildIndex ) override;
67 
68  // XAccessibleContext
69 
70  // #i73249# - Return the object's current name.
71  virtual OUString SAL_CALL
72  getAccessibleName() override;
74  virtual OUString SAL_CALL
75  getAccessibleDescription() override;
76 
77  // XServiceInfo
78 
81  virtual OUString SAL_CALL
82  getImplementationName() override;
83 
86  virtual sal_Bool SAL_CALL
87  supportsService (const OUString& sServiceName) override;
88 
92  virtual css::uno::Sequence< OUString> SAL_CALL
93  getSupportedServiceNames() override;
94 
95  // XTypeProvider
96  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
97 
98  // XAccessibleContext::getAccessibleRelationSet
99 
100  // text frame may have accessible relations to their
101  // predecessor/successor frames
102 
103 private:
104  // helper methods for getAccessibleRelationSet:
105  SwFlyFrame* getFlyFrame() const;
106 
107  css::accessibility::AccessibleRelation makeRelation(
108  sal_Int16 nType, const SwFlyFrame* pFrame );
109 
110 public:
111  virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> SAL_CALL getAccessibleRelationSet() override;
112 };
113 
114 #endif
115 
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL deselectAccessibleChild(sal_Int32 nSelectedChildIndex) override
virtual void Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew) override
signed char sal_Int8
virtual void SAL_CALL selectAllAccessibleChildren() override
SwAccessibleTextFrame(std::shared_ptr< SwAccessibleMap > const &pInitMap, const SwFlyFrame &rFlyFrame)
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int32 nChildIndex) override
virtual void SAL_CALL clearAccessibleSelection() override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
css::accessibility::AccessibleRelation makeRelation(sal_Int16 nType, const SwFlyFrame *pFrame)
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Return whether the specified service is supported by this class.
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int32 nSelectedChildIndex) override
unsigned char sal_Bool
virtual void SAL_CALL selectAccessibleChild(sal_Int32 nChildIndex) override
virtual OUString SAL_CALL getAccessibleName() override
virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount() override
general base class for all free-flowing frames
Definition: flyfrm.hxx:60
virtual void SAL_CALL release() override
virtual ~SwAccessibleTextFrame() override
SwFlyFrame * getFlyFrame() const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual void SAL_CALL acquire() override
virtual OUString SAL_CALL getImplementationName() override
Returns an identifier for the implementation of this object.
virtual OUString SAL_CALL getAccessibleDescription() override
Return this object's description.
const sal_Char sServiceName[]
Definition: accdoc.cxx:61