Update ooo320-m1
[ooovba.git] / svx / inc / AccessibleStaticTextBase.hxx
blob2a9fdab114000c56564df5d072e66733657e447b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AccessibleStaticTextBase.hxx,v $
10 * $Revision: 1.14 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
32 #define _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
34 #include <memory>
35 #include <tools/gen.hxx>
36 #include <cppuhelper/implbase2.hxx>
37 #include <com/sun/star/uno/Any.hxx>
38 #include <com/sun/star/uno/Reference.hxx>
39 #include <com/sun/star/accessibility/XAccessible.hpp>
40 #include <com/sun/star/accessibility/XAccessibleText.hpp>
41 #include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
42 #include <com/sun/star/accessibility/TextSegment.hpp>
43 #include "svx/svxdllapi.h"
46 class SvxEditSource;
47 class SvxEditViewForwarder;
49 namespace accessibility
52 class AccessibleStaticTextBase_Impl;
54 typedef ::cppu::ImplHelper2<
55 ::com::sun::star::accessibility::XAccessibleText,
56 ::com::sun::star::accessibility::XAccessibleTextAttributes > AccessibleStaticTextBase_BASE;
58 /** Helper class for objects containing EditEngine/Outliner text
60 This class implements the XAccessibleText interface for static
61 text, somewhat similar to the children of the
62 AccessibleTextHelper class. Currently, there are no children,
63 i.e. the whole text is presented in one big chunk. This might
64 change in the future, if a need for image bullets should
65 arise. These, by convention, would be represented as children
66 of the text.
68 You have to implement the SvxEditSource, SvxTextForwarder,
69 SvxViewForwarder and SvxEditViewForwarder interfaces in order
70 to enable your object to cooperate with this
71 class. SvxTextForwarder encapsulates the fact that text
72 objects do not necessarily have an EditEngine at their
73 disposal, SvxViewForwarder and SvxEditViewForwarder do the
74 same for the document and the edit view. The three mentioned
75 forwarder objects are not stored by the AccessibleTextHelper,
76 but fetched every time from the SvxEditSource. So you are best
77 off making your SvxEditSource::Get*Forwarder methods cache the
78 current forwarder.
80 As this class is intended for static (i.e. non-changing) text
81 only, no event broadcasting is necessary. You must handle
82 visibility by yourself, the bounding boxes returned by
83 getCharacterBounds() are relative to your accessibility
84 object.
86 @attention All public non-UNO methods (those are the uppercase
87 ones) must not be called with any mutex hold, except when
88 calling from the main thread (with holds the solar mutex),
89 unless stated otherwise. This is because they themselves might
90 need the solar mutex in addition to the object mutex, and the
91 ordering of the locking must be: first solar mutex, then
92 object mutex. Furthermore, state change events might be fired
93 internally.
95 @derive Use this class as a base for objects containing static
96 edit engine text. To avoid overwriting every interface method
97 to intercept derived object defunc state, just set NULL as the
98 edit source. Every interface method will then properly throw
99 an exception.
101 class SVX_DLLPUBLIC AccessibleStaticTextBase : public AccessibleStaticTextBase_BASE
104 public:
105 /** Create accessible text object for given edit source
107 @param pEditSource
108 The edit source to use. Object ownership is transferred
109 from the caller to the callee. The object listens on the
110 SvxEditSource for object disposal, so no provisions have
111 to be taken if the caller destroys the data (e.g. the
112 model) contained in the given SvxEditSource.
115 explicit AccessibleStaticTextBase( ::std::auto_ptr< SvxEditSource > pEditSource );
116 virtual ~AccessibleStaticTextBase();
118 private:
120 // declared, but not defined
121 SVX_DLLPRIVATE AccessibleStaticTextBase( const AccessibleStaticTextBase& );
122 // declared, but not defined
123 SVX_DLLPRIVATE AccessibleStaticTextBase& operator= ( const AccessibleStaticTextBase& );
125 public:
126 /** Query the current edit source
128 @attention This method returns by reference, so you are
129 responsible for serialization (typically, you aquired the
130 solar mutex when calling this method). Thus, the method
131 should only be called from the main office thread.
134 virtual const SvxEditSource& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException));
136 /** Set the current edit source
138 @attention You are required to have the solar mutex
139 locked, when calling this method. Thus, the method should
140 only be called from the main office thread.
142 The EditSource set here is required to broadcast out the
143 following hints: EDITSOURCE_HINT_PARASMOVED,
144 EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
145 TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
146 TEXT_HINT_TEXTHEIGHTCHANGED,
147 TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
148 will get noticed by the accessibility object. Further
149 more, when the corresponding core object or the model is
150 dying, either the edit source must be set to NULL or it
151 has to broadcast a SFX_HINT_DYING hint.
153 This class does not have a dispose method, since it is not
154 a UNO component. Nevertheless, it holds C++ references to
155 several core objects, so you should issue a
156 SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in
157 your dispose() method.
159 @param pEditSource
160 The new edit source to set. Object ownership is transferred
161 from the caller to the callee.
163 virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ) SAL_THROW((::com::sun::star::uno::RuntimeException));
165 /** Set the event source
167 @attention When setting a reference here, you should call
168 Dispose() when you as the owner are disposing, since until
169 then this object will hold that reference
171 @param rInterface
172 The interface that should be set as the source for
173 accessibility events sent by this object.
175 virtual void SetEventSource( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rInterface );
177 /** Get the event source
179 @return the interface that is set as the source for
180 accessibility events sent by this object.
182 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetEventSource() const;
184 /** Set offset of EditEngine from parent
186 @attention You are required to have the solar mutex
187 locked, when calling this method. Thus, the method should
188 only be called from the main office thread.
190 If the origin of the underlying EditEngine does
191 not correspond to the upper left corner of the object
192 using this class, you have to specify the offset.
194 @param rPoint
195 The offset in screen coordinates (i.e. pixel)
197 virtual void SetOffset( const Point& rPoint );
199 /** Query offset of EditEngine from parent
201 @return the offset in screen coordinates (i.e. pixel)
203 virtual Point GetOffset() const;
205 /** Update the visible children
207 As this class currently does not represent any content
208 using children, this does nothing at the moment.
210 @attention You are required to have the solar mutex
211 locked, when calling this method. Thus, the method should
212 only be called from the main office thread.
214 This method reevaluates the visibility of all
215 childrens. Call this method if your visibility state has
216 changed somehow, e.g. if the visible area has changed and
217 the AccessibleStaticTextHelper isn't notified
218 internally. Normally, there should not be a need to call
219 this method.
221 virtual void UpdateChildren() SAL_THROW((::com::sun::star::uno::RuntimeException));
223 /** Drop all references and enter disposed state
225 This method drops all references to external objects (also
226 the event source reference set via SetEventSource()) and
227 sets the object into the disposed state (i.e. the methods
228 return default values or throw a uno::DisposedException
229 exception).
231 virtual void Dispose();
233 // XAccessibleText interface implementation
234 virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
235 virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
236 virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
237 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);
238 virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
239 virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
240 virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
241 virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
242 virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
243 virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
244 /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
245 virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
246 virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
247 virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
248 /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
249 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);
250 /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
251 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);
252 /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
253 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);
254 /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
255 virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
257 // XAccessibleTextAttributes
258 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);
259 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);
261 // child-related methods from XAccessibleContext
262 virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
263 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);
265 // child-related methods from XAccessibleComponent
266 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);
268 protected:
269 Rectangle GetParagraphBoundingBox() const;
270 sal_Int32 GetParagraphCount() const;
271 sal_Int32 GetParagraphIndex() const;
272 sal_Int32 GetLineCount( sal_Int32 nParagraph ) const;
274 private:
276 /// @dyn
277 const std::auto_ptr< AccessibleStaticTextBase_Impl > mpImpl;
281 } // end of namespace accessibility
283 #endif /* _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ */
284 /*************************************************************************
286 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
288 * Copyright 2008 by Sun Microsystems, Inc.
290 * OpenOffice.org - a multi-platform office productivity suite
292 * $RCSfile: AccessibleStaticTextBase.hxx,v $
293 * $Revision: 1.14 $
295 * This file is part of OpenOffice.org.
297 * OpenOffice.org is free software: you can redistribute it and/or modify
298 * it under the terms of the GNU Lesser General Public License version 3
299 * only, as published by the Free Software Foundation.
301 * OpenOffice.org is distributed in the hope that it will be useful,
302 * but WITHOUT ANY WARRANTY; without even the implied warranty of
303 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 * GNU Lesser General Public License version 3 for more details
305 * (a copy is included in the LICENSE file that accompanied this code).
307 * You should have received a copy of the GNU Lesser General Public License
308 * version 3 along with OpenOffice.org. If not, see
309 * <http://www.openoffice.org/license.html>
310 * for a copy of the LGPLv3 License.
312 ************************************************************************/
314 #ifndef _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
315 #define _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
317 #include <memory>
318 #include <tools/gen.hxx>
319 #include <cppuhelper/implbase2.hxx>
320 #include <com/sun/star/uno/Any.hxx>
321 #include <com/sun/star/uno/Reference.hxx>
322 #include <com/sun/star/accessibility/XAccessible.hpp>
323 #include <com/sun/star/accessibility/XAccessibleText.hpp>
324 #include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
325 #include <com/sun/star/accessibility/TextSegment.hpp>
326 #include "svx/svxdllapi.h"
329 class SvxEditSource;
331 namespace accessibility
334 class AccessibleStaticTextBase_Impl;
336 typedef ::cppu::ImplHelper2<
337 ::com::sun::star::accessibility::XAccessibleText,
338 ::com::sun::star::accessibility::XAccessibleTextAttributes > AccessibleStaticTextBase_BASE;
340 /** Helper class for objects containing EditEngine/Outliner text
342 This class implements the XAccessibleText interface for static
343 text, somewhat similar to the children of the
344 AccessibleTextHelper class. Currently, there are no children,
345 i.e. the whole text is presented in one big chunk. This might
346 change in the future, if a need for image bullets should
347 arise. These, by convention, would be represented as children
348 of the text.
350 You have to implement the SvxEditSource, SvxTextForwarder,
351 SvxViewForwarder and SvxEditViewForwarder interfaces in order
352 to enable your object to cooperate with this
353 class. SvxTextForwarder encapsulates the fact that text
354 objects do not necessarily have an EditEngine at their
355 disposal, SvxViewForwarder and SvxEditViewForwarder do the
356 same for the document and the edit view. The three mentioned
357 forwarder objects are not stored by the AccessibleTextHelper,
358 but fetched every time from the SvxEditSource. So you are best
359 off making your SvxEditSource::Get*Forwarder methods cache the
360 current forwarder.
362 As this class is intended for static (i.e. non-changing) text
363 only, no event broadcasting is necessary. You must handle
364 visibility by yourself, the bounding boxes returned by
365 getCharacterBounds() are relative to your accessibility
366 object.
368 @attention All public non-UNO methods (those are the uppercase
369 ones) must not be called with any mutex hold, except when
370 calling from the main thread (with holds the solar mutex),
371 unless stated otherwise. This is because they themselves might
372 need the solar mutex in addition to the object mutex, and the
373 ordering of the locking must be: first solar mutex, then
374 object mutex. Furthermore, state change events might be fired
375 internally.
377 @derive Use this class as a base for objects containing static
378 edit engine text. To avoid overwriting every interface method
379 to intercept derived object defunc state, just set NULL as the
380 edit source. Every interface method will then properly throw
381 an exception.
383 class SVX_DLLPUBLIC AccessibleStaticTextBase : public AccessibleStaticTextBase_BASE
386 public:
387 /** Create accessible text object for given edit source
389 @param pEditSource
390 The edit source to use. Object ownership is transferred
391 from the caller to the callee. The object listens on the
392 SvxEditSource for object disposal, so no provisions have
393 to be taken if the caller destroys the data (e.g. the
394 model) contained in the given SvxEditSource.
397 explicit AccessibleStaticTextBase( ::std::auto_ptr< SvxEditSource > pEditSource );
398 virtual ~AccessibleStaticTextBase();
400 private:
402 // declared, but not defined
403 SVX_DLLPRIVATE AccessibleStaticTextBase( const AccessibleStaticTextBase& );
404 // declared, but not defined
405 SVX_DLLPRIVATE AccessibleStaticTextBase& operator= ( const AccessibleStaticTextBase& );
407 public:
408 /** Query the current edit source
410 @attention This method returns by reference, so you are
411 responsible for serialization (typically, you aquired the
412 solar mutex when calling this method). Thus, the method
413 should only be called from the main office thread.
416 virtual const SvxEditSource& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException));
418 /** Set the current edit source
420 @attention You are required to have the solar mutex
421 locked, when calling this method. Thus, the method should
422 only be called from the main office thread.
424 The EditSource set here is required to broadcast out the
425 following hints: EDITSOURCE_HINT_PARASMOVED,
426 EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
427 TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
428 TEXT_HINT_TEXTHEIGHTCHANGED,
429 TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
430 will get noticed by the accessibility object. Further
431 more, when the corresponding core object or the model is
432 dying, either the edit source must be set to NULL or it
433 has to broadcast a SFX_HINT_DYING hint.
435 This class does not have a dispose method, since it is not
436 a UNO component. Nevertheless, it holds C++ references to
437 several core objects, so you should issue a
438 SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in
439 your dispose() method.
441 @param pEditSource
442 The new edit source to set. Object ownership is transferred
443 from the caller to the callee.
445 virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ) SAL_THROW((::com::sun::star::uno::RuntimeException));
447 /** Set the event source
449 @attention When setting a reference here, you should call
450 Dispose() when you as the owner are disposing, since until
451 then this object will hold that reference
453 @param rInterface
454 The interface that should be set as the source for
455 accessibility events sent by this object.
457 virtual void SetEventSource( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rInterface );
459 /** Get the event source
461 @return the interface that is set as the source for
462 accessibility events sent by this object.
464 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetEventSource() const;
466 /** Set offset of EditEngine from parent
468 @attention You are required to have the solar mutex
469 locked, when calling this method. Thus, the method should
470 only be called from the main office thread.
472 If the origin of the underlying EditEngine does
473 not correspond to the upper left corner of the object
474 using this class, you have to specify the offset.
476 @param rPoint
477 The offset in screen coordinates (i.e. pixel)
479 virtual void SetOffset( const Point& rPoint );
481 /** Query offset of EditEngine from parent
483 @return the offset in screen coordinates (i.e. pixel)
485 virtual Point GetOffset() const;
487 /** Update the visible children
489 As this class currently does not represent any content
490 using children, this does nothing at the moment.
492 @attention You are required to have the solar mutex
493 locked, when calling this method. Thus, the method should
494 only be called from the main office thread.
496 This method reevaluates the visibility of all
497 childrens. Call this method if your visibility state has
498 changed somehow, e.g. if the visible area has changed and
499 the AccessibleStaticTextHelper isn't notified
500 internally. Normally, there should not be a need to call
501 this method.
503 virtual void UpdateChildren() SAL_THROW((::com::sun::star::uno::RuntimeException));
505 /** Drop all references and enter disposed state
507 This method drops all references to external objects (also
508 the event source reference set via SetEventSource()) and
509 sets the object into the disposed state (i.e. the methods
510 return default values or throw a uno::DisposedException
511 exception).
513 virtual void Dispose();
515 // XAccessibleText interface implementation
516 virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
517 virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
518 virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
519 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);
520 virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
521 virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
522 virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
523 virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
524 virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
525 virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
526 /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
527 virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
528 virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
529 virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
530 /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
531 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);
532 /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
533 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);
534 /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
535 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);
536 /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
537 virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
539 // XAccessibleTextAttributes
540 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);
541 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);
543 // child-related methods from XAccessibleContext
544 virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
545 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);
547 // child-related methods from XAccessibleComponent
548 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);
550 protected:
551 Rectangle GetParagraphBoundingBox() const;
553 private:
555 /// @dyn
556 const std::auto_ptr< AccessibleStaticTextBase_Impl > mpImpl;
560 } // end of namespace accessibility
562 #endif /* _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ */