Update to m13
[ooovba.git] / sw / inc / unocoll.hxx
blob2c6bd02f116817ce304094eaa0b202c884325e6d
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: unocoll.hxx,v $
10 * $Revision: 1.26 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _UNOCOLL_HXX
31 #define _UNOCOLL_HXX
32 #include <tools/solar.h>
33 #include <flyenum.hxx>
34 #include <vcl/timer.hxx>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/container/XNameAccess.hpp>
37 #include <com/sun/star/container/XIndexAccess.hpp>
38 #include <tools/string.hxx>
39 #include <cppuhelper/implbase1.hxx> // helper for implementations
40 #include <cppuhelper/implbase2.hxx> // helper for implementations
41 #include <cppuhelper/implbase3.hxx> // helper for implementations
42 #include <cppuhelper/implbase4.hxx> // helper for implementations
43 #include "swdllapi.h"
44 /***************************************************
45 ***************************************************
47 ***************************************************/
48 class SwDoc;
49 class SwFrmFmt;
50 namespace com{namespace sun {namespace star {namespace text
52 class XTextTable;
53 class XTextSection;
54 class XFootnote;
55 }}}}
56 class SwXFrame;
57 class SwFrmFmt;
58 class SwFmtFtn;
59 class XBookmark;
60 class SwXReferenceMark;
61 class SwSectionFmt;
62 class SwBookmark;
63 class SwFmtRefMark;
64 class SwXReferenceMark;
65 class SwXBookmark;
66 /*-----------------11.03.98 11:19-------------------
68 --------------------------------------------------*/
69 class SwUnoCollection
71 SwDoc* pDoc;
72 sal_Bool bObjectValid;
74 public:
75 SwUnoCollection(SwDoc* p) :
76 pDoc(p),
77 bObjectValid(sal_True){}
79 virtual void Invalidate();
80 sal_Bool IsValid() const {return bObjectValid;}
83 SwDoc* GetDoc() const {return pDoc;}
86 /******************************************************************************
88 ******************************************************************************/
89 #define SW_SERVICE_TYPE_TEXTTABLE 0
90 #define SW_SERVICE_TYPE_TEXTFRAME 1
91 #define SW_SERVICE_TYPE_GRAPHIC 2
92 #define SW_SERVICE_TYPE_OLE 3
93 #define SW_SERVICE_TYPE_BOOKMARK 4
94 #define SW_SERVICE_TYPE_FOOTNOTE 5
95 #define SW_SERVICE_TYPE_ENDNOTE 6
96 #define SW_SERVICE_TYPE_INDEXMARK 7
97 #define SW_SERVICE_TYPE_INDEX 8
98 #define SW_SERVICE_REFERENCE_MARK 9
99 #define SW_SERVICE_STYLE_CHARACTER_STYLE 10
100 #define SW_SERVICE_STYLE_PARAGRAPH_STYLE 11
101 #define SW_SERVICE_STYLE_FRAME_STYLE 12
102 #define SW_SERVICE_STYLE_PAGE_STYLE 13
103 #define SW_SERVICE_STYLE_NUMBERING_STYLE 14
104 #define SW_SERVICE_CONTENT_INDEX_MARK 15
105 #define SW_SERVICE_CONTENT_INDEX 16
106 #define SW_SERVICE_USER_INDEX_MARK 17
107 #define SW_SERVICE_USER_INDEX 18
108 #define SW_SERVICE_TEXT_SECTION 19
109 #define SW_SERVICE_FIELDTYPE_DATETIME 20
110 #define SW_SERVICE_FIELDTYPE_USER 21
111 #define SW_SERVICE_FIELDTYPE_SET_EXP 22
112 #define SW_SERVICE_FIELDTYPE_GET_EXP 23
113 #define SW_SERVICE_FIELDTYPE_FILE_NAME 24
114 #define SW_SERVICE_FIELDTYPE_PAGE_NUM 25
115 #define SW_SERVICE_FIELDTYPE_AUTHOR 26
116 #define SW_SERVICE_FIELDTYPE_CHAPTER 27
117 #define SW_SERVICE_FIELDTYPE_DUMMY_0 28
118 #define SW_SERVICE_FIELDTYPE_GET_REFERENCE 29
119 #define SW_SERVICE_FIELDTYPE_CONDITIONED_TEXT 30
120 #define SW_SERVICE_FIELDTYPE_ANNOTATION 31
121 #define SW_SERVICE_FIELDTYPE_INPUT 32
122 #define SW_SERVICE_FIELDTYPE_MACRO 33
123 #define SW_SERVICE_FIELDTYPE_DDE 34
124 #define SW_SERVICE_FIELDTYPE_HIDDEN_PARA 35
125 #define SW_SERVICE_FIELDTYPE_DOC_INFO 36
126 #define SW_SERVICE_FIELDTYPE_TEMPLATE_NAME 37
127 #define SW_SERVICE_FIELDTYPE_USER_EXT 38
128 #define SW_SERVICE_FIELDTYPE_REF_PAGE_SET 39
129 #define SW_SERVICE_FIELDTYPE_REF_PAGE_GET 40
130 #define SW_SERVICE_FIELDTYPE_JUMP_EDIT 41
131 #define SW_SERVICE_FIELDTYPE_SCRIPT 42
132 #define SW_SERVICE_FIELDTYPE_DATABASE_NEXT_SET 43
133 #define SW_SERVICE_FIELDTYPE_DATABASE_NUM_SET 44
134 #define SW_SERVICE_FIELDTYPE_DATABASE_SET_NUM 45
135 #define SW_SERVICE_FIELDTYPE_DATABASE 46
136 #define SW_SERVICE_FIELDTYPE_DATABASE_NAME 47
137 #define SW_SERVICE_FIELDTYPE_TABLE_FORMULA 48
138 #define SW_SERVICE_FIELDTYPE_PAGE_COUNT 49
139 #define SW_SERVICE_FIELDTYPE_PARAGRAPH_COUNT 50
140 #define SW_SERVICE_FIELDTYPE_WORD_COUNT 51
141 #define SW_SERVICE_FIELDTYPE_CHARACTER_COUNT 52
142 #define SW_SERVICE_FIELDTYPE_TABLE_COUNT 53
143 #define SW_SERVICE_FIELDTYPE_GRAPHIC_OBJECT_COUNT 54
144 #define SW_SERVICE_FIELDTYPE_EMBEDDED_OBJECT_COUNT 55
145 #define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_AUTHOR 56
146 #define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_DATE_TIME 57
147 #define SW_SERVICE_FIELDTYPE_DOCINFO_EDIT_TIME 58
148 #define SW_SERVICE_FIELDTYPE_DOCINFO_DESCRIPTION 59
149 #define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_AUTHOR 60
150 #define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_DATE_TIME 61
151 #define SW_SERVICE_FIELDTYPE_DUMMY_O 62
152 #define SW_SERVICE_FIELDTYPE_DUMMY_1 63
153 #define SW_SERVICE_FIELDTYPE_DUMMY_2 64
154 #define SW_SERVICE_FIELDTYPE_DUMMY_3 65
155 #define SW_SERVICE_FIELDTYPE_DOCINFO_CUSTOM 66
156 #define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_AUTHOR 67
157 #define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_DATE_TIME 68
158 #define SW_SERVICE_FIELDTYPE_DOCINFO_KEY_WORDS 69
159 #define SW_SERVICE_FIELDTYPE_DOCINFO_SUBJECT 70
160 #define SW_SERVICE_FIELDTYPE_DOCINFO_TITLE 71
161 #define SW_SERVICE_FIELDTYPE_DOCINFO_REVISION 72
162 #define SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY 73
163 #define SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS 74
164 #define SW_SERVICE_FIELDTYPE_DROPDOWN 75
165 #define SW_SERVICE_FIELDTYPE_DUMMY_4 76
166 #define SW_SERVICE_FIELDTYPE_DUMMY_5 77
167 #define SW_SERVICE_FIELDTYPE_DUMMY_6 78
168 #define SW_SERVICE_FIELDTYPE_DUMMY_7 79
169 #define SW_SERVICE_FIELDTYPE_DUMMY_8 80
170 #define SW_SERVICE_FIELDMASTER_USER 81
171 #define SW_SERVICE_FIELDMASTER_DDE 82
172 #define SW_SERVICE_FIELDMASTER_SET_EXP 83
173 #define SW_SERVICE_FIELDMASTER_DATABASE 84
174 #define SW_SERVICE_FIELDMASTER_BIBLIOGRAPHY 85
175 #define SW_SERVICE_FIELDMASTER_DUMMY2 86
176 #define SW_SERVICE_FIELDMASTER_DUMMY3 87
177 #define SW_SERVICE_FIELDMASTER_DUMMY4 88
178 #define SW_SERVICE_FIELDMASTER_DUMMY5 89
179 #define SW_SERVICE_INDEX_ILLUSTRATIONS 90
180 #define SW_SERVICE_INDEX_OBJECTS 91
181 #define SW_SERVICE_INDEX_TABLES 92
182 #define SW_SERVICE_INDEX_BIBLIOGRAPHY 93
183 #define SW_SERVICE_PARAGRAPH 94
184 #define SW_SERVICE_FIELDTYPE_INPUT_USER 95
185 #define SW_SERVICE_FIELDTYPE_HIDDEN_TEXT 96
186 #define SW_SERVICE_STYLE_CONDITIONAL_PARAGRAPH_STYLE 97
187 #define SW_SERVICE_NUMBERING_RULES 98
188 #define SW_SERVICE_TEXT_COLUMNS 99
189 #define SW_SERVICE_INDEX_HEADER_SECTION 100
190 #define SW_SERVICE_DEFAULTS 101
191 #define SW_SERVICE_IMAP_RECTANGLE 102
192 #define SW_SERVICE_IMAP_CIRCLE 103
193 #define SW_SERVICE_IMAP_POLYGON 104
194 #define SW_SERVICE_TYPE_TEXT_GRAPHIC 105
195 #define SW_SERVICE_CHART2_DATA_PROVIDER 106
196 #define SW_SERVICE_TYPE_FIELDMARK 107
197 #define SW_SERVICE_TYPE_FORMFIELDMARK 108
198 #define SW_SERVICE_VBAOBJECTPROVIDER 109
199 #define SW_SERVICE_VBACODENAMEPROVIDER 110
200 #define SW_SERVICE_VBAPROJECTNAMEPROVIDER 111
202 #define SW_SERVICE_LAST SW_SERVICE_VBAPROJECTNAMEPROVIDER
204 #define SW_SERVICE_INVALID USHRT_MAX
207 // case-corrected versions of service-names (see #i67811)
209 #define CSS_TEXT_TEXTFIELD_DATE_TIME "com.sun.star.text.textfield.DateTime"
210 #define CSS_TEXT_TEXTFIELD_USER "com.sun.star.text.textfield.User"
211 #define CSS_TEXT_TEXTFIELD_SET_EXPRESSION "com.sun.star.text.textfield.SetExpression"
212 #define CSS_TEXT_TEXTFIELD_GET_EXPRESSION "com.sun.star.text.textfield.GetExpression"
213 #define CSS_TEXT_TEXTFIELD_FILE_NAME "com.sun.star.text.textfield.FileName"
214 #define CSS_TEXT_TEXTFIELD_PAGE_NUMBER "com.sun.star.text.textfield.PageNumber"
215 #define CSS_TEXT_TEXTFIELD_AUTHOR "com.sun.star.text.textfield.Author"
216 #define CSS_TEXT_TEXTFIELD_CHAPTER "com.sun.star.text.textfield.Chapter"
217 #define CSS_TEXT_TEXTFIELD_GET_REFERENCE "com.sun.star.text.textfield.GetReference"
218 #define CSS_TEXT_TEXTFIELD_CONDITIONAL_TEXT "com.sun.star.text.textfield.ConditionalText"
219 #define CSS_TEXT_TEXTFIELD_ANNOTATION "com.sun.star.text.textfield.Annotation"
220 #define CSS_TEXT_TEXTFIELD_INPUT "com.sun.star.text.textfield.Input"
221 #define CSS_TEXT_TEXTFIELD_MACRO "com.sun.star.text.textfield.Macro"
222 #define CSS_TEXT_TEXTFIELD_DDE "com.sun.star.text.textfield.DDE"
223 #define CSS_TEXT_TEXTFIELD_HIDDEN_PARAGRAPH "com.sun.star.text.textfield.HiddenParagraph"
224 #define CSS_TEXT_TEXTFIELD_TEMPLATE_NAME "com.sun.star.text.textfield.TemplateName"
225 #define CSS_TEXT_TEXTFIELD_EXTENDED_USER "com.sun.star.text.textfield.ExtendedUser"
226 #define CSS_TEXT_TEXTFIELD_REFERENCE_PAGE_SET "com.sun.star.text.textfield.ReferencePageSet"
227 #define CSS_TEXT_TEXTFIELD_REFERENCE_PAGE_GET "com.sun.star.text.textfield.ReferencePageGet"
228 #define CSS_TEXT_TEXTFIELD_JUMP_EDIT "com.sun.star.text.textfield.JumpEdit"
229 #define CSS_TEXT_TEXTFIELD_SCRIPT "com.sun.star.text.textfield.Script"
230 #define CSS_TEXT_TEXTFIELD_DATABASE_NEXT_SET "com.sun.star.text.textfield.DatabaseNextSet"
231 #define CSS_TEXT_TEXTFIELD_DATABASE_NUMBER_OF_SET "com.sun.star.text.textfield.DatabaseNumberOfSet"
232 #define CSS_TEXT_TEXTFIELD_DATABASE_SET_NUMBER "com.sun.star.text.textfield.DatabaseSetNumber"
233 #define CSS_TEXT_TEXTFIELD_DATABASE "com.sun.star.text.textfield.Database"
234 #define CSS_TEXT_TEXTFIELD_DATABASE_NAME "com.sun.star.text.textfield.DatabaseName"
235 #define CSS_TEXT_TEXTFIELD_TABLE_FORMULA "com.sun.star.text.textfield.TableFormula"
236 #define CSS_TEXT_TEXTFIELD_PAGE_COUNT "com.sun.star.text.textfield.PageCount"
237 #define CSS_TEXT_TEXTFIELD_PARAGRAPH_COUNT "com.sun.star.text.textfield.ParagraphCount"
238 #define CSS_TEXT_TEXTFIELD_WORD_COUNT "com.sun.star.text.textfield.WordCount"
239 #define CSS_TEXT_TEXTFIELD_CHARACTER_COUNT "com.sun.star.text.textfield.CharacterCount"
240 #define CSS_TEXT_TEXTFIELD_TABLE_COUNT "com.sun.star.text.textfield.TableCount"
241 #define CSS_TEXT_TEXTFIELD_GRAPHIC_OBJECT_COUNT "com.sun.star.text.textfield.GraphicObjectCount"
242 #define CSS_TEXT_TEXTFIELD_EMBEDDED_OBJECT_COUNT "com.sun.star.text.textfield.EmbeddedObjectCount"
243 #define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_AUTHOR "com.sun.star.text.textfield.docinfo.ChangeAuthor"
244 #define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_DATE_TIME "com.sun.star.text.textfield.docinfo.ChangeDateTime"
245 #define CSS_TEXT_TEXTFIELD_DOCINFO_EDIT_TIME "com.sun.star.text.textfield.docinfo.EditTime"
246 #define CSS_TEXT_TEXTFIELD_DOCINFO_DESCRIPTION "com.sun.star.text.textfield.docinfo.Description"
247 #define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_AUTHOR "com.sun.star.text.textfield.docinfo.CreateAuthor"
248 #define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_DATE_TIME "com.sun.star.text.textfield.docinfo.CreateDateTime"
249 #define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_AUTHOR "com.sun.star.text.textfield.docinfo.PrintAuthor"
250 #define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_DATE_TIME "com.sun.star.text.textfield.docinfo.PrintDateTime"
251 #define CSS_TEXT_TEXTFIELD_DOCINFO_KEY_WORDS "com.sun.star.text.textfield.docinfo.KeyWords"
252 #define CSS_TEXT_TEXTFIELD_DOCINFO_SUBJECT "com.sun.star.text.textfield.docinfo.Subject"
253 #define CSS_TEXT_TEXTFIELD_DOCINFO_TITLE "com.sun.star.text.textfield.docinfo.Title"
254 #define CSS_TEXT_TEXTFIELD_DOCINFO_REVISION "com.sun.star.text.textfield.docinfo.Revision"
255 #define CSS_TEXT_TEXTFIELD_DOCINFO_CUSTOM "com.sun.star.text.textfield.docinfo.Custom"
256 #define CSS_TEXT_TEXTFIELD_BIBLIOGRAPHY "com.sun.star.text.textfield.Bibliography"
257 #define CSS_TEXT_TEXTFIELD_COMBINED_CHARACTERS "com.sun.star.text.textfield.CombinedCharacters"
258 #define CSS_TEXT_TEXTFIELD_DROP_DOWN "com.sun.star.text.textfield.DropDown"
259 #define CSS_TEXT_TEXTFIELD_INPUT_USER "com.sun.star.text.textfield.InputUser"
260 #define CSS_TEXT_TEXTFIELD_HIDDEN_TEXT "com.sun.star.text.textfield.HiddenText"
261 #define CSS_TEXT_FIELDMASTER_USER "com.sun.star.text.fieldmaster.User"
262 #define CSS_TEXT_FIELDMASTER_DDE "com.sun.star.text.fieldmaster.DDE"
263 #define CSS_TEXT_FIELDMASTER_SET_EXPRESSION "com.sun.star.text.fieldmaster.SetExpression"
264 #define CSS_TEXT_FIELDMASTER_DATABASE "com.sun.star.text.fieldmaster.Database"
265 #define CSS_TEXT_FIELDMASTER_BIBLIOGRAPHY "com.sun.star.text.fieldmaster.Bibliography"
268 class SwXServiceProvider
270 public:
271 static rtl::OUString GetProviderName(sal_uInt16 nObjectType);
272 static sal_uInt16 GetProviderType(const rtl::OUString& rServiceName);
273 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > MakeInstance(sal_uInt16 nObjectType, SwDoc* pDoc);
274 static ::com::sun::star::uno::Sequence<rtl::OUString> GetAllServiceNames();
277 /*-----------------11.12.97 09:38-------------------
279 --------------------------------------------------*/
280 typedef
281 cppu::WeakImplHelper3
283 ::com::sun::star::container::XNameAccess,
284 ::com::sun::star::container::XIndexAccess,
285 ::com::sun::star::lang::XServiceInfo
287 SwCollectionBaseClass;
288 class SW_DLLPUBLIC SwXTextTables : public SwCollectionBaseClass,
289 public SwUnoCollection
291 protected:
292 virtual ~SwXTextTables();
293 public:
294 SwXTextTables(SwDoc* pDoc);
297 //XIndexAccess
298 virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
299 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 );
301 //XNameAccess
302 virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
303 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
304 virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
306 //XElementAccess
307 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
308 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
310 //XServiceInfo
311 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
312 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
313 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
315 static ::com::sun::star::text::XTextTable* GetObject( SwFrmFmt& rFmt );
318 /*-----------------11.12.97 10:14-------------------
320 --------------------------------------------------*/
321 class SwXFrames : public SwCollectionBaseClass,
322 public SwUnoCollection
324 const FlyCntType eType;
325 protected:
326 virtual ~SwXFrames();
327 public:
328 SwXFrames(SwDoc* pDoc, FlyCntType eSet);
330 //XIndexAccess
331 virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
332 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 );
334 //XNameAccess
335 virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
336 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
337 virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
339 //XElementAccess
340 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
341 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
343 //XServiceInfo
344 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
345 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
346 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
348 FlyCntType GetType()const{return eType;}
349 static SwXFrame* GetObject( SwFrmFmt& rFmt, FlyCntType eType );
353 /*-----------------20.02.98 10:51-------------------
355 --------------------------------------------------*/
356 class SwXTextFrames : public SwXFrames
358 protected:
359 virtual ~SwXTextFrames();
360 public:
361 SwXTextFrames(SwDoc* pDoc);
364 // SMART_UNO_DECLARATION( SwXTextFrames, UsrObject );
366 //XServiceInfo
367 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
368 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
369 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
373 /*-----------------20.02.98 10:55-------------------
375 --------------------------------------------------*/
376 class SwXTextGraphicObjects : public SwXFrames
378 protected:
379 virtual ~SwXTextGraphicObjects();
380 public:
381 SwXTextGraphicObjects(SwDoc* pDoc);
384 // SMART_UNO_DECLARATION( SwXTextGraphicObjects, UsrObject );
386 //XServiceInfo
387 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
388 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
389 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
393 /*-----------------20.02.98 10:57-------------------
395 --------------------------------------------------*/
396 class SwXTextEmbeddedObjects : public SwXFrames
398 protected:
399 virtual ~SwXTextEmbeddedObjects();
400 public:
401 SwXTextEmbeddedObjects(SwDoc* pDoc);
404 // SMART_UNO_DECLARATION( SwXTextEmbeddedObjects, UsrObject );
406 //XServiceInfo
407 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
408 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
409 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
413 /*-----------------12.02.98 07:58-------------------
415 --------------------------------------------------*/
416 class SwXTextSections : public SwCollectionBaseClass,
417 public SwUnoCollection
419 protected:
420 virtual ~SwXTextSections();
421 public:
422 SwXTextSections(SwDoc* pDoc);
425 //XIndexAccess
426 virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
427 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 );
429 //XNameAccess
430 virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
431 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
432 virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
434 //XElementAccess
435 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
436 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
438 //XServiceInfo
439 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
440 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
441 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
443 static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection> GetObject( SwSectionFmt& rFmt );
445 /*-----------------12.02.98 07:51-------------------
447 --------------------------------------------------*/
448 class SwXBookmarks : public SwCollectionBaseClass,
449 public SwUnoCollection
451 protected:
452 virtual ~SwXBookmarks();
453 public:
454 SwXBookmarks(SwDoc* pDoc);
457 //XIndexAccess
458 virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
459 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 );
461 //XNameAccess
462 virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
463 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
464 virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
466 //XElementAccess
467 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
468 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
470 //XServiceInfo
471 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
472 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
473 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
475 static SwXBookmark* GetObject( SwBookmark& rBkm, SwDoc* pDoc );
478 class SwXNumberingRulesCollection : public cppu::WeakImplHelper1
480 ::com::sun::star::container::XIndexAccess
482 public SwUnoCollection
484 protected:
485 virtual ~SwXNumberingRulesCollection();
487 public:
488 SwXNumberingRulesCollection( SwDoc* pDoc );
490 //XIndexAccess
491 virtual sal_Int32 SAL_CALL SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
492 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 );
494 //XElementAccess
495 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
496 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
499 /*-----------------12.02.98 08:01-------------------
501 --------------------------------------------------*/
503 typedef
504 cppu::WeakImplHelper2
506 ::com::sun::star::container::XIndexAccess,
507 ::com::sun::star::lang::XServiceInfo
509 SwSimpleIndexAccessBaseClass;
511 class SwXFootnotes : public SwSimpleIndexAccessBaseClass,
512 public SwUnoCollection
514 sal_Bool bEndnote;
515 protected:
516 virtual ~SwXFootnotes();
517 public:
518 SwXFootnotes(sal_Bool bEnd, SwDoc* pDoc);
520 //XIndexAccess
521 virtual sal_Int32 SAL_CALL SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
522 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 );
524 //XElementAccess
525 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
526 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
528 //XServiceInfo
529 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
530 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
531 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
533 static ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote> GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt );
536 /* -----------------27.08.98 13:10-------------------
538 * --------------------------------------------------*/
539 class SwXReferenceMarks : public SwCollectionBaseClass,
540 public SwUnoCollection
542 protected:
543 virtual ~SwXReferenceMarks();
544 public:
545 SwXReferenceMarks(SwDoc* pDoc);
548 //XIndexAccess
549 virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
550 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 );
552 //XNameAccess
553 virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
554 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
555 virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
557 //XElementAccess
558 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
559 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
561 //XServiceInfo
562 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
563 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
564 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
566 static SwXReferenceMark* GetObject( SwDoc* pDoc, const SwFmtRefMark* pMark );
569 #endif