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