xref: /AOO41X/main/editeng/inc/editeng/AccessibleEditableTextPara.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SVX_ACCESSIBLE_EDITABLE_TEXT_PARA_HXX
29 #define _SVX_ACCESSIBLE_EDITABLE_TEXT_PARA_HXX
30 
31 #include <tools/gen.hxx>
32 #include <tools/string.hxx>
33 #include <cppuhelper/weakref.hxx>
34 #include <cppuhelper/compbase9.hxx>
35 #include <cppuhelper/typeprovider.hxx>
36 #include <cppuhelper/interfacecontainer.hxx>
37 
38 #include <com/sun/star/uno/Reference.hxx>
39 #include <com/sun/star/lang/XServiceInfo.hpp>
40 #include <com/sun/star/accessibility/XAccessible.hpp>
41 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
42 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
43 #include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
44 #include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
45 #include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
46 #include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
47 
48 #include <comphelper/accessibletexthelper.hxx>
49 #include <comphelper/broadcasthelper.hxx>
50 #include "editeng/AccessibleParaManager.hxx"
51 #include "editeng/AccessibleImageBullet.hxx"
52 #include "editeng/unoedprx.hxx"
53 #include "editeng/editengdllapi.h"
54 
55 namespace accessibility
56 {
57     typedef ::cppu::WeakComponentImplHelper9< ::com::sun::star::accessibility::XAccessible,
58                                      ::com::sun::star::accessibility::XAccessibleContext,
59                                      ::com::sun::star::accessibility::XAccessibleComponent,
60                                      ::com::sun::star::accessibility::XAccessibleEditableText,
61                                      ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
62                                      ::com::sun::star::accessibility::XAccessibleTextAttributes,
63                                      ::com::sun::star::accessibility::XAccessibleHypertext,
64                                      ::com::sun::star::accessibility::XAccessibleMultiLineText,
65                                      ::com::sun::star::lang::XServiceInfo >  AccessibleTextParaInterfaceBase;
66 
67     /** This class implements the actual text paragraphs for the EditEngine/Outliner UAA
68      */
69     class EDITENG_DLLPUBLIC AccessibleEditableTextPara : public ::comphelper::OBaseMutex, public AccessibleTextParaInterfaceBase, public ::comphelper::OCommonAccessibleText
70     {
71 
72 	protected:
73         // override OCommonAccessibleText methods
74 		virtual ::rtl::OUString					implGetText();
75 		virtual ::com::sun::star::lang::Locale	implGetLocale();
76 		virtual void							implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex );
77 		virtual void							implGetParagraphBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex );
78 		virtual void							implGetLineBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex );
79 
80     public:
81         /// Create accessible object for given parent
82         // --> OD 2006-01-11 #i27138#
83         // - add parameter <_pParaManager> (default value NULL)
84         //   This has to be the the instance of <AccessibleParaManager>, which
85         //   created and manages this accessible paragraph.
86         AccessibleEditableTextPara ( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rParent,
87                                      const AccessibleParaManager* _pParaManager = NULL );
88         // <--
89 
90         virtual ~AccessibleEditableTextPara	();
91 
92         // XInterface
93         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface (const ::com::sun::star::uno::Type & rType) throw (::com::sun::star::uno::RuntimeException);
94 
95         // XComponent
96 
97         using WeakComponentImplHelperBase::addEventListener;
98         using WeakComponentImplHelperBase::removeEventListener;
99 
100         // XAccessible
101         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException);
102 
103         // XAccessibleContext
104         virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
105         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
106         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent() throw (::com::sun::star::uno::RuntimeException);
107         virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException);
108         virtual sal_Int16 SAL_CALL getAccessibleRole() throw (::com::sun::star::uno::RuntimeException);
109         /// Maximal length of text returned by getAccessibleDescription()
110         enum { MaxDescriptionLen = 40 };
111         virtual ::rtl::OUString SAL_CALL getAccessibleDescription() throw (::com::sun::star::uno::RuntimeException);
112         virtual ::rtl::OUString SAL_CALL getAccessibleName() throw (::com::sun::star::uno::RuntimeException);
113         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() throw (::com::sun::star::uno::RuntimeException);
114         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
115         virtual ::com::sun::star::lang::Locale SAL_CALL getLocale() throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
116 
117         // XAccessibleEventBroadcaster
118         virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
119         virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
120 
121         // XAccessibleComponent
122         virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
123         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
124         virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds(  ) throw (::com::sun::star::uno::RuntimeException);
125         virtual ::com::sun::star::awt::Point SAL_CALL getLocation(  ) throw (::com::sun::star::uno::RuntimeException);
126         virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen(  ) throw (::com::sun::star::uno::RuntimeException);
127         virtual ::com::sun::star::awt::Size SAL_CALL getSize(  ) throw (::com::sun::star::uno::RuntimeException);
128         virtual void SAL_CALL grabFocus(  ) throw (::com::sun::star::uno::RuntimeException);
129         virtual sal_Int32 SAL_CALL getForeground(  ) throw (::com::sun::star::uno::RuntimeException);
130         virtual sal_Int32 SAL_CALL getBackground(  ) throw (::com::sun::star::uno::RuntimeException);
131 
132         // XAccessibleText (this comes implicitely inherited by XAccessibleEditableText AND by XAccessibleMultiLineText)
133         virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
134         virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
135         virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
136         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
137         virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
138         virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
139         virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
140         virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
141         virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
142         virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
143         virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
144         virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
145         virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
146         /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
147         virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
148         /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
149         virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
150         /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
151         virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
152         virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
153 
154         // XAccessibleEditableText
155         virtual sal_Bool SAL_CALL cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
156         virtual sal_Bool SAL_CALL pasteText( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
157         virtual sal_Bool SAL_CALL deleteText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
158         virtual sal_Bool SAL_CALL insertText( const ::rtl::OUString& sText, sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
159         virtual sal_Bool SAL_CALL replaceText( sal_Int32 nStartIndex, sal_Int32 nEndIndex, const ::rtl::OUString& sReplacement ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
160         virtual sal_Bool SAL_CALL setAttributes( sal_Int32 nStartIndex, sal_Int32 nEndIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aAttributeSet ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
161         virtual sal_Bool SAL_CALL setText( const ::rtl::OUString& sText ) throw (::com::sun::star::uno::RuntimeException);
162 
163         // XAccessibleTextAttributes
164         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
165         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( ::sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
166 
167         // XAccessibleHypertext
168         virtual ::sal_Int32 SAL_CALL getHyperLinkCount(  ) throw (::com::sun::star::uno::RuntimeException);
169         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleHyperlink > SAL_CALL getHyperLink( ::sal_Int32 nLinkIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
170         virtual ::sal_Int32 SAL_CALL getHyperLinkIndex( ::sal_Int32 nCharIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
171 
172         // XAccessibleMultiLineText
173         virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
174         virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
175         virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret(  ) throw (::com::sun::star::uno::RuntimeException);
176         virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret(  ) throw (::com::sun::star::uno::RuntimeException);
177 
178         // XServiceInfo
179         virtual ::rtl::OUString SAL_CALL getImplementationName (void) throw (::com::sun::star::uno::RuntimeException);
180         virtual sal_Bool SAL_CALL supportsService (const ::rtl::OUString& sServiceName) throw (::com::sun::star::uno::RuntimeException);
181         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames (void) throw (::com::sun::star::uno::RuntimeException);
182 
183         // XServiceName
184         virtual ::rtl::OUString SAL_CALL getServiceName (void) throw (::com::sun::star::uno::RuntimeException);
185 
186         /** Set the current index in the accessibility parent
187 
188             @attention This method does not lock the SolarMutex,
189             leaving that to the calling code. This is because only
190             there potential deadlock situations can be resolved. Thus,
191             make sure SolarMutex is locked when calling this.
192          */
193         void SetIndexInParent( sal_Int32 nIndex );
194 
195         /** Get the current index in the accessibility parent
196 
197             @attention This method does not lock the SolarMutex,
198             leaving that to the calling code. This is because only
199             there potential deadlock situations can be resolved. Thus,
200             make sure SolarMutex is locked when calling this.
201          */
202         sal_Int32 GetIndexInParent() const;
203 
204         /** Set the current paragraph number
205 
206             @attention This method does not lock the SolarMutex,
207             leaving that to the calling code. This is because only
208             there potential deadlock situations can be resolved. Thus,
209             make sure SolarMutex is locked when calling this.
210          */
211         void SetParagraphIndex( sal_Int32 nIndex );
212 
213         /** Query the current paragraph number (0 - nParas-1)
214 
215             @attention This method does not lock the SolarMutex,
216             leaving that to the calling code. This is because only
217             there potential deadlock situations can be resolved. Thus,
218             make sure SolarMutex is locked when calling this.
219          */
220         sal_Int32 GetParagraphIndex() const SAL_THROW((::com::sun::star::uno::RuntimeException));
221 
222         /** Set the edit engine offset
223 
224             @attention This method does not lock the SolarMutex,
225             leaving that to the calling code. This is because only
226             there potential deadlock situations can be resolved. Thus,
227             make sure SolarMutex is locked when calling this.
228          */
229         void SetEEOffset( const Point& rOffset );
230 
231         /** Set the EditEngine offset
232 
233             @attention This method does not lock the SolarMutex,
234             leaving that to the calling code. This is because only
235             there potential deadlock situations can be resolved. Thus,
236             make sure SolarMutex is locked when calling this.
237          */
238         void SetEditSource( SvxEditSourceAdapter* pEditSource );
239 
240         /** Dispose this object
241 
242         	Notifies and deregisters the listeners, drops all references.
243          */
244         void Dispose();
245 
246         /// Calls all Listener objects to tell them the change. Don't hold locks when calling this!
247         virtual void FireEvent(const sal_Int16 nEventId, const ::com::sun::star::uno::Any& rNewValue = ::com::sun::star::uno::Any(), const ::com::sun::star::uno::Any& rOldValue = ::com::sun::star::uno::Any() ) const;
248 
249         /// Queries the given state on the internal state set
250         bool HasState( const sal_Int16 nStateId );
251         /// Sets the given state on the internal state set and fires STATE_CHANGE event. Don't hold locks when calling this!
252         void SetState( const sal_Int16 nStateId );
253         /// Unsets the given state on the internal state set and fires STATE_CHANGE event. Don't hold locks when calling this!
254         void UnSetState( const sal_Int16 nStateId );
255 
256         static Rectangle LogicToPixel( const Rectangle& rRect, const MapMode& rMapMode, SvxViewForwarder& rForwarder );
257 
258         SvxEditSourceAdapter& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException));
259 
260         /** Query the SvxTextForwarder for EditEngine access.
261 
262             @attention This method does not lock the SolarMutex,
263             leaving that to the calling code. This is because only
264             there potential deadlock situations can be resolved. Thus,
265             make sure SolarMutex is locked when calling this.
266          */
267         SvxAccessibleTextAdapter&	GetTextForwarder() const SAL_THROW((::com::sun::star::uno::RuntimeException));
268 
269         /** Query the SvxViewForwarder for EditEngine access.
270 
271             @attention This method does not lock the SolarMutex,
272             leaving that to the calling code. This is because only
273             there potential deadlock situations can be resolved. Thus,
274             make sure SolarMutex is locked when calling this.
275          */
276         SvxViewForwarder&	GetViewForwarder() const SAL_THROW((::com::sun::star::uno::RuntimeException));
277 
278         /** Query whether a GetEditViewForwarder( sal_False ) will return a forwarder
279 
280             @attention This method does not lock the SolarMutex,
281             leaving that to the calling code. This is because only
282             there potential deadlock situations can be resolved. Thus,
283             make sure SolarMutex is locked when calling this.
284          */
285         sal_Bool	HaveEditView() const;
286 
287         /** Query the SvxEditViewForwarder for EditEngine access.
288 
289             @attention This method does not lock the SolarMutex,
290             leaving that to the calling code. This is because only
291             there potential deadlock situations can be resolved. Thus,
292             make sure SolarMutex is locked when calling this.
293          */
294         SvxAccessibleTextEditViewAdapter& GetEditViewForwarder( sal_Bool bCreate = sal_False ) const SAL_THROW((::com::sun::star::uno::RuntimeException));
295 
296         /** Send a TEXT_CHANGED event for this paragraph
297 
298         	This method internally caters for calculating text
299         	differences, and sends the appropriate Anys in the
300         	Accessibility::TEXT_CHANGED event
301          */
302         void TextChanged();
303 
304     private:
305 
306         // declared, but not defined
307         AccessibleEditableTextPara( const AccessibleEditableTextPara& );
308         AccessibleEditableTextPara& operator= ( const AccessibleEditableTextPara& );
309 
310         /** Calculate character range of similar attributes
311 
312         	@param nStartIndex
313             Therein, the start of the character range with the same attributes is returned
314 
315         	@param nEndIndex
316             Therein, the end (exclusively) of the character range with the same attributes is returned
317 
318             @param nIndex
319             The character index at where to look for similar character attributes
320 
321             @return sal_False, if the method was not able to determine the range
322          */
323         sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nIndex );
324 
325         // syntactic sugar for FireEvent
326         void GotPropertyEvent( const ::com::sun::star::uno::Any& rNewValue, const sal_Int16 nEventId ) const;
327         void LostPropertyEvent( const ::com::sun::star::uno::Any& rOldValue, const sal_Int16 nEventId ) const;
328 
329         /** Query the visibility state
330 
331             @attention This method does not lock the SolarMutex,
332             leaving that to the calling code. This is because only
333             there potential deadlock situations can be resolved. Thus,
334             make sure SolarMutex is locked when calling this.
335 
336             @return the visibility state. Per definition, a defunc object is no longer visible
337          */
338         sal_Bool IsVisible() const;
339 
340         int getNotifierClientId() const;
341 
342         // retrieve text interface for given paragraph index
343         ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleText > GetParaInterface( sal_Int32 nIndex );
344 
345         /// Do we have children? This is the case for image bullets
346         sal_Bool HaveChildren();
347 
348         /// Is the underlying object in edit mode
349         sal_Bool IsActive() const SAL_THROW((::com::sun::star::uno::RuntimeException));
350 
351         const Point& GetEEOffset() const;
352 
353         // Get text from forwarder
354         String GetText( sal_Int32 nIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException));
355         String GetTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException));
356         sal_uInt16 GetTextLen() const SAL_THROW((::com::sun::star::uno::RuntimeException));
357 
358         /** Get the current selection of this paragraph
359 
360             @return sal_False, if nothing in this paragraph is selected
361          */
362         sal_Bool GetSelection( sal_uInt16& nStartPos, sal_uInt16& nEndPos ) SAL_THROW((::com::sun::star::uno::RuntimeException));
363 
364         /** create selection from Accessible selection.
365 
366         */
367         ESelection 	MakeSelection( sal_Int32 nStartEEIndex, sal_Int32 nEndEEIndex );
368         ESelection 	MakeSelection( sal_Int32 nEEIndex );
369         ESelection 	MakeCursor( sal_Int32 nEEIndex );
370 
371         // check whether index value is within permitted range
372 
373         /// Check whether 0<=nIndex<=n-1
374         void CheckIndex( sal_Int32 nIndex ) SAL_THROW((::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException));
375         /// Check whether 0<=nIndex<=n
376         void CheckPosition( sal_Int32 nIndex ) SAL_THROW((::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException));
377         /// Check whether 0<=nStart<=n and 0<=nEnd<=n
378         void CheckRange( sal_Int32 nStart, sal_Int32 nEnd ) SAL_THROW((::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException));
379 
380         // the paragraph index in the edit engine (guarded by solar mutex)
381         sal_Int32	mnParagraphIndex;
382 
383         // our current index in the parent (guarded by solar mutex)
384         sal_Int32	mnIndexInParent;
385 
386         // the current edit source (guarded by solar mutex)
387         SvxEditSourceAdapter* mpEditSource;
388 
389         // the possible child (for image bullets, guarded by solar mutex)
390         typedef WeakCppRef < ::com::sun::star::accessibility::XAccessible, AccessibleImageBullet > WeakBullet;
391         WeakBullet maImageBullet;
392 
393         // the last string used for an Accessibility::TEXT_CHANGED event (guarded by solar mutex)
394         ::rtl::OUString maLastTextString;
395 
396         // the offset of the underlying EditEngine from the shape/cell (guarded by solar mutex)
397         Point maEEOffset;
398 
399         // the current state set (updated from SetState/UnSetState and guarded by solar mutex)
400         ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > mxStateSet;
401 
402         /// The shape we're the accessible for (unguarded)
403         ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxParent;
404 
405         /// Our listeners (guarded by maMutex)
406         int mnNotifierClientId;
407 
408         // --> OD 2006-01-11 #i27138#
409         // the paragraph manager, which created this instance - is NULL, if
410         // instance isn't created by AccessibleParaManager.
411         // Needed for method <getAccessibleRelationSet()> to retrieve predecessor
412         // paragraph and the successor paragraph.
413         const AccessibleParaManager* mpParaManager;
414     };
415 
416 } // end of namespace accessibility
417 
418 #endif
419 
420