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>
30 class SwAccessibleNoTextHyperlink
;
32 using SwAccessibleNoTextFrame_BASE
= cppu::ImplInheritanceHelper
<SwAccessibleFrameBase
,
33 css::accessibility::XAccessibleImage
,
34 css::accessibility::XAccessibleHypertext
>;
35 class SwAccessibleNoTextFrame
: public SwAccessibleNoTextFrame_BASE
37 friend class SwAccessibleNoTextHyperlink
;
38 rtl::Reference
< SwAccessibleNoTextHyperlink
> m_xHyperlink
;
43 virtual ~SwAccessibleNoTextFrame() override
;
45 const SwNoTextNode
*GetNoTextNode() const;
47 virtual void Notify(const SfxHint
&) override
;
50 SwAccessibleNoTextFrame( std::shared_ptr
<SwAccessibleMap
> const& pInitMap
,
52 const SwFlyFrame
*pFlyFrame
);
56 // #i73249# - Return the object's current name.
57 virtual OUString SAL_CALL
58 getAccessibleName() override
;
60 /// Return this object's description.
61 virtual OUString SAL_CALL
62 getAccessibleDescription() override
;
65 virtual OUString SAL_CALL
66 getAccessibleImageDescription( ) override
;
68 virtual sal_Int32 SAL_CALL
69 getAccessibleImageHeight( ) override
;
71 virtual sal_Int32 SAL_CALL
72 getAccessibleImageWidth( ) override
;
74 // The object is not visible any longer and should be destroyed
75 virtual void Dispose(bool bRecursive
, bool bCanSkipInvisible
= true) override
;
77 virtual sal_Int32 SAL_CALL
getCaretPosition( ) override
;
78 virtual sal_Bool SAL_CALL
setCaretPosition( sal_Int32 nIndex
) override
;
79 virtual sal_Unicode SAL_CALL
getCharacter( sal_Int32 nIndex
) override
;//Shen Zhen Jie changed sal_Unicode to sal_uInt32
80 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getCharacterAttributes( sal_Int32 nIndex
, const css::uno::Sequence
< OUString
>& aRequestedAttributes
) override
;
81 virtual css::awt::Rectangle SAL_CALL
getCharacterBounds( sal_Int32 nIndex
) override
;
82 virtual sal_Int32 SAL_CALL
getCharacterCount( ) override
;
83 virtual sal_Int32 SAL_CALL
getIndexAtPoint( const css::awt::Point
& aPoint
) override
;
84 virtual OUString SAL_CALL
getSelectedText( ) override
;
85 virtual sal_Int32 SAL_CALL
getSelectionStart( ) override
;
86 virtual sal_Int32 SAL_CALL
getSelectionEnd( ) override
;
87 virtual sal_Bool SAL_CALL
setSelection( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
88 virtual OUString SAL_CALL
getText( ) override
;
89 virtual OUString SAL_CALL
getTextRange( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
90 virtual css::accessibility::TextSegment SAL_CALL
getTextAtIndex( sal_Int32 nIndex
, sal_Int16 aTextType
) override
;
91 virtual css::accessibility::TextSegment SAL_CALL
getTextBeforeIndex( sal_Int32 nIndex
, sal_Int16 aTextType
) override
;
92 virtual css::accessibility::TextSegment SAL_CALL
getTextBehindIndex( sal_Int32 nIndex
, sal_Int16 aTextType
) override
;
93 virtual sal_Bool SAL_CALL
copyText( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
94 virtual sal_Bool SAL_CALL
scrollSubstringTo( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
, css::accessibility::AccessibleScrollType aScrollType
) override
;
96 // XAccessibleHypertext
97 virtual sal_Int32 SAL_CALL
getHyperLinkCount() override
;
98 virtual css::uno::Reference
< css::accessibility::XAccessibleHyperlink
>
99 SAL_CALL
getHyperLink( sal_Int32 nLinkIndex
) override
;
100 virtual sal_Int32 SAL_CALL
getHyperLinkIndex( sal_Int32 nCharIndex
) override
;
102 SwAccessibleMap
*GetAccessibleMap(){ return GetMap();}
105 virtual css::uno::Reference
< css::accessibility::XAccessibleRelationSet
> SAL_CALL
106 getAccessibleRelationSet() override
;
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */