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