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;
37  OUString msTitle;
38  OUString msDesc;
39 
40 protected:
41  virtual ~SwAccessibleNoTextFrame() override;
42 
43  const SwNoTextNode *GetNoTextNode() const;
44 
45  virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
46 
47 public:
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( ) throw () override
70  { SwAccessibleContext::acquire(); };
71 
72  virtual void SAL_CALL release( ) throw () 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 
109  // XAccessibleHypertext
110  virtual sal_Int32 SAL_CALL getHyperLinkCount() override;
111  virtual css::uno::Reference< css::accessibility::XAccessibleHyperlink >
112  SAL_CALL getHyperLink( sal_Int32 nLinkIndex ) override;
113  virtual sal_Int32 SAL_CALL getHyperLinkIndex( sal_Int32 nCharIndex ) override;
114 
116 
117 public:
118  virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> SAL_CALL
119  getAccessibleRelationSet() override;
120 };
121 
122 #endif
123 
124 /* 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 css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual void Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew) 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
sw::WriterMultiListener m_aListener
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