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