20#ifndef INCLUDED_EDITENG_ACCESSIBLEEDITABLETEXTPARA_HXX
21#define INCLUDED_EDITENG_ACCESSIBLEEDITABLETEXTPARA_HXX
23#include <config_options.h>
25#include <rtl/ustring.hxx>
29#include <com/sun/star/uno/Reference.hxx>
30#include <com/sun/star/lang/XServiceInfo.hpp>
31#include <com/sun/star/accessibility/AccessibleScrollType.hpp>
32#include <com/sun/star/accessibility/XAccessible.hpp>
33#include <com/sun/star/accessibility/XAccessibleContext.hpp>
34#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
35#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
36#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
37#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
38#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
39#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
55 css::accessibility::XAccessibleContext,
56 css::accessibility::XAccessibleComponent,
57 css::accessibility::XAccessibleEditableText,
58 css::accessibility::XAccessibleEventBroadcaster,
59 css::accessibility::XAccessibleTextAttributes,
60 css::accessibility::XAccessibleHypertext,
61 css::accessibility::XAccessibleMultiLineText,
70 virtual OUString implGetText()
override;
71 virtual css::lang::Locale implGetLocale()
override;
72 virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex )
override;
73 virtual void implGetParagraphBoundary(
const OUString& rtext, css::i18n::Boundary& rBoundary, sal_Int32
nIndex )
override;
74 virtual void implGetLineBoundary(
const OUString& rtext, css::i18n::Boundary& rBoundary, sal_Int32
nIndex )
override;
82 AccessibleEditableTextPara ( css::uno::Reference< css::accessibility::XAccessible > xParent,
83 const AccessibleParaManager* _pParaManager =
nullptr );
85 virtual ~AccessibleEditableTextPara ()
override;
88 virtual css::uno::Any SAL_CALL
queryInterface (
const css::uno::Type & rType)
override;
91 virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( )
override;
94 virtual sal_Int64 SAL_CALL getAccessibleChildCount()
override;
95 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int64
i )
override;
96 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent()
override;
97 virtual sal_Int64 SAL_CALL getAccessibleIndexInParent()
override;
98 virtual sal_Int16 SAL_CALL getAccessibleRole()
override;
100 enum { MaxDescriptionLen = 40 };
101 virtual OUString SAL_CALL getAccessibleDescription()
override;
102 virtual OUString SAL_CALL getAccessibleName()
override;
103 virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet()
override;
104 virtual sal_Int64 SAL_CALL getAccessibleStateSet()
override;
105 virtual css::lang::Locale SAL_CALL
getLocale()
override;
108 virtual void SAL_CALL addAccessibleEventListener(
const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener )
override;
109 virtual void SAL_CALL removeAccessibleEventListener(
const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener )
override;
112 virtual sal_Bool SAL_CALL containsPoint(
const css::awt::Point& aPoint )
override;
113 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(
const css::awt::Point& aPoint )
override;
114 virtual css::awt::Rectangle SAL_CALL getBounds( )
override;
115 virtual css::awt::Point SAL_CALL getLocation( )
override;
116 virtual css::awt::Point SAL_CALL getLocationOnScreen( )
override;
117 virtual css::awt::Size SAL_CALL getSize( )
override;
118 virtual void SAL_CALL grabFocus( )
override;
119 virtual sal_Int32 SAL_CALL getForeground( )
override;
120 virtual sal_Int32 SAL_CALL getBackground( )
override;
123 virtual sal_Int32 SAL_CALL getCaretPosition()
override;
124 virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32
nIndex )
override;
126 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32
nIndex,
const css::uno::Sequence< OUString >& aRequestedAttributes )
override;
127 virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32
nIndex )
override;
128 virtual sal_Int32 SAL_CALL getCharacterCount()
override;
129 virtual sal_Int32 SAL_CALL getIndexAtPoint(
const css::awt::Point& aPoint )
override;
130 virtual OUString SAL_CALL getSelectedText()
override;
131 virtual sal_Int32 SAL_CALL getSelectionStart()
override;
132 virtual sal_Int32 SAL_CALL getSelectionEnd()
override;
133 virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
override;
134 virtual OUString SAL_CALL getText()
override;
135 virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
override;
137 virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32
nIndex, sal_Int16 aTextType )
override;
139 virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32
nIndex, sal_Int16 aTextType )
override;
141 virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32
nIndex, sal_Int16 aTextType )
override;
142 virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
override;
143 virtual sal_Bool SAL_CALL scrollSubstringTo( sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType)
override;
146 virtual sal_Bool SAL_CALL cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
override;
148 virtual sal_Bool SAL_CALL deleteText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
override;
149 virtual sal_Bool SAL_CALL insertText(
const OUString& sText, sal_Int32
nIndex )
override;
150 virtual sal_Bool SAL_CALL replaceText( sal_Int32 nStartIndex, sal_Int32 nEndIndex,
const OUString& sReplacement )
override;
151 virtual sal_Bool SAL_CALL setAttributes( sal_Int32 nStartIndex, sal_Int32 nEndIndex,
const css::uno::Sequence< css::beans::PropertyValue >& aAttributeSet )
override;
152 virtual sal_Bool SAL_CALL setText(
const OUString& sText )
override;
155 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getDefaultAttributes(
const css::uno::Sequence< OUString >& RequestedAttributes )
override;
156 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getRunAttributes( ::sal_Int32
Index,
const css::uno::Sequence< OUString >& RequestedAttributes )
override;
159 virtual ::sal_Int32 SAL_CALL getHyperLinkCount( )
override;
160 virtual css::uno::Reference< css::accessibility::XAccessibleHyperlink > SAL_CALL getHyperLink( ::sal_Int32 nLinkIndex )
override;
161 virtual ::sal_Int32 SAL_CALL getHyperLinkIndex( ::sal_Int32 nCharIndex )
override;
164 virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32
nIndex )
override;
165 virtual css::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo )
override;
166 virtual css::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret( )
override;
167 virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret( )
override;
181 void SetIndexInParent( sal_Int32
nIndex );
190 sal_Int32 GetIndexInParent()
const {
return mnIndexInParent; }
199 void SetParagraphIndex( sal_Int32
nIndex );
217 void SetEEOffset(
const Point& rOffset );
226 void SetEditSource( SvxEditSourceAdapter* pEditSource );
235 void FireEvent(
const sal_Int16 nEventId,
const css::uno::Any& rNewValue = css::uno::Any(),
const css::uno::Any& rOldValue = css::uno::Any() )
const;
238 void SetState(
const sal_Int64 nStateId );
240 void UnSetState(
const sal_Int64 nStateId );
244 SvxEditSourceAdapter& GetEditSource()
const;
271 bool HaveEditView()
const;
291 AccessibleEditableTextPara(
const AccessibleEditableTextPara& ) =
delete;
292 AccessibleEditableTextPara& operator= (
const AccessibleEditableTextPara& ) =
delete;
307 bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32
nIndex );
309 int getNotifierClientId()
const {
return mnNotifierClientId; }
314 const Point& GetEEOffset()
const {
return maEEOffset; }
317 OUString GetTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex );
318 sal_Int32 GetTextLen()
const;
324 bool GetSelection(sal_Int32& nStartPos, sal_Int32& nEndPos );
336 void CheckIndex( sal_Int32
nIndex );
338 void CheckPosition( sal_Int32
nIndex );
340 void CheckRange( sal_Int32 nStart, sal_Int32 nEnd );
342 void _correctValues( css::uno::Sequence< css::beans::PropertyValue >& rValues );
343 sal_Int32 SkipField(sal_Int32
nIndex,
bool bForward);
345 void ExtendByField( css::accessibility::TextSegment& Segment );
346 OUString GetFieldTypeNameAtIndex(sal_Int32
nIndex);
351 sal_Int32 mnIndexInParent;
354 SvxEditSourceAdapter* mpEditSource;
358 WeakBullet maImageBullet;
361 OUString maLastTextString;
367 sal_Int64 mnStateSet;
370 css::uno::Reference< css::accessibility::XAccessible >
mxParent;
373 int mnNotifierClientId;
380 const AccessibleParaManager* mpParaManager;
constexpr OUStringLiteral sServiceName
unotools::WeakReference< AnimationNode > mxParent
Encapsulates the document view for the purpose of unified EditEngine/Outliner access.
Helper class for weak object references plus implementation.
static ESelection MakeSelection(sal_Int32 nStartPara, sal_Int32 nStartIndex, sal_Int32 nEndPara, sal_Int32 nEndIndex)
::comphelper::WeakComponentImplHelper< css::accessibility::XAccessible, css::accessibility::XAccessibleContext, css::accessibility::XAccessibleComponent, css::accessibility::XAccessibleEditableText, css::accessibility::XAccessibleEventBroadcaster, css::accessibility::XAccessibleTextAttributes, css::accessibility::XAccessibleHypertext, css::accessibility::XAccessibleMultiLineText, css::lang::XServiceInfo > AccessibleTextParaInterfaceBase
void Dispose(const T &xInterface)
const LanguageTag & getLocale()
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
sal_Int16 mnParagraphIndex
void GetSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept