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 .
20 #ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_ACCNOTEXTFRAME_HXX
21 #define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCNOTEXTFRAME_HXX
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>
31 class SwAccessibleNoTextFrame
: public SwAccessibleFrameBase
,
32 public css::accessibility::XAccessibleImage
,
33 public css::accessibility::XAccessibleHypertext
//Added by yangzhh for HyperLink
35 friend class SwAccessibleNoTextHyperlink
;
36 css::uno::Reference
< css::accessibility::XAccessibleHyperlink
> m_xHyperlink
;
41 virtual ~SwAccessibleNoTextFrame() override
;
43 const SwNoTextNode
*GetNoTextNode() const;
45 virtual void Notify(const SfxHint
&) override
;
48 SwAccessibleNoTextFrame( std::shared_ptr
<SwAccessibleMap
> const& pInitMap
,
50 const SwFlyFrame
*pFlyFrame
);
54 // #i73249# - Return the object's current name.
55 virtual OUString SAL_CALL
56 getAccessibleName() override
;
58 /// Return this object's description.
59 virtual OUString SAL_CALL
60 getAccessibleDescription() override
;
62 // XInterface methods need to be implemented to disambiguate
63 // between those inherited through SwAccessibleContext and
66 virtual css::uno::Any SAL_CALL
queryInterface(
67 const css::uno::Type
& aType
) override
;
69 virtual void SAL_CALL
acquire( ) noexcept override
70 { SwAccessibleContext::acquire(); };
72 virtual void SAL_CALL
release( ) noexcept override
73 { SwAccessibleContext::release(); };
76 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
79 virtual OUString SAL_CALL
80 getAccessibleImageDescription( ) override
;
82 virtual sal_Int32 SAL_CALL
83 getAccessibleImageHeight( ) override
;
85 virtual sal_Int32 SAL_CALL
86 getAccessibleImageWidth( ) override
;
88 // The object is not visible any longer and should be destroyed
89 virtual void Dispose(bool bRecursive
, bool bCanSkipInvisible
= true) override
;
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
;
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
;
116 SwAccessibleMap
*GetAccessibleMap(){ return GetMap();}
119 virtual css::uno::Reference
< css::accessibility::XAccessibleRelationSet
> SAL_CALL
120 getAccessibleRelationSet() override
;
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */