xref: /AOO41X/main/sw/source/core/access/accpara.hxx (revision 5ff14ef2c455a7c2a39819566d74aed4bcc9528e)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _ACCPARA_HXX
24 #define _ACCPARA_HXX
25 
26 #include <acccontext.hxx>
27 #include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
28 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
29 #include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
30 #include <com/sun/star/accessibility/XAccessibleTextMarkup.hpp>
31 #include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
32 //IAccessibility2 Implementation 2009-----
33 #include <com/sun/star/accessibility/XAccessibleTextSelection.hpp>
34 #include <txmsrt.hxx>
35 #include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
36 //-----IAccessibility2 Implementation 2009
37 #include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
38 #include <hash_map>
39 #include <accselectionhelper.hxx>
40 // --> OD 2010-02-19 #i108125#
41 #include <calbck.hxx>
42 // <--
43 
44 class SwField;
45 class SwTxtFrm;
46 class SwTxtNode;
47 class SwPaM;
48 class SwAccessiblePortionData;
49 class SwAccessibleHyperTextData;
50 class SwRedline; //IAccessibility2 Implementation 2009
51 class SwXTextPortion;
52 // --> OD 2010-02-19 #i108125#
53 class SwParaChangeTrackingInfo;
54 // <--
55 
56 namespace rtl { class OUString; }
57 namespace com { namespace sun { namespace star {
58     namespace i18n { struct Boundary; }
59     namespace accessibility { class XAccessibleHyperlink; }
60     namespace style { class TabStop; }
61 } } }
62 
63 typedef ::std::hash_map< ::rtl::OUString,
64                          ::com::sun::star::beans::PropertyValue,
65                          ::rtl::OUStringHash,
66                          ::std::equal_to< ::rtl::OUString > > tAccParaPropValMap;
67 
68 class SwAccessibleParagraph :
69         // --> OD 2010-02-19 #i108125#
70         public SwClient,
71         // <--
72         public SwAccessibleContext,
73 		public ::com::sun::star::accessibility::XAccessibleEditableText,
74 	    public com::sun::star::accessibility::XAccessibleSelection,
75         public com::sun::star::accessibility::XAccessibleHypertext,
76         public com::sun::star::accessibility::XAccessibleTextMarkup,
77         public com::sun::star::accessibility::XAccessibleMultiLineText,
78         public ::com::sun::star::accessibility::XAccessibleTextAttributes,
79 		//IAccessibility2 Implementation 2009-----
80 		public com::sun::star::accessibility::XAccessibleTextSelection,
81 		public  com::sun::star::accessibility::XAccessibleExtendedAttributes
82 		//-----IAccessibility2 Implementation 2009
83 {
84 	friend class SwAccessibleHyperlink;
85 
86 	::rtl::OUString sDesc;	// protected by base classes mutex
87 
88     /// data for this paragraph's text portions; this contains the
89     /// mapping from the core 'model string' to the accessible text
90     /// string.
91     /// pPortionData may be NULL; it should only be accessed through the
92     /// Get/Clear/Has/UpdatePortionData() methods
93     SwAccessiblePortionData* pPortionData;
94 	SwAccessibleHyperTextData *pHyperTextData;
95 
96 	sal_Int32 nOldCaretPos;	// The 'old' caret pos. It's only valid as long
97 							// as the cursor is inside this object (protected by
98 							// mutex)
99 
100 	sal_Bool bIsHeading;	// protected by base classes mutex
101 	//IAccessibility2 Implementation 2009-----
102 	sal_Int32 nHeadingLevel;
103 	//-----IAccessibility2 Implementation 2009
104 
105     // implementation for XAccessibleSelection
106     SwAccessibleSelectionHelper aSelectionHelper;
107 
108     // --> OD 2010-02-19 #i108125#
109     SwParaChangeTrackingInfo* mpParaChangeTrackInfo;
110     // <--
111 
112     /// get the SwTxtNode (requires frame; check before)
113     const SwTxtNode* GetTxtNode() const;
114 
115     /// get the (accessible) text string (requires frame; check before)
116     ::rtl::OUString GetString();
117 
118 	::rtl::OUString GetDescription();
119 
120 	// get the current care position
121 	sal_Int32 GetCaretPos();
122 
123     /// determine the current selection. Fill the values with
124     /// -1 if there is no selection in the this paragraph
125     sal_Bool GetSelection(sal_Int32& nStart, sal_Int32& nEnd);
126 
127     // helper for GetSelection and getCaretPosition
128     // --> OD 2005-12-20 #i27301#
129     // - add parameter <_bForSelection>, which indicates, if the cursor is
130     //   retrieved for selection or for caret position.
131     SwPaM* GetCursor( const bool _bForSelection );
132 
133     /// for cut/copy/paste: execute a particular slot at the view shell
134     void ExecuteAtViewShell( sal_uInt16 nSlot );
135 
136     /// helper method for get/setAttributes
137     /// (for the special case of (nEndIndex==-1) a single character will
138     ///  be selected)
139     SwXTextPortion* CreateUnoPortion( sal_Int32 nStart, sal_Int32 nEnd );
140 
141 
142     // methods for checking the parameter range:
143 
144     /// does nPos point to a char?
145     sal_Bool IsValidChar(sal_Int32 nPos, sal_Int32 nLength);
146 
147     /// does nPos point to a position? (may be behind the last character)
148     sal_Bool IsValidPosition(sal_Int32 nPos, sal_Int32 nLength);
149 
150     /// is nBegin...nEnd a valid range? (nEnd points past the last character)
151     sal_Bool IsValidRange(sal_Int32 nBegin, sal_Int32 nEnd, sal_Int32 nLength);
152 
153     /// Ensure ordered range (i.e. nBegin is smaller then nEnd)
154     inline void OrderRange(sal_Int32& nBegin, sal_Int32& nEnd)
155     {
156         if( nBegin > nEnd )
157         {
158             sal_Int32 nTmp = nBegin; nBegin = nEnd; nEnd = nTmp;
159         }
160     }
161 
162 	//IAccessibility2 Implementation 2009-----
163     const SwRedline* GetRedlineAtIndex( sal_Int32 nPos );
164 	String GetFieldTypeNameAtIndex(sal_Int32 nIndex);
165 	//-----IAccessibility2 Implementation 2009
166     // --> OD 2006-07-13 #i63870#
167     void _getDefaultAttributesImpl(
168             const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
169             tAccParaPropValMap& rDefAttrSeq,
170             const bool bOnlyCharAttrs = false );
171     void _getRunAttributesImpl(
172             const sal_Int32 nIndex,
173             const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
174             tAccParaPropValMap& rRunAttrSeq );
175     // <--
176 	// IAccessibility2 Implementation 2009----
177 	void _getSupplementalAttributesImpl(
178 			const sal_Int32 nIndex,
179             const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
180             tAccParaPropValMap& rSupplementalAttrSeq );
181 
182 	void _correctValues(
183 			const sal_Int32 nIndex,
184 			::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rValues );
185 	// ----IAccessibility2 Implementation 2009
186 
187 public:
188 	//IAccessibility2 Implementation 2009-----
189 	SwTOXSortTabBase* GetTOXSortTabBase();
190 	short GetTOCLevel();
191 	//-----IAccessibility2 Implementation 2009
192 	sal_Bool IsHeading() const;
193 
194 protected:
195 
196 	// Set states for getAccessibleStateSet.
197 	// This drived class additinaly sets MULTILINE(1), MULTISELECTABLE(+),
198 	// FOCUSABLE(+) and FOCUSED(+)
199 	virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
200 
201 	virtual void _InvalidateContent( sal_Bool bVisibleDataFired );
202 
203 	virtual void _InvalidateCursorPos();
204 	virtual void _InvalidateFocus();
205 
206 	virtual ~SwAccessibleParagraph();
207 
208 	//=====  handling of data for the text portions ===========================
209 
210     /// force update of new portion data
211     void UpdatePortionData()
212         throw( com::sun::star::uno::RuntimeException );
213 
214     /// remove the current portion data
215     void ClearPortionData();
216 
217     /// get portion data; update if necesary
218     SwAccessiblePortionData& GetPortionData()
219         throw( com::sun::star::uno::RuntimeException )
220     {
221         if( pPortionData == NULL )
222             UpdatePortionData();
223         return *pPortionData;
224     }
225 
226     /// determine if portion data is currently available
227     sal_Bool HasPortionData()   { return (pPortionData != NULL); }
228 
229 
230 	//=====  helpers for word boundaries  ====================================
231 
232     sal_Bool GetCharBoundary( com::sun::star::i18n::Boundary& rBound,
233                               const rtl::OUString& rText,
234                               sal_Int32 nPos );
235     sal_Bool GetWordBoundary( com::sun::star::i18n::Boundary& rBound,
236                               const rtl::OUString& rText,
237                               sal_Int32 nPos );
238     sal_Bool GetSentenceBoundary( com::sun::star::i18n::Boundary& rBound,
239                                   const rtl::OUString& rText,
240                                   sal_Int32 nPos );
241     sal_Bool GetLineBoundary( com::sun::star::i18n::Boundary& rBound,
242                               const rtl::OUString& rText,
243                               sal_Int32 nPos );
244     sal_Bool GetParagraphBoundary( com::sun::star::i18n::Boundary& rBound,
245                                    const rtl::OUString& rText,
246                                    sal_Int32 nPos );
247     sal_Bool GetAttributeBoundary( com::sun::star::i18n::Boundary& rBound,
248                                    const rtl::OUString& rText,
249                                    sal_Int32 nPos );
250     sal_Bool GetGlyphBoundary( com::sun::star::i18n::Boundary& rBound,
251                                const rtl::OUString& rText,
252                                sal_Int32 nPos );
253 
254     /// get boundaries of word/sentence/etc. for specified text type
255     /// Does all argument checking, and then delegates to helper methods above.
256     sal_Bool GetTextBoundary( com::sun::star::i18n::Boundary& rBound,
257                               const rtl::OUString& rText,
258                               sal_Int32 nPos,
259                               sal_Int16 aTextType )
260         throw (
261             ::com::sun::star::lang::IndexOutOfBoundsException,
262             ::com::sun::star::lang::IllegalArgumentException,
263             ::com::sun::star::uno::RuntimeException);
264 
265     virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew);
266 
267 public:
268 
269     SwAccessibleParagraph( SwAccessibleMap& rInitMap,
270                            const SwTxtFrm& rTxtFrm );
271 
272 	inline operator ::com::sun::star::accessibility::XAccessibleText *();
273 
274 	virtual sal_Bool HasCursor();	// required by map to remember that object
275 
276 	//IAccessibility2 Implementation 2009-----
277 	com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > GetCurrentTabStop( sal_Int32 nIndex  );
278 	virtual sal_Int16 SAL_CALL getAccessibleRole (void)     throw (::com::sun::star::uno::RuntimeException);
279 	//-----IAccessibility2 Implementation 2009
280     // --> OD 2010-02-19 #i108125#
281     // MT: Solved merge conflict - seems this was removed between 101 and 103?
282     // virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew);
283     // <--
284 
285     //=====  XAccessibleContext  ==============================================
286 
287     ///	Return this object's description.
288 	virtual ::rtl::OUString SAL_CALL
289     	getAccessibleDescription (void)
290         throw (com::sun::star::uno::RuntimeException);
291 
292 	/**	Return the parents locale or throw exception if this object has no
293     	parent yet/anymore.
294     */
295 	virtual ::com::sun::star::lang::Locale SAL_CALL
296     	getLocale (void)
297 		throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
298 
299     /** paragraphs are in relation CONTENT_FLOWS_FROM and/or CONTENT_FLOWS_TO
300 
301         OD 2005-12-02 #i27138#
302 
303         @author OD
304     */
305     virtual ::com::sun::star::uno::Reference<
306             ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
307         getAccessibleRelationSet (void)
308         throw (::com::sun::star::uno::RuntimeException);
309 
310 	//=====  XAccessibleComponent  ============================================
311 
312     virtual void SAL_CALL grabFocus()
313 		throw (::com::sun::star::uno::RuntimeException);
314     // --> OD 2007-01-17 #i71385#
315     virtual sal_Int32 SAL_CALL getForeground()
316         throw (::com::sun::star::uno::RuntimeException);
317     virtual sal_Int32 SAL_CALL getBackground()
318         throw (::com::sun::star::uno::RuntimeException);
319     // <--
320 
321 	//=====  XServiceInfo  ====================================================
322 
323     /**	Returns an identifier for the implementation of this object.
324     */
325 	virtual ::rtl::OUString SAL_CALL
326     	getImplementationName (void)
327         throw (::com::sun::star::uno::RuntimeException);
328 
329     /**	Return whether the specified service is supported by this class.
330     */
331     virtual sal_Bool SAL_CALL
332     	supportsService (const ::rtl::OUString& sServiceName)
333         throw (::com::sun::star::uno::RuntimeException);
334 
335     /** Returns a list of all supported services.  In this case that is just
336     	the AccessibleContext service.
337     */
338 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
339     	getSupportedServiceNames (void)
340         throw (::com::sun::star::uno::RuntimeException);
341 
342 
343 	//=====  XInterface  ======================================================
344 
345     // (XInterface methods need to be implemented to disambiguate
346     // between those inherited through SwAcessibleContext and
347     // XAccessibleEditableText).
348 
349     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
350         const ::com::sun::star::uno::Type& aType )
351         throw (::com::sun::star::uno::RuntimeException);
352 
353     virtual void SAL_CALL acquire(  ) throw ()
354         { SwAccessibleContext::acquire(); };
355 
356     virtual void SAL_CALL release(  ) throw ()
357         { SwAccessibleContext::release(); };
358 
359 	//====== XTypeProvider ====================================================
360 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
361     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
362 
363 	//=====  XAccesibleText  ==================================================
364     virtual sal_Int32 SAL_CALL getCaretPosition(  ) throw (::com::sun::star::uno::RuntimeException);
365     virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
366     virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
367     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);
368     virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
369     virtual sal_Int32 SAL_CALL getCharacterCount(  ) throw (::com::sun::star::uno::RuntimeException);
370     virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
371     virtual ::rtl::OUString SAL_CALL getSelectedText(  ) throw (::com::sun::star::uno::RuntimeException);
372     virtual sal_Int32 SAL_CALL getSelectionStart(  ) throw (::com::sun::star::uno::RuntimeException);
373     virtual sal_Int32 SAL_CALL getSelectionEnd(  ) throw (::com::sun::star::uno::RuntimeException);
374     virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
375     virtual ::rtl::OUString SAL_CALL getText(  ) throw (::com::sun::star::uno::RuntimeException);
376     virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
377     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);
378     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);
379     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);
380     virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
381 
382 	//=====  XAccesibleEditableText  ==========================================
383     virtual sal_Bool SAL_CALL cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
384     virtual sal_Bool SAL_CALL pasteText( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
385     virtual sal_Bool SAL_CALL deleteText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
386     virtual sal_Bool SAL_CALL insertText( const ::rtl::OUString& sText, sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
387     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);
388     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);
389     virtual sal_Bool SAL_CALL setText( const ::rtl::OUString& sText ) throw (::com::sun::star::uno::RuntimeException);
390 
391 	//=====  XAccessibleSelection  ============================================
392     virtual void SAL_CALL selectAccessibleChild(
393         sal_Int32 nChildIndex )
394         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
395                 ::com::sun::star::uno::RuntimeException );
396 
397     virtual sal_Bool SAL_CALL isAccessibleChildSelected(
398         sal_Int32 nChildIndex )
399         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
400                 ::com::sun::star::uno::RuntimeException );
401     virtual void SAL_CALL clearAccessibleSelection(  )
402         throw ( ::com::sun::star::uno::RuntimeException );
403     virtual void SAL_CALL selectAllAccessibleChildren(  )
404         throw ( ::com::sun::star::uno::RuntimeException );
405     virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount(  )
406         throw ( ::com::sun::star::uno::RuntimeException );
407     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
408         sal_Int32 nSelectedChildIndex )
409         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
410                 ::com::sun::star::uno::RuntimeException);
411 
412     // --> OD 2004-11-16 #111714# - index has to be treated as global child index.
413     virtual void SAL_CALL deselectAccessibleChild(
414         sal_Int32 nChildIndex )
415         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
416                 ::com::sun::star::uno::RuntimeException );
417 
418     //=====  XAccessibleHypertext  ============================================
419     virtual sal_Int32 SAL_CALL getHyperLinkCount()
420         throw (::com::sun::star::uno::RuntimeException);
421     virtual ::com::sun::star::uno::Reference<
422             ::com::sun::star::accessibility::XAccessibleHyperlink >
423         SAL_CALL getHyperLink( sal_Int32 nLinkIndex )
424         throw (::com::sun::star::lang::IndexOutOfBoundsException,
425                 ::com::sun::star::uno::RuntimeException);
426     virtual sal_Int32 SAL_CALL getHyperLinkIndex( sal_Int32 nCharIndex )
427         throw (::com::sun::star::lang::IndexOutOfBoundsException,
428                 ::com::sun::star::uno::RuntimeException);
429 
430     // --> OD 2008-05-19 #i71360#
431     //=====  XAccesibleTextMarkup  ============================================
432     virtual sal_Int32 SAL_CALL getTextMarkupCount( sal_Int32 nTextMarkupType )
433             throw (::com::sun::star::lang::IllegalArgumentException,
434                    ::com::sun::star::uno::RuntimeException);
435 
436     virtual ::com::sun::star::accessibility::TextSegment SAL_CALL
437             getTextMarkup( sal_Int32 nTextMarkupIndex,
438                            sal_Int32 nTextMarkupType )
439             throw (::com::sun::star::lang::IndexOutOfBoundsException,
440                    ::com::sun::star::lang::IllegalArgumentException,
441                    ::com::sun::star::uno::RuntimeException);
442 
443     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::accessibility::TextSegment > SAL_CALL
444             getTextMarkupAtIndex( sal_Int32 nCharIndex,
445                                   sal_Int32 nTextMarkupType )
446             throw (::com::sun::star::lang::IndexOutOfBoundsException,
447                    ::com::sun::star::lang::IllegalArgumentException,
448                    ::com::sun::star::uno::RuntimeException);
449     // <--
450     //IAccessibility2 Implementation 2009-----
451 	//======   XAccessibleTextSelection  ======================================
452 	virtual sal_Bool SAL_CALL scrollToPosition( const ::com::sun::star::awt::Point& aPoint, sal_Bool isLeftTop )
453 		throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
454 	virtual sal_Int32 SAL_CALL getSelectedPortionCount(  )
455 		throw (::com::sun::star::uno::RuntimeException);
456 	virtual sal_Int32 SAL_CALL getSeletedPositionStart( sal_Int32 nSelectedPortionIndex )
457 		throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
458 	virtual sal_Int32 SAL_CALL getSeletedPositionEnd( sal_Int32 nSelectedPortionIndex )
459 		throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
460 	virtual sal_Bool SAL_CALL removeSelection( sal_Int32 selectionIndex )
461 		throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
462 	virtual sal_Int32 SAL_CALL  addSelection( sal_Int32 selectionIndex, sal_Int32 startOffset, sal_Int32 endOffset)
463 		throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
464 	//=====  XAccessibleExtendedAttributes  ==============================================
465     virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
466 		throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
467 	sal_Bool GetSelectionAtIndex(sal_Int32& nIndex, sal_Int32& nStart, sal_Int32& nEnd);
468 	sal_Int32 GetRealHeadingLevel();
469 	//=====  XAccessibleComponent  ============================================
470 	sal_Bool m_bLastHasSelection;
471 	sal_Bool tabCharInWord(sal_Int32 nIndex, com::sun::star::i18n::Boundary&  aBound);
472 	//-----IAccessibility2 Implementation 2009
473     // --> OD 2008-05-29 #i89175#
474     //=====  XAccessibleMultiLineText  ========================================
475     virtual sal_Int32 SAL_CALL getLineNumberAtIndex( sal_Int32 nIndex )
476             throw (::com::sun::star::lang::IndexOutOfBoundsException,
477                    ::com::sun::star::uno::RuntimeException);
478 
479     virtual ::com::sun::star::accessibility::TextSegment SAL_CALL
480             getTextAtLineNumber( sal_Int32 nLineNo )
481             throw (::com::sun::star::lang::IndexOutOfBoundsException,
482                    ::com::sun::star::uno::RuntimeException);
483 
484     virtual ::com::sun::star::accessibility::TextSegment SAL_CALL
485             getTextAtLineWithCaret()
486             throw (::com::sun::star::uno::RuntimeException);
487 
488     virtual sal_Int32 SAL_CALL getNumberOfLineWithCaret()
489             throw (::com::sun::star::uno::RuntimeException);
490     // <--
491 
492     // --> OD 2006-07-11 #i63870#
493     //=====  XAccesibleTextAttributes  ========================================
494     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
495     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
496     // <--
497 };
498 
499 inline SwAccessibleParagraph::operator ::com::sun::star::accessibility::XAccessibleText *()
500 {
501 	return static_cast<
502 		::com::sun::star::accessibility::XAccessibleEditableText * >( this );
503 }
504 
505 #endif
506 
507