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