Update ooo320-m1
[ooovba.git] / sw / inc / unoobj.hxx
blob9449c0383351c1a0b0be61fb4015c88f51b4c164
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unoobj.hxx,v $
11 * $Revision: 1.49 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
31 #ifndef _UNOOBJ_HXX
32 #define _UNOOBJ_HXX
34 #include <unoevtlstnr.hxx>
35 #include <unobaseclass.hxx>
36 #include <unocrsr.hxx>
37 #include <svtools/itemprop.hxx>
38 #include <svtools/svarray.hxx>
39 #include <frmfmt.hxx>
40 #include <flyenum.hxx>
41 #include <fldbas.hxx>
42 #include <fmtcntnt.hxx>
43 #include <pam.hxx>
44 #include <toxe.hxx>
45 #include <sortopt.hxx>
46 #include <com/sun/star/document/XDocumentInsertable.hpp>
47 #include <com/sun/star/text/XTextCursor.hpp>
48 #include <com/sun/star/text/XWordCursor.hpp>
49 #include <com/sun/star/text/XParagraphCursor.hpp>
50 #include <com/sun/star/text/XSentenceCursor.hpp>
51 #include <com/sun/star/text/XFootnote.hpp>
52 #include <com/sun/star/text/XTextSection.hpp>
53 #include <com/sun/star/text/XTextField.hpp>
54 #include <com/sun/star/text/XTextRange.hpp>
55 #include <com/sun/star/text/XText.hpp>
56 #include <com/sun/star/text/XTextCopy.hpp>
57 #include <com/sun/star/text/XTextContent.hpp>
58 #include <com/sun/star/util/XSortable.hpp>
59 #include <com/sun/star/container/XEnumerationAccess.hpp>
60 #include <com/sun/star/container/XContentEnumerationAccess.hpp>
61 #include <com/sun/star/container/XIndexAccess.hpp>
62 #include <com/sun/star/container/XNamed.hpp>
63 #include <com/sun/star/beans/XPropertySet.hpp>
64 #include <com/sun/star/beans/XMultiPropertySet.hpp>
65 #include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
66 #include <com/sun/star/beans/XPropertyState.hpp>
67 #include <com/sun/star/beans/XMultiPropertyStates.hpp>
68 #include <com/sun/star/lang/XUnoTunnel.hpp>
69 #include <com/sun/star/text/XTextRangeCompare.hpp>
70 #include <com/sun/star/text/XRelativeTextContentInsert.hpp>
71 #include <com/sun/star/text/XRelativeTextContentRemove.hpp>
72 #include <com/sun/star/text/XTextAppendAndConvert.hpp>
73 #include <com/sun/star/text/XRedline.hpp>
74 #include <cppuhelper/weak.hxx>
75 #include <cppuhelper/factory.hxx> // helper for factories
77 #include <cppuhelper/implbase1.hxx> // helper for implementations
78 #include <cppuhelper/implbase3.hxx> // helper for implementations
79 #include <cppuhelper/implbase4.hxx> // helper for implementations
80 #include <cppuhelper/implbase5.hxx> // helper for implementations
81 #include <cppuhelper/implbase6.hxx> // helper for implementations
82 #include <cppuhelper/implbase7.hxx> // helper for implementations
83 #include <cppuhelper/implbase8.hxx>
84 #include <cppuhelper/implbase9.hxx>
85 #include <cppuhelper/implbase10.hxx>
86 #include <cppuhelper/implbase12.hxx> // helper for implementations
87 #include "TextCursorHelper.hxx"
88 #include <comphelper/uno3.hxx>
89 #include <cppuhelper/weakref.hxx>
90 #include <com/sun/star/text/XFormField.hpp>
92 #include <unomid.h>
93 #include <tools/link.hxx>
95 #include <IDocumentMarkAccess.hxx>
96 #include <sfx2/Metadatable.hxx>
98 #include <deque>
99 #include <boost/shared_ptr.hpp>
102 class SwFmtFtn;
103 class SwFmtRefMark;
104 class GetCurTxtFmtColl;
107 struct FrameDependSortListEntry {
108 xub_StrLen nIndex;
109 sal_uInt32 nOrder;
110 ::boost::shared_ptr<SwDepend> pFrameDepend;
111 FrameDependSortListEntry (xub_StrLen const i_nIndex,
112 sal_uInt32 const i_nOrder, SwDepend * const i_pDepend)
113 : nIndex(i_nIndex), nOrder(i_nOrder), pFrameDepend(i_pDepend) { }
115 typedef ::std::deque< FrameDependSortListEntry >
116 FrameDependSortList_t;
118 typedef ::std::deque< ::boost::shared_ptr<SwDepend> >
119 FrameDependList_t;
121 /* -----------------29.04.98 07:35-------------------
123 * --------------------------------------------------*/
124 enum CursorType
126 CURSOR_INVALID,
127 CURSOR_BODY,
128 CURSOR_FRAME,
129 CURSOR_TBLTEXT,
130 CURSOR_FOOTNOTE,
131 CURSOR_HEADER,
132 CURSOR_FOOTER,
133 CURSOR_REDLINE,
134 CURSOR_ALL, // fuer Search&Replace
135 CURSOR_SELECTION, // create a paragraph enumeration from a text range or cursor
136 CURSOR_SELECTION_IN_TABLE,
137 CURSOR_META, // meta/meta-field
141 /* -----------------26.06.98 16:18-------------------
143 * --------------------------------------------------*/
145 SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName);
146 ::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId();
148 // OD 2004-05-07 #i28701# - adjust 4th parameter
149 void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
150 FrameDependSortList_t & rFrames,
151 const bool _bAtCharAnchoredObjs );
153 /* -----------------29.04.98 07:35-------------------
155 * --------------------------------------------------*/
156 class SwUnoInternalPaM : public SwPaM
158 SwUnoInternalPaM( const SwUnoInternalPaM& );
159 public:
160 SwUnoInternalPaM(SwDoc& rDoc);
161 ~SwUnoInternalPaM();
163 SwUnoInternalPaM& operator=(const SwPaM& rPaM);
166 /*-----------------04.03.98 11:54-------------------
167 Start/EndAction oder Start/EndAllAction
168 --------------------------------------------------*/
169 class UnoActionContext
171 SwDoc* pDoc;
172 public:
173 UnoActionContext(SwDoc* pDoc);
174 ~UnoActionContext();
176 void InvalidateDocument() {pDoc = 0;}
178 /* -----------------07.07.98 12:03-------------------
179 * Actions kurzfristig unterbrechen
180 * --------------------------------------------------*/
181 class UnoActionRemoveContext
183 SwDoc* pDoc;
184 public:
185 UnoActionRemoveContext(SwDoc* pDoc);
186 ~UnoActionRemoveContext();
189 /******************************************************************************
191 ******************************************************************************/
192 typedef com::sun::star::uno::Reference< com::sun::star::text::XTextRange > * XTextRangeRefPtr;
193 SV_DECL_PTRARR(XTextRangeArr, XTextRangeRefPtr, 4, 4)
195 void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew);
197 /* -----------------03.12.98 12:22-------------------
199 * --------------------------------------------------*/
200 class SwXTextRange;
201 class SwXTextCursor;
202 class SwXText : public ::com::sun::star::lang::XTypeProvider,
203 public ::com::sun::star::text::XTextRangeCompare,
204 public ::com::sun::star::text::XRelativeTextContentInsert,
205 public ::com::sun::star::text::XRelativeTextContentRemove,
206 public ::com::sun::star::beans::XPropertySet,
207 public ::com::sun::star::lang::XUnoTunnel,
208 public ::com::sun::star::text::XTextAppendAndConvert,
209 public ::com::sun::star::text::XTextCopy
211 SwDoc* pDoc;
212 BOOL bObjectValid;
213 CursorType eCrsrType;
214 const SfxItemPropertySet* m_pPropSet;
215 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL finishOrAppendParagraph(
216 bool bFinish,
217 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties )
218 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
220 virtual void PrepareForAttach( ::com::sun::star::uno::Reference<
221 ::com::sun::star::text::XTextRange > & xRange,
222 const SwXTextRange* const pRange, const SwPaM * const pPam);
224 public: /*not protected because C++ is retarded*/
225 virtual const SwStartNode *GetStartNode() const;
227 public:
228 SwXText(SwDoc* pDc, CursorType eType);
229 virtual ~SwXText();
231 const SwDoc* GetDoc()const {return pDoc;}
232 SwDoc* GetDoc() {return pDoc;}
234 // wenn ein SwXText attached wird, wird das Doc gesetzt
235 void SetDoc(SwDoc* pDc)
236 {DBG_ASSERT(!pDoc || !pDc, "Doc schon gesetzt?");
237 pDoc = pDc;
238 bObjectValid = 0 != pDc;
240 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
242 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
244 //XText
245 virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, BOOL bAbsorb) throw( ::com::sun::star::uno::RuntimeException );
246 virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
247 virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
248 virtual void SAL_CALL removeTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
250 //XTextRange
251 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
252 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
253 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
254 virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
255 virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
257 //XTextRangeCompare
258 sal_Int16 SAL_CALL compareRegionStarts( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
259 sal_Int16 SAL_CALL compareRegionEnds( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
261 //XRelativeTextContentInsert
262 virtual void SAL_CALL insertTextContentBefore(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xNewContent, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xSuccessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
263 virtual void SAL_CALL insertTextContentAfter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xNewContent, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xPredecessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
265 //XRelativeTextContentRemove
266 virtual void SAL_CALL removeTextContentBefore(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xSuccessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
267 virtual void SAL_CALL removeTextContentAfter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xPredecessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
270 //XPropertySet
271 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
272 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
273 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
274 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
275 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
276 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
277 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
279 //XUnoTunnel
280 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
281 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
283 //XParagraphAppend
284 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendParagraph( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
285 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL finishParagraph( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
287 //XTextPortionAppend
288 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendTextPortion( const ::rtl::OUString& Text, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
290 //XTextContentAppend
291 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& TextContent, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
293 //XTextConvert
294 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > SAL_CALL convertToTextFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& Start, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& End, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& FrameProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
295 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextTable > SAL_CALL convertToTable( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > > > >& TableRanges,
296 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > >& CellProperties,
297 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& RowProperties,
298 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& TableProperties
299 ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
301 //XTextCopy
302 virtual void SAL_CALL copyText( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCopy >& xSource ) throw (::com::sun::star::uno::RuntimeException);
305 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException);
306 INT16 ComparePositions(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>& xPos1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>& xPos2) throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException);
307 BOOL CheckForOwnMember(const SwXTextRange* pRange1, const OTextCursorHelper* pCursor1)throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
308 virtual bool CheckForOwnMemberMeta(const SwXTextRange* const pRange,
309 const SwPaM* const pPam, bool bAbsorb)
310 throw (::com::sun::star::lang::IllegalArgumentException,
311 ::com::sun::star::uno::RuntimeException);
313 void Invalidate() {bObjectValid = sal_False;}
314 BOOL IsValid()const {return bObjectValid;}
316 CursorType GetTextType() {return eCrsrType;}
319 /* -----------------03.12.98 12:16-------------------
321 * --------------------------------------------------*/
322 enum SwGetPropertyStatesCaller
324 SW_PROPERTY_STATE_CALLER_DEFAULT,
325 SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION,
326 SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY,
327 SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT
329 #define CRSR_ATTR_MODE_TABLE 1 //attributes should be applied to a table selection
330 #define CRSR_ATTR_MODE_DONTREPLACE 2 //attributes should be added, not replaced
332 typedef cppu::WeakImplHelper12<
333 ::com::sun::star::text::XSentenceCursor,
334 ::com::sun::star::text::XWordCursor,
335 ::com::sun::star::text::XParagraphCursor,
336 ::com::sun::star::text::XRedline,
337 ::com::sun::star::beans::XPropertySet,
338 ::com::sun::star::beans::XPropertyState,
339 ::com::sun::star::document::XDocumentInsertable,
340 ::com::sun::star::lang::XServiceInfo,
341 ::com::sun::star::util::XSortable,
342 ::com::sun::star::container::XContentEnumerationAccess,
343 ::com::sun::star::container::XEnumerationAccess,
344 ::com::sun::star::beans::XMultiPropertyStates
345 > SwXTextCursor_Base;
346 class SwXTextCursor : public SwXTextCursor_Base,
347 public SwClient,
348 public OTextCursorHelper
350 SwEventListenerContainer aLstnrCntnr;
351 const SfxItemPropertySet* m_pPropSet;
352 ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
353 SwSortOptions* pLastSortOptions;
355 CursorType eType;
357 // --> FME 2006-03-07 #126177# We need to track if the RemoveCursor_Impl
358 // user event has been posted. In this case we have to remove the user
359 // event in ~SwXTextCursor().
360 ULONG mnUserEventId;
361 bool mbRemoveUserEvent;
362 // <--
364 DECL_STATIC_LINK( SwXTextCursor, RemoveCursor_Impl,
365 ::com::sun::star::uno::Reference<
366 ::com::sun::star::uno::XInterface>* );
368 protected:
369 virtual ~SwXTextCursor();
370 public:
371 void DeleteAndInsert(const String& rText, const bool bForceExpandHints);
372 SwXTextCursor(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, const SwPosition& rPos,
373 CursorType eSet, SwDoc* pDoc, const SwPosition* pMark = 0);
374 SwXTextCursor(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, SwUnoCrsr* pSourceCrsr, CursorType eSet = CURSOR_ALL);
376 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
378 DECLARE_XINTERFACE()
380 //XUnoTunnel
381 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
383 //XTextCursor - neu
384 virtual void SAL_CALL collapseToStart( ) throw(::com::sun::star::uno::RuntimeException);
385 virtual void SAL_CALL collapseToEnd( ) throw(::com::sun::star::uno::RuntimeException);
386 virtual BOOL SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException);
387 virtual BOOL SAL_CALL goLeft( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
388 virtual BOOL SAL_CALL goRight( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
389 virtual void SAL_CALL gotoStart( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
390 virtual void SAL_CALL gotoEnd( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
391 virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
393 //XWordCursor - neu
394 virtual BOOL SAL_CALL isStartOfWord( ) throw(::com::sun::star::uno::RuntimeException);
395 virtual BOOL SAL_CALL isEndOfWord( ) throw(::com::sun::star::uno::RuntimeException);
396 virtual BOOL SAL_CALL gotoNextWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
397 virtual BOOL SAL_CALL gotoPreviousWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
398 virtual BOOL SAL_CALL gotoEndOfWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
399 virtual BOOL SAL_CALL gotoStartOfWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
401 //XSentenceCursor - neu
402 virtual BOOL SAL_CALL isStartOfSentence( ) throw(::com::sun::star::uno::RuntimeException);
403 virtual BOOL SAL_CALL isEndOfSentence( ) throw(::com::sun::star::uno::RuntimeException);
404 virtual BOOL SAL_CALL gotoNextSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException);
405 virtual BOOL SAL_CALL gotoPreviousSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException);
406 virtual BOOL SAL_CALL gotoStartOfSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException);
407 virtual BOOL SAL_CALL gotoEndOfSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException);
409 //ParagraphCursor - neu
410 virtual BOOL SAL_CALL isStartOfParagraph(void) throw( ::com::sun::star::uno::RuntimeException );
411 virtual BOOL SAL_CALL isEndOfParagraph(void) throw( ::com::sun::star::uno::RuntimeException );
412 virtual BOOL SAL_CALL gotoStartOfParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException );
413 virtual BOOL SAL_CALL gotoEndOfParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException );
414 virtual BOOL SAL_CALL gotoNextParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException );
415 virtual BOOL SAL_CALL gotoPreviousParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException );
417 //XRedline
418 virtual void SAL_CALL makeRedline( const ::rtl::OUString& RedlineType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
420 //XTextRange
421 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
422 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
423 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
424 virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
425 virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
427 //XPropertySet
428 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
429 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
430 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
431 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
432 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
433 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
434 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
436 //XPropertyState
437 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
438 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
439 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
440 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
442 static void SetPropertyValue(
443 SwPaM& rPaM,
444 const SfxItemPropertySet& rPropSet,
445 const rtl::OUString& rPropertyName,
446 const ::com::sun::star::uno::Any& aValue,
447 USHORT nAttrMode = 0)
448 throw(::com::sun::star::beans::UnknownPropertyException,
449 ::com::sun::star::beans::PropertyVetoException,
450 ::com::sun::star::lang::IllegalArgumentException,
451 ::com::sun::star::lang::WrappedTargetException,
452 ::com::sun::star::uno::RuntimeException);
453 static ::com::sun::star::uno::Any GetPropertyValue( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
454 static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > GetPropertyStates( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, SwGetPropertyStatesCaller eCaller = SW_PROPERTY_STATE_CALLER_DEFAULT) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
455 static ::com::sun::star::beans::PropertyState GetPropertyState( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
456 static void SetPropertyToDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
457 static ::com::sun::star::uno::Any GetPropertyDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
459 //XDocumentInsertable - neu
460 virtual void SAL_CALL insertDocumentFromURL(const rtl::OUString& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aOptions) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
462 //XSortable - neu
463 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
464 virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException );
466 //XContentEnumerationAccess
467 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
468 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
470 //XEnumerationAccess
471 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
473 //XElementAccess
474 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
475 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
477 //XServiceInfo
478 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
479 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
480 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
482 //XMultiPropertyStates
483 //virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
484 virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
485 virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
486 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
489 //SwClient
490 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
492 virtual const SwPaM* GetPaM() const;
493 virtual SwPaM* GetPaM();
494 virtual const SwDoc* GetDoc() const;
495 virtual SwDoc* GetDoc();
496 SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();}
497 const SwUnoCrsr* GetCrsr()const{return (SwUnoCrsr*)GetRegisteredIn();}
499 static void SetCrsrAttr(SwPaM& rPam, const SfxItemSet& rSet, USHORT nAttrMode );
500 // --> OD 2006-07-12 #i63870#
501 // split third parameter <bCurrentAttrOnly> into new parameters <bOnlyTxtAttr>
502 // and <bGetFromChrFmt> to get better control about resulting <SfxItemSet>
503 // static void GetCrsrAttr(SwPaM& rPam, SfxItemSet& rSet, BOOL bCurrentAttrOnly = FALSE);
504 static void GetCrsrAttr( SwPaM& rPam,
505 SfxItemSet& rSet,
506 BOOL bOnlyTxtAttr = FALSE,
507 BOOL bGetFromChrFmt = TRUE );
508 // <--
509 static void getTextFromPam(SwPaM& aCrsr, rtl::OUString& rBuffer);
510 static SwFmtColl* GetCurTxtFmtColl(SwPaM& rPam, BOOL bConditional);
512 static void SelectPam(SwPaM& rCrsr, sal_Bool bExpand);
513 static void SetString(SwCursor& rCrsr, const rtl::OUString& rString);
515 static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
516 createSortDescriptor(sal_Bool bFromTable);
517 static sal_Bool convertSortProperties(
518 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rDescriptor,
519 SwSortOptions& rSortOpt);
521 // --> FME 2006-03-07 #126177#
522 void DoNotRemoveUserEvent() { mbRemoveUserEvent = false; }
523 // <--
525 bool IsAtEndOfMeta() const;
527 /*-----------------20.03.98 07:47-------------------
529 --------------------------------------------------*/
530 /* das wird zunaechst nicht gebraucht - bisher fuer den XPropertySetCloner
531 class SwXPropertySet : public ::com::sun::star::beans::XPropertySet,
532 public UsrObject
534 ::com::sun::star::uno::Sequence<::com::sun::star::uno::Any>* pAny;
535 ::com::sun::star::uno::Sequence< Property >* pInfo;
537 public:
538 // Eigentumsuebergang der Pointer!
539 SwXPropertySet( ::com::sun::star::uno::Sequence<::com::sun::star::uno::Any>* pAny,
540 ::com::sun::star::uno::Sequence<Property>* pInfo );
541 virtual ~SwXPropertySet();
543 SMART_UNO_DECLARATION( SwXPropertySet, UsrObject );
545 //XPropertySet
546 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
547 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
548 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
549 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
550 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
551 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
552 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
556 /*-----------------20.03.98 08:26-------------------
558 --------------------------------------------------*/
559 /* das wird zunaechst nicht gebraucht - bisher fuer den XPropertySetCloner
561 class SwXPropertySetInfo: public ::com::sun::star::beans::XPropertySetInfo, UsrObject
563 ::com::sun::star::uno::Sequence< Property >* pSeq;
565 public:
566 SwXPropertySetInfo( const ::com::sun::star::uno::Sequence<Property>& rInfo );
567 virtual ~SwXPropertySetInfo();
569 SMART_UNO_DECLARATION( SwXPropertySetInfo, UsrObject );
571 virtual ::com::sun::star::uno::Sequence< Property > getProperties(void) throw( ::com::sun::star::uno::RuntimeException );
572 virtual Property getPropertyByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
573 virtual BOOL hasPropertyByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
577 typedef ::cppu::ImplInheritanceHelper5
579 ::sfx2::MetadatableMixin,
580 ::com::sun::star::text::XTextContent,
581 ::com::sun::star::beans::XPropertySet,
582 ::com::sun::star::lang::XServiceInfo,
583 ::com::sun::star::container::XNamed,
584 ::com::sun::star::lang::XUnoTunnel
586 SwBookmarkBaseClass;
588 class SwXBookmark
589 : public SwBookmarkBaseClass
590 , private SwClient
592 private:
593 SwEventListenerContainer m_aLstnrCntnr;
594 SwDoc* m_pDoc;
595 String m_aName;
596 ::sw::mark::IMark* m_pRegisteredBookmark;
598 void registerInMark(::sw::mark::IMark* const pBkmk)
600 if(pBkmk)
601 pBkmk->Add(this);
602 else if(m_pRegisteredBookmark)
604 m_aName = m_pRegisteredBookmark->GetName();
605 m_pRegisteredBookmark->Remove(this);
607 m_pRegisteredBookmark = pBkmk;
610 protected:
611 virtual ~SwXBookmark();
612 public:
613 SwXBookmark(::sw::mark::IMark* pMark = 0, SwDoc* pDoc = 0);
615 TYPEINFO();
617 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
619 //XUnoTunnel
620 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
622 //XTextContent
623 virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
624 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
626 //XComponent
627 virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
628 virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
629 virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
631 //XNamed
632 virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
633 virtual void SAL_CALL setName(const rtl::OUString& rName) throw( ::com::sun::star::uno::RuntimeException );
635 //XServiceInfo
636 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
637 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
638 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
640 //XPropertySet
641 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
642 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
643 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
644 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
645 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
646 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
647 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
649 void attachToRangeEx(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange, IDocumentMarkAccess::MarkType eType) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
650 virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
652 //SwClient
653 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
655 // MetadatableMixin
656 virtual ::sfx2::Metadatable* GetCoreObject();
657 virtual ::com::sun::star::uno::Reference<
658 ::com::sun::star::frame::XModel > GetModel();
660 const ::sw::mark::IMark* GetBookmark() const
661 { return m_pRegisteredBookmark; }
662 ::sw::mark::IMark* GetBookmark()
663 { return m_pRegisteredBookmark; }
664 SwDoc* GetDoc()
665 { return m_pDoc; }
668 typedef cppu::ImplInheritanceHelper1< SwXBookmark, ::com::sun::star::text::XFormField > SwXFieldmark_BASE;
670 class SwXFieldmark : public SwXFieldmark_BASE
672 private:
673 bool isReplacementObject;
674 public:
675 SwXFieldmark(bool isReplacementObject, ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0);
677 virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
678 virtual ::rtl::OUString SAL_CALL getFieldType(void) throw( ::com::sun::star::uno::RuntimeException );
679 virtual void SAL_CALL setFieldType( const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException);
681 virtual ::sal_Int16 SAL_CALL getParamCount( ) throw (::com::sun::star::uno::RuntimeException);
682 virtual ::rtl::OUString SAL_CALL getParamName(::sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException );
683 virtual ::rtl::OUString SAL_CALL getParamValue(::sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException );
684 virtual void SAL_CALL addParam( const ::rtl::OUString& name, const ::rtl::OUString& value, ::sal_Bool replaceExisting ) throw (::com::sun::star::uno::RuntimeException);
687 /*-----------------23.02.98 10:45-------------------
689 --------------------------------------------------*/
691 typedef cppu::WeakAggImplHelper2
693 ::com::sun::star::container::XEnumerationAccess,
694 ::com::sun::star::lang::XServiceInfo
695 > SwXBodyTextBaseClass;
696 class SwXBodyText : public SwXBodyTextBaseClass,
697 public SwXText
699 protected:
700 virtual ~SwXBodyText();
701 public:
702 SwXBodyText(SwDoc* pDoc);
705 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
706 virtual void SAL_CALL acquire( ) throw(){OWeakObject::acquire();}
707 virtual void SAL_CALL release( ) throw(){OWeakObject::release();}
709 //XAggregation
710 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
712 //XTypeProvider
713 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
714 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
716 //XText
717 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
718 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
720 //XEnumerationAccess - frueher XParagraphEnumerationAccess
721 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
723 //XElementAccess
724 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
725 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
727 //XServiceInfo
728 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
729 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
730 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
732 ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > CreateTextCursor(BOOL bIgnoreTables = sal_False);
735 class SW_DLLPUBLIC SwXTextRange : public cppu::WeakImplHelper8
737 ::com::sun::star::text::XTextRange,
738 ::com::sun::star::lang::XUnoTunnel,
739 ::com::sun::star::lang::XServiceInfo,
740 ::com::sun::star::container::XContentEnumerationAccess,
741 ::com::sun::star::beans::XPropertySet,
742 ::com::sun::star::beans::XPropertyState,
743 ::com::sun::star::container::XEnumerationAccess,
744 ::com::sun::star::text::XRedline
745 >, private SwClient
747 friend class SwXText;
748 enum RangePosition
750 RANGE_IN_TEXT, // 'normaler' ::com::sun::star::text::TextRange
751 RANGE_IN_FRAME,// TextPosition wurde mit einem Rahmen angelegt, der kein Uno-Objekt besitzt
752 RANGE_IN_CELL, // TextPosition wurde mit einer Zelle angelegt, die kein Uno-Objekt besitzt
753 RANGE_IS_TABLE, // Anker einer Tabelle
754 RANGE_INVALID // von NewInstance erzeugt
755 } eRangePosition;
757 SwDoc* pDoc;
758 SwTableBox* pBox;
759 const SwStartNode* pBoxStartNode;
760 SwDepend aObjectDepend; //Format der Tabelle oder des Rahmens anmelden
761 const SfxItemPropertySet* m_pPropSet;
762 //SwDepend aFrameDepend;
763 ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
764 ::sw::mark::IMark* pMark;
766 void _CreateNewBookmark(SwPaM& rPam);
767 //TODO: new exception type for protected content
768 void DeleteAndInsert(const String& rText, const bool bForceExpandHints)
769 throw( ::com::sun::star::uno::RuntimeException );
770 protected:
771 virtual ~SwXTextRange();
773 public:
774 SwXTextRange(SwPaM& rPam, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > & rxParent, enum RangePosition eRange = RANGE_IN_TEXT);
775 // only for RANGE_IS_TABLE
776 SwXTextRange(SwFrmFmt& rTblFmt);
778 TYPEINFO();
780 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
782 //XUnoTunnel
783 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
785 //XTextRange
786 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
787 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
788 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
789 virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
790 virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
792 //XContentEnumerationAccess
793 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
794 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
796 //XEnumerationAccess
797 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
799 //XElementAccess
800 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
801 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
803 //XServiceInfo
804 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
805 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
806 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
808 //XPropertySet
809 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
810 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
811 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
812 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
813 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
814 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
815 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
817 //XPropertyState
818 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
819 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
820 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
821 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
823 //XRedline
824 virtual void SAL_CALL makeRedline( const ::rtl::OUString& RedlineType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
826 //SwClient
827 virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew);
828 BOOL GetPositions(SwPaM& rToFill) const;
829 const SwDoc* GetDoc() const
830 { return pDoc; }
831 SwDoc* GetDoc()
832 { return pDoc; }
833 const ::sw::mark::IMark * GetBookmark() const
834 { return pMark; }
836 static BOOL XTextRangeToSwPaM(SwUnoInternalPaM& rToFill,
837 const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange);
838 static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > CreateTextRangeFromPosition(
839 SwDoc* pDoc,
840 const SwPosition& rPos, const SwPosition* pMark);
841 static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > CreateParentXText(SwDoc* pDoc,
842 const SwPosition& rPos);
845 /* -----------------15.05.98 08:29-------------------
847 * --------------------------------------------------*/
848 typedef cppu::WeakImplHelper3
850 ::com::sun::star::container::XIndexAccess,
851 ::com::sun::star::lang::XUnoTunnel,
852 ::com::sun::star::lang::XServiceInfo
854 SwXTextRangesBaseClass;
855 class SwXTextRanges : public SwXTextRangesBaseClass,
856 public SwClient
858 XTextRangeArr* pRangeArr;
859 ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
860 XTextRangeArr* GetRangesArray();
861 SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); }
862 protected:
863 virtual ~SwXTextRanges();
864 public:
865 SwXTextRanges();
866 SwXTextRanges(SwPaM* pCrsr);
869 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
871 //XUnoTunnel
872 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier )
873 throw(::com::sun::star::uno::RuntimeException);
876 //XIndexAccess
877 virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
878 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
880 //XElementAccess
881 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
882 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
884 //XServiceInfo
885 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
886 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
887 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
889 //SwClient
890 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
891 const SwUnoCrsr* GetCursor() const { return (const SwUnoCrsr*)GetRegisteredIn(); }
894 /*-----------------09.03.98 13:57-------------------
896 --------------------------------------------------*/
898 class SwXTextSection;
899 class SwXTextSectionClient : public SwClient
901 friend class SwXTextSection;
902 SwXTextSection* m_pSection;
903 ::com::sun::star::uno::WeakReference< ::com::sun::star::text::XTextSection > m_xReference;
904 //SwClient
905 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
906 SwXTextSectionClient(
907 SwSectionFmt& rFmt,
908 SwXTextSection& rTextSection,
909 ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > xSection );
910 virtual ~SwXTextSectionClient();
911 DECL_STATIC_LINK( SwXTextSectionClient, RemoveSectionClient_Impl,
912 SwXTextSectionClient* );
914 public:
915 TYPEINFO();
916 ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > GetXTextSection();
918 static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection >
919 CreateXTextSection(SwSectionFmt* pFmt = 0, BOOL bIndexHeader = FALSE );
920 static SwXTextSectionClient* Create(
921 SwXTextSection& rSection,
922 ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > xSection,
923 SwSectionFmt& rFmt );
926 struct SwTextSectionProperties_Impl;
927 class SwXTextSection : public cppu::WeakImplHelper7
929 ::com::sun::star::text::XTextSection,
930 ::com::sun::star::beans::XPropertyState,
931 ::com::sun::star::beans::XPropertySet,
932 ::com::sun::star::beans::XMultiPropertySet,
933 ::com::sun::star::lang::XServiceInfo,
934 ::com::sun::star::container::XNamed,
935 ::com::sun::star::lang::XUnoTunnel
936 >/*,
937 public SwClient*/
939 friend class SwXTextSectionClient;
940 SwEventListenerContainer aLstnrCntnr;
941 const SfxItemPropertySet* m_pPropSet;
943 BOOL m_bIsDescriptor;
944 BOOL m_bIndexHeader;
945 String m_sName;
946 SwTextSectionProperties_Impl* pProps;
947 SwXTextSectionClient* m_pClient;
948 protected:
949 void SAL_CALL SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
950 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
952 SwXTextSection(sal_Bool bWithFormat, sal_Bool bIndexHeader = FALSE);
953 virtual ~SwXTextSection();
954 void ResetClient() {m_pClient = 0;}
955 void SetClient( SwXTextSectionClient* pClient ){m_pClient = pClient;}
957 public:
958 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
960 //XUnoTunnel
961 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
963 //XTextSection
964 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > SAL_CALL getParentSection(void) throw( ::com::sun::star::uno::RuntimeException );
965 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > > SAL_CALL getChildSections(void) throw( ::com::sun::star::uno::RuntimeException );
967 //XTextContent
968 virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
969 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
971 //XComponent
972 virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
973 virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
974 virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
976 //XMultiPropertySet
977 // virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
978 virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
979 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
980 virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
981 virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
982 virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
984 //XPropertySet
985 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
986 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
987 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
988 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
989 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
990 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
991 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
993 //XPropertyState
994 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
995 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
996 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
997 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
999 //XNamed
1000 virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
1001 virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
1003 //XServiceInfo
1004 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
1005 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
1006 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
1008 //SwClient
1009 // virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
1011 void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
1013 SwSectionFmt* GetFmt()const;
1014 static SwXTextSection* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef );
1016 /*-----------------12.02.98 08:01-------------------
1018 --------------------------------------------------*/
1019 typedef
1020 cppu::WeakImplHelper5
1022 ::com::sun::star::text::XFootnote,
1023 ::com::sun::star::lang::XServiceInfo,
1024 ::com::sun::star::container::XEnumerationAccess,
1025 ::com::sun::star::beans::XPropertySet,
1026 ::com::sun::star::lang::XUnoTunnel
1028 SwXFootnoteBaseClass;
1029 class SwXFootnote : public SwXFootnoteBaseClass,
1030 public SwXText,
1031 public SwClient
1033 friend class SwXFootnotes;
1035 SwEventListenerContainer aLstnrCntnr;
1036 const SwFmtFtn* pFmtFtn;
1037 BOOL m_bIsDescriptor;
1038 String m_sLabel;
1039 BOOL m_bIsEndnote;
1041 protected:
1042 virtual const SwStartNode *GetStartNode() const;
1043 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException);
1044 virtual ~SwXFootnote();
1045 public:
1046 SwXFootnote(BOOL bEndnote);
1047 SwXFootnote(SwDoc* pDoc, const SwFmtFtn& rFmt);
1050 TYPEINFO();
1052 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
1054 //XUnoTunnel
1055 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
1057 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
1058 virtual void SAL_CALL acquire( ) throw(){SwXFootnoteBaseClass::acquire();}
1059 virtual void SAL_CALL release( ) throw(){SwXFootnoteBaseClass::release();}
1061 //XTypeProvider
1062 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
1063 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
1065 //XFootnote
1066 virtual rtl::OUString SAL_CALL getLabel(void) throw( ::com::sun::star::uno::RuntimeException );
1067 virtual void SAL_CALL setLabel(const rtl::OUString& aLabel) throw( ::com::sun::star::uno::RuntimeException );
1069 //XTextContent
1070 virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
1071 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
1073 //XComponent
1074 virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
1075 virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
1076 virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
1078 //XText
1079 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
1080 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
1082 //XEnumerationAccess - frueher XParagraphEnumerationAccess
1083 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
1085 //XElementAccess
1086 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
1087 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
1089 //XServiceInfo
1090 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
1091 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
1092 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
1094 //XPropertySet
1095 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
1096 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1097 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1098 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1099 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1100 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1101 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1103 //SwClient
1104 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
1106 void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
1108 const SwFmtFtn* FindFmt() const {return GetDoc() ? pFmtFtn : 0;}
1109 void Invalidate();
1112 /*-----------------07.04.98 08:10-------------------
1114 --------------------------------------------------*/
1115 class SwXParagraphEnumeration : public SwSimpleEnumerationBaseClass,
1116 public SwClient
1118 ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
1119 ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xNextPara;
1121 const SwTable * pOwnTable;
1122 const SwStartNode * pOwnStartNode; // start node of the cell the enumeration
1123 // belongs to.
1124 // Used to restrict the movement of the
1125 // UNO cursor to the cell and its
1126 // embedded tables.
1127 sal_Int32 nFirstParaStart;
1128 sal_Int32 nLastParaEnd;
1129 ULONG nEndIndex;
1130 CursorType eCursorType;
1131 BOOL bFirstParagraph;
1133 SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();}
1135 protected:
1136 virtual ~SwXParagraphEnumeration();
1137 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > SAL_CALL NextElement_Impl(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
1139 public:
1140 SwXParagraphEnumeration(SwXText* pParent, SwPosition& rPos, CursorType eType);
1141 SwXParagraphEnumeration(SwXText* pParent, SwUnoCrsr* pCrsr, CursorType eType);
1145 //XEnumeration
1146 virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
1147 virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
1149 //XServiceInfo
1150 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
1151 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
1152 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
1154 //SwClient
1155 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
1157 //non-Uno functions
1159 void SetOwnTable( const SwTable* pTable ) { pOwnTable = pTable; }
1160 const SwTable* GetOwnTable() const { return pOwnTable; }
1161 void SetOwnStartNode( const SwStartNode* pNode ) { pOwnStartNode = pNode; }
1162 const SwStartNode* GetOwnStartNode() const { return pOwnStartNode; }
1164 /*-----------------07.04.98 08:15-------------------
1166 --------------------------------------------------*/
1167 class SwXParagraph : public cppu::ImplInheritanceHelper10
1169 ::sfx2::MetadatableMixin,
1170 ::com::sun::star::beans::XTolerantMultiPropertySet,
1171 ::com::sun::star::beans::XMultiPropertySet,
1172 ::com::sun::star::text::XTextRange,
1173 ::com::sun::star::beans::XPropertySet,
1174 ::com::sun::star::lang::XServiceInfo,
1175 ::com::sun::star::lang::XUnoTunnel,
1176 ::com::sun::star::beans::XPropertyState,
1177 ::com::sun::star::container::XEnumerationAccess,
1178 ::com::sun::star::text::XTextContent,
1179 ::com::sun::star::container::XContentEnumerationAccess
1181 public SwClient
1183 ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
1184 SwEventListenerContainer aLstnrCntnr;
1185 const SfxItemPropertySet* m_pPropSet;
1186 rtl::OUString m_sText;
1187 sal_Int32 nSelectionStartPos;
1188 sal_Int32 nSelectionEndPos;
1189 BOOL m_bIsDescriptor;
1192 protected:
1193 void SAL_CALL SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1194 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1196 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL GetPropertyValuesTolerant_Impl(
1197 const ::com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames,
1198 sal_Bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException);
1200 virtual ~SwXParagraph();
1201 public:
1202 SwXParagraph();
1203 SwXParagraph(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const & i_xParent, SwTxtNode * i_pTxtNode, sal_Int32 nSelStart = -1, sal_Int32 nSelEnd = - 1);
1205 TYPEINFO();
1207 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
1209 //XUnoTunnel
1210 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
1212 //XTolerantMultiPropertySet
1213 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL setPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
1214 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
1215 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
1217 //XMultiPropertySet
1218 // virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
1219 virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1220 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
1221 virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
1222 virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
1223 virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
1225 //XPropertySet
1226 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
1227 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1228 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1229 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1230 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1231 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1232 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1234 //XPropertyState
1235 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
1236 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
1237 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
1238 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1240 //XTextContent
1241 virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
1242 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
1244 //XComponent
1245 virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
1246 virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
1247 virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
1249 //XEnumerationAccess - war XTextPortionEnumerationAccess
1250 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
1252 //XElementAccess
1253 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
1254 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
1256 //XTextRange
1257 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
1258 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
1259 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
1260 virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
1261 virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
1263 //XServiceInfo
1264 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
1265 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
1266 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
1268 //XContentEnumerationAccess
1269 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
1270 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
1272 //MetadatableMixin
1273 virtual ::sfx2::Metadatable* GetCoreObject();
1274 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
1275 GetModel();
1277 //SwClient
1278 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
1280 BOOL IsDescriptor() const {return m_bIsDescriptor;}
1282 const SwTxtNode * GetTxtNode() const;
1283 SwTxtNode * GetTxtNode();
1285 static BOOL getDefaultTextContentValue(::com::sun::star::uno::Any& rAny,
1286 const rtl::OUString& rPropertyName, USHORT nWID = 0);
1287 static SwXParagraph* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef );
1288 //falls es mal als Service erzeugt werden kann
1289 //void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
1290 void attachToText(SwXText* pParent, SwUnoCrsr* pCrsr);
1292 /* -----------------23.03.99 12:57-------------------
1294 * --------------------------------------------------*/
1295 #define PARAFRAME_PORTION_PARAGRAPH 0
1296 #define PARAFRAME_PORTION_CHAR 1
1297 #define PARAFRAME_PORTION_TEXTRANGE 2
1299 class SwXParaFrameEnumeration : public cppu::WeakImplHelper2
1301 ::com::sun::star::container::XEnumeration,
1302 ::com::sun::star::lang::XServiceInfo
1304 public SwClient
1306 ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
1307 m_xNextObject; // created by hasMoreElements
1308 FrameDependList_t m_Frames;
1310 SwUnoCrsr* GetCursor() const
1311 {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));}
1313 public:
1314 SwXParaFrameEnumeration(const SwPaM& rPaM,
1315 sal_uInt8 nParaFrameMode, SwFrmFmt* pFmt = 0);
1316 ~SwXParaFrameEnumeration();
1318 // XEnumeration
1319 virtual sal_Bool SAL_CALL hasMoreElements()
1320 throw( ::com::sun::star::uno::RuntimeException );
1321 virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
1322 throw( ::com::sun::star::container::NoSuchElementException,
1323 ::com::sun::star::lang::WrappedTargetException,
1324 ::com::sun::star::uno::RuntimeException );
1326 // XServiceInfo
1327 virtual rtl::OUString SAL_CALL getImplementationName()
1328 throw( ::com::sun::star::uno::RuntimeException );
1329 virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
1330 throw( ::com::sun::star::uno::RuntimeException );
1331 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
1332 getSupportedServiceNames()
1333 throw( ::com::sun::star::uno::RuntimeException );
1335 //SwClient
1336 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
1340 /* -----------------29.09.98 09:01-------------------
1342 * --------------------------------------------------*/
1343 /* os: 04.12.98 11:40 hier gibt es noch keine sinnvolle Definition
1344 #define MAX_SORT_FIELDS 3 // das ist eher willkuerlich (wie im Dialog)
1345 class SwXTextSortDescriptor : public XTextSortDescriptor,
1346 public UsrObject
1348 SwSortOptions aSortOptions;
1349 BOOL bUseHeader;
1350 public:
1351 SwXTextSortDescriptor(BOOL bUsedInTable);
1352 virtual ~SwXTextSortDescriptor();
1354 //XTextSortDescriptor
1355 virtual sal_Unicode getTextColumnSeparator(void) const;
1356 virtual void setTextColumnSeparator(sal_Unicode TextColumnSeparator_);
1358 //XSortDescriptor
1359 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::SortField > getSortFields(void) const;
1360 virtual void setSortFields(const ::com::sun::star::uno::Sequence< ::com::sun::star::util::SortField >& SortFields_);
1361 virtual sal_uInt16 getMaxFieldCount(void) const;
1362 virtual ColumnsOrRows getOrientation(void) const;
1363 virtual void setOrientation(ColumnsOrRows Orientation_);
1364 virtual BOOL getUseHeader(void) const;
1365 virtual void setUseHeader(BOOL UseHeader_);
1367 const SwSortOptions& GetSortOptions() const {return aSortOptions;}
1368 void SetSortOptions(const SwSortOptions& rSortOpt);
1371 /* -----------------25.08.98 11:02-------------------
1373 * --------------------------------------------------*/
1374 typedef
1375 cppu::WeakImplHelper2
1377 ::com::sun::star::lang::XServiceInfo,
1378 ::com::sun::star::container::XEnumerationAccess
1380 SwXHeadFootTextBaseClass;
1381 class SwXHeadFootText : public SwXHeadFootTextBaseClass,
1382 public SwXText,
1383 public SwClient
1385 SwFrmFmt* GetFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
1386 BOOL bIsHeader;
1387 protected:
1388 virtual const SwStartNode *GetStartNode() const;
1389 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException);
1390 public:
1391 SwXHeadFootText(SwFrmFmt& rHeadFootFmt, BOOL bHeader);
1392 ~SwXHeadFootText();
1394 TYPEINFO();
1396 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
1397 virtual void SAL_CALL acquire( ) throw(){SwXHeadFootTextBaseClass::acquire();}
1398 virtual void SAL_CALL release( ) throw(){SwXHeadFootTextBaseClass::release();}
1400 //XTypeProvider
1401 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
1402 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
1404 //XText
1405 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
1406 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
1408 //XServiceInfo
1409 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
1410 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
1411 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
1413 //XEnumerationAccess - frueher XParagraphEnumerationAccess
1414 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
1416 //XElementAccess
1417 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
1418 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
1420 //SwClient
1421 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
1423 /* -----------------27.08.98 15:11-------------------
1425 * --------------------------------------------------*/
1426 typedef ::cppu::WeakImplHelper5
1428 ::com::sun::star::text::XTextContent,
1429 ::com::sun::star::beans::XPropertySet,
1430 ::com::sun::star::lang::XServiceInfo,
1431 ::com::sun::star::container::XNamed,
1432 ::com::sun::star::lang::XUnoTunnel
1434 SwRefMarkBaseClass;
1436 class SwXReferenceMark : public SwRefMarkBaseClass,
1437 public SwClient
1439 SwEventListenerContainer aLstnrCntnr;
1440 SwDoc* pDoc;
1441 const SwFmtRefMark* pMark;
1442 String sMarkName;
1443 BOOL m_bIsDescriptor;
1445 BOOL IsValid() const {return 0 != GetRegisteredIn();}
1446 void InsertRefMark( SwPaM& rPam, SwXTextCursor * pCursor );
1447 public:
1448 SwXReferenceMark(SwDoc* pDoc, const SwFmtRefMark* pMark);
1449 ~SwXReferenceMark();
1451 TYPEINFO();
1453 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
1455 //XUnoTunnel
1456 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
1458 //XTextContent
1459 virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
1460 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
1462 //XComponent
1463 virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
1464 virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
1465 virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
1467 //XNamed
1468 virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
1469 virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
1471 //XServiceInfo
1472 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
1473 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
1474 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
1476 //XPropertySet
1477 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
1478 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1479 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1480 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1481 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1482 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1483 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
1485 //SwClient
1486 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
1488 void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
1490 const SwFmtRefMark* GetMark()const {return pMark;}
1491 const String& GetMarkName() const {return sMarkName;}
1492 SwDoc* GetDoc() const{return pDoc;}
1493 void Invalidate();
1495 #endif