LibreOffice Module sw (master) 1
accnotextframe.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_ACCNOTEXTFRAME_HXX
21#define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCNOTEXTFRAME_HXX
22
23#include "accframebase.hxx"
24#include <com/sun/star/accessibility/AccessibleScrollType.hpp>
25#include <com/sun/star/accessibility/XAccessibleImage.hpp>
26#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
27
28class SwFlyFrame;
29class SwNoTextNode;
30
32 public css::accessibility::XAccessibleImage,
33 public css::accessibility::XAccessibleHypertext//Added by yangzhh for HyperLink
34{
36 css::uno::Reference< css::accessibility::XAccessibleHyperlink > m_xHyperlink;
37 OUString msTitle;
38 OUString msDesc;
39
40protected:
41 virtual ~SwAccessibleNoTextFrame() override;
42
43 const SwNoTextNode *GetNoTextNode() const;
44
45 virtual void Notify(const SfxHint&) override;
46
47public:
48 SwAccessibleNoTextFrame( std::shared_ptr<SwAccessibleMap> const& pInitMap,
49 sal_Int16 nInitRole,
50 const SwFlyFrame *pFlyFrame );
51
52 // XAccessibleContext
53
54 // #i73249# - Return the object's current name.
55 virtual OUString SAL_CALL
56 getAccessibleName() override;
57
59 virtual OUString SAL_CALL
60 getAccessibleDescription() override;
61
62 // XInterface methods need to be implemented to disambiguate
63 // between those inherited through SwAccessibleContext and
64 // XAccessibleImage.
65
66 virtual css::uno::Any SAL_CALL queryInterface(
67 const css::uno::Type& aType ) override;
68
69 virtual void SAL_CALL acquire( ) noexcept override
70 { SwAccessibleContext::acquire(); };
71
72 virtual void SAL_CALL release( ) noexcept override
73 { SwAccessibleContext::release(); };
74
75 // XTypeProvider
76 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
77
78 // XAccessibleImage
79 virtual OUString SAL_CALL
81
82 virtual sal_Int32 SAL_CALL
83 getAccessibleImageHeight( ) override;
84
85 virtual sal_Int32 SAL_CALL
86 getAccessibleImageWidth( ) override;
87
88 // The object is not visible any longer and should be destroyed
89 virtual void Dispose(bool bRecursive, bool bCanSkipInvisible = true) override;
90
91 virtual sal_Int32 SAL_CALL getCaretPosition( ) override;
92 virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) override;
93 virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) override;//Shen Zhen Jie changed sal_Unicode to sal_uInt32
94 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) override;
95 virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) override;
96 virtual sal_Int32 SAL_CALL getCharacterCount( ) override;
97 virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) override;
98 virtual OUString SAL_CALL getSelectedText( ) override;
99 virtual sal_Int32 SAL_CALL getSelectionStart( ) override;
100 virtual sal_Int32 SAL_CALL getSelectionEnd( ) override;
101 virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
102 virtual OUString SAL_CALL getText( ) override;
103 virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
104 virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
105 virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
106 virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
107 virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
108 virtual sal_Bool SAL_CALL scrollSubstringTo( sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override;
109
110 // XAccessibleHypertext
111 virtual sal_Int32 SAL_CALL getHyperLinkCount() override;
112 virtual css::uno::Reference< css::accessibility::XAccessibleHyperlink >
113 SAL_CALL getHyperLink( sal_Int32 nLinkIndex ) override;
114 virtual sal_Int32 SAL_CALL getHyperLinkIndex( sal_Int32 nCharIndex ) override;
115
117
118public:
119 virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> SAL_CALL
120 getAccessibleRelationSet() override;
121};
122
123#endif
124
125/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwAccessibleMap * GetMap()
Definition: acccontext.hxx:112
css::uno::Reference< css::accessibility::XAccessibleHyperlink > m_xHyperlink
virtual void Dispose(bool bRecursive, bool bCanSkipInvisible=true) override
SwAccessibleMap * GetAccessibleMap()
virtual sal_Int32 SAL_CALL getAccessibleImageHeight() override
virtual sal_Int32 SAL_CALL getHyperLinkCount() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual sal_Bool SAL_CALL copyText(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual sal_Bool SAL_CALL setSelection(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void Notify(const SfxHint &) override
virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual OUString SAL_CALL getAccessibleDescription() override
Return this object's description.
virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual sal_Int32 SAL_CALL getIndexAtPoint(const css::awt::Point &aPoint) override
virtual OUString SAL_CALL getText() override
virtual sal_Int32 SAL_CALL getAccessibleImageWidth() override
virtual OUString SAL_CALL getAccessibleName() override
virtual ~SwAccessibleNoTextFrame() override
virtual OUString SAL_CALL getTextRange(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual sal_Int32 SAL_CALL getCharacterCount() override
virtual OUString SAL_CALL getAccessibleImageDescription() override
XAccessibleImage.
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes(sal_Int32 nIndex, const css::uno::Sequence< OUString > &aRequestedAttributes) override
virtual OUString SAL_CALL getSelectedText() override
virtual sal_Int32 SAL_CALL getHyperLinkIndex(sal_Int32 nCharIndex) override
virtual void SAL_CALL release() noexcept override
virtual sal_Int32 SAL_CALL getCaretPosition() override
const SwNoTextNode * GetNoTextNode() const
virtual css::awt::Rectangle SAL_CALL getCharacterBounds(sal_Int32 nIndex) override
virtual sal_Int32 SAL_CALL getSelectionStart() override
virtual sal_Bool SAL_CALL setCaretPosition(sal_Int32 nIndex) override
SwAccessibleNoTextFrame(std::shared_ptr< SwAccessibleMap > const &pInitMap, sal_Int16 nInitRole, const SwFlyFrame *pFlyFrame)
virtual sal_Unicode SAL_CALL getCharacter(sal_Int32 nIndex) override
virtual sal_Bool SAL_CALL scrollSubstringTo(sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override
virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Reference< css::accessibility::XAccessibleHyperlink > SAL_CALL getHyperLink(sal_Int32 nLinkIndex) override
virtual sal_Int32 SAL_CALL getSelectionEnd() override
general base class for all free-flowing frames
Definition: flyfrm.hxx:79
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
Definition: ndnotxt.hxx:30
unsigned char sal_Bool
sal_uInt16 sal_Unicode