xref: /AOO41X/main/sw/inc/unocoll.hxx (revision 1d2dbeb0b7301723c6d13094e87a8714ef81a328)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _UNOCOLL_HXX
24 #define _UNOCOLL_HXX
25 #include <tools/solar.h>
26 #include <flyenum.hxx>
27 #include <vcl/timer.hxx>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/container/XEnumerationAccess.hpp>
30 #include <com/sun/star/container/XNameAccess.hpp>
31 #include <com/sun/star/container/XIndexAccess.hpp>
32 #include <tools/string.hxx>
33 #include <cppuhelper/implbase1.hxx> // helper for implementations
34 #include <cppuhelper/implbase2.hxx> // helper for implementations
35 #include <cppuhelper/implbase3.hxx> // helper for implementations
36 #include <cppuhelper/implbase4.hxx> // helper for implementations
37 #include <IMark.hxx>
38 #include <unobaseclass.hxx>
39 #include "swdllapi.h"
40 /***************************************************
41  ***************************************************
42  *
43  ***************************************************/
44 class SwDoc;
45 class SwFrmFmt;
46 namespace com{namespace sun {namespace star {namespace text
47 {
48     class XTextTable;
49     class XTextSection;
50     class XFootnote;
51 }}}}
52 class SwXFrame;
53 class SwFrmFmt;
54 class SwFmtFtn;
55 class XBookmark;
56 class SwXReferenceMark;
57 class SwSectionFmt;
58 class SwFmtRefMark;
59 class SwXReferenceMark;
60 class SwXBookmark;
61 /*-----------------11.03.98 11:19-------------------
62 
63 --------------------------------------------------*/
64 class SwUnoCollection
65 {
66     SwDoc*      pDoc;
67     sal_Bool    bObjectValid;
68 
69     public:
SwUnoCollection(SwDoc * p)70         SwUnoCollection(SwDoc* p) :
71             pDoc(p),
72             bObjectValid(sal_True){}
73 
74     virtual void                Invalidate();
IsValid() const75     sal_Bool                        IsValid() const {return bObjectValid;}
76 
77 
GetDoc() const78     SwDoc*          GetDoc() const {return pDoc;}
79 };
80 
81 /******************************************************************************
82  *
83  ******************************************************************************/
84 #define SW_SERVICE_TYPE_TEXTTABLE                       0
85 #define SW_SERVICE_TYPE_TEXTFRAME                       1
86 #define SW_SERVICE_TYPE_GRAPHIC                         2
87 #define SW_SERVICE_TYPE_OLE                             3
88 #define SW_SERVICE_TYPE_BOOKMARK                        4
89 #define SW_SERVICE_TYPE_FOOTNOTE                        5
90 #define SW_SERVICE_TYPE_ENDNOTE                         6
91 #define SW_SERVICE_TYPE_INDEXMARK                       7
92 #define SW_SERVICE_TYPE_INDEX                           8
93 #define SW_SERVICE_REFERENCE_MARK                       9
94 #define SW_SERVICE_STYLE_CHARACTER_STYLE                10
95 #define SW_SERVICE_STYLE_PARAGRAPH_STYLE                11
96 #define SW_SERVICE_STYLE_FRAME_STYLE                    12
97 #define SW_SERVICE_STYLE_PAGE_STYLE                     13
98 #define SW_SERVICE_STYLE_NUMBERING_STYLE                14
99 #define SW_SERVICE_CONTENT_INDEX_MARK                   15
100 #define SW_SERVICE_CONTENT_INDEX                        16
101 #define SW_SERVICE_USER_INDEX_MARK                      17
102 #define SW_SERVICE_USER_INDEX                           18
103 #define SW_SERVICE_TEXT_SECTION                         19
104 #define SW_SERVICE_FIELDTYPE_DATETIME                   20
105 #define SW_SERVICE_FIELDTYPE_USER                       21
106 #define SW_SERVICE_FIELDTYPE_SET_EXP                    22
107 #define SW_SERVICE_FIELDTYPE_GET_EXP                    23
108 #define SW_SERVICE_FIELDTYPE_FILE_NAME                  24
109 #define SW_SERVICE_FIELDTYPE_PAGE_NUM                   25
110 #define SW_SERVICE_FIELDTYPE_AUTHOR                     26
111 #define SW_SERVICE_FIELDTYPE_CHAPTER                    27
112 #define SW_SERVICE_FIELDTYPE_DUMMY_0                    28
113 #define SW_SERVICE_FIELDTYPE_GET_REFERENCE              29
114 #define SW_SERVICE_FIELDTYPE_CONDITIONED_TEXT           30
115 #define SW_SERVICE_FIELDTYPE_ANNOTATION                 31
116 #define SW_SERVICE_FIELDTYPE_INPUT                      32
117 #define SW_SERVICE_FIELDTYPE_MACRO                      33
118 #define SW_SERVICE_FIELDTYPE_DDE                        34
119 #define SW_SERVICE_FIELDTYPE_HIDDEN_PARA                35
120 #define SW_SERVICE_FIELDTYPE_DOC_INFO                   36
121 #define SW_SERVICE_FIELDTYPE_TEMPLATE_NAME              37
122 #define SW_SERVICE_FIELDTYPE_USER_EXT                   38
123 #define SW_SERVICE_FIELDTYPE_REF_PAGE_SET               39
124 #define SW_SERVICE_FIELDTYPE_REF_PAGE_GET               40
125 #define SW_SERVICE_FIELDTYPE_JUMP_EDIT                  41
126 #define SW_SERVICE_FIELDTYPE_SCRIPT                     42
127 #define SW_SERVICE_FIELDTYPE_DATABASE_NEXT_SET          43
128 #define SW_SERVICE_FIELDTYPE_DATABASE_NUM_SET           44
129 #define SW_SERVICE_FIELDTYPE_DATABASE_SET_NUM           45
130 #define SW_SERVICE_FIELDTYPE_DATABASE                   46
131 #define SW_SERVICE_FIELDTYPE_DATABASE_NAME              47
132 #define SW_SERVICE_FIELDTYPE_TABLE_FORMULA              48
133 #define SW_SERVICE_FIELDTYPE_PAGE_COUNT                 49
134 #define SW_SERVICE_FIELDTYPE_PARAGRAPH_COUNT            50
135 #define SW_SERVICE_FIELDTYPE_WORD_COUNT                 51
136 #define SW_SERVICE_FIELDTYPE_CHARACTER_COUNT            52
137 #define SW_SERVICE_FIELDTYPE_TABLE_COUNT                53
138 #define SW_SERVICE_FIELDTYPE_GRAPHIC_OBJECT_COUNT       54
139 #define SW_SERVICE_FIELDTYPE_EMBEDDED_OBJECT_COUNT      55
140 #define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_AUTHOR      56
141 #define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_DATE_TIME   57
142 #define SW_SERVICE_FIELDTYPE_DOCINFO_EDIT_TIME          58
143 #define SW_SERVICE_FIELDTYPE_DOCINFO_DESCRIPTION        59
144 #define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_AUTHOR      60
145 #define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_DATE_TIME   61
146 #define SW_SERVICE_FIELDTYPE_DUMMY_O                    62
147 #define SW_SERVICE_FIELDTYPE_DUMMY_1                    63
148 #define SW_SERVICE_FIELDTYPE_DUMMY_2                    64
149 #define SW_SERVICE_FIELDTYPE_DUMMY_3                    65
150 #define SW_SERVICE_FIELDTYPE_DOCINFO_CUSTOM             66
151 #define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_AUTHOR       67
152 #define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_DATE_TIME    68
153 #define SW_SERVICE_FIELDTYPE_DOCINFO_KEY_WORDS          69
154 #define SW_SERVICE_FIELDTYPE_DOCINFO_SUBJECT            70
155 #define SW_SERVICE_FIELDTYPE_DOCINFO_TITLE              71
156 #define SW_SERVICE_FIELDTYPE_DOCINFO_REVISION           72
157 #define SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY               73
158 #define SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS        74
159 #define SW_SERVICE_FIELDTYPE_DROPDOWN                   75
160 #define SW_SERVICE_FIELDTYPE_METAFIELD                  76
161 #define SW_SERVICE_FIELDTYPE_DUMMY_4                    77
162 #define SW_SERVICE_FIELDTYPE_DUMMY_5                    78
163 #define SW_SERVICE_FIELDTYPE_DUMMY_6                    79
164 #define SW_SERVICE_FIELDTYPE_DUMMY_7                    80
165 #define SW_SERVICE_FIELDMASTER_USER                     81
166 #define SW_SERVICE_FIELDMASTER_DDE                      82
167 #define SW_SERVICE_FIELDMASTER_SET_EXP                  83
168 #define SW_SERVICE_FIELDMASTER_DATABASE                 84
169 #define SW_SERVICE_FIELDMASTER_BIBLIOGRAPHY             85
170 #define SW_SERVICE_FIELDMASTER_DUMMY2                   86
171 #define SW_SERVICE_FIELDMASTER_DUMMY3                   87
172 #define SW_SERVICE_FIELDMASTER_DUMMY4                   88
173 #define SW_SERVICE_FIELDMASTER_DUMMY5                   89
174 #define SW_SERVICE_INDEX_ILLUSTRATIONS                  90
175 #define SW_SERVICE_INDEX_OBJECTS                        91
176 #define SW_SERVICE_INDEX_TABLES                         92
177 #define SW_SERVICE_INDEX_BIBLIOGRAPHY                   93
178 #define SW_SERVICE_PARAGRAPH                            94
179 #define SW_SERVICE_FIELDTYPE_INPUT_USER                 95
180 #define SW_SERVICE_FIELDTYPE_HIDDEN_TEXT                96
181 #define SW_SERVICE_STYLE_CONDITIONAL_PARAGRAPH_STYLE    97
182 #define SW_SERVICE_NUMBERING_RULES                      98
183 #define SW_SERVICE_TEXT_COLUMNS                         99
184 #define SW_SERVICE_INDEX_HEADER_SECTION                 100
185 #define SW_SERVICE_DEFAULTS                             101
186 #define SW_SERVICE_IMAP_RECTANGLE                       102
187 #define SW_SERVICE_IMAP_CIRCLE                          103
188 #define SW_SERVICE_IMAP_POLYGON                         104
189 #define SW_SERVICE_TYPE_TEXT_GRAPHIC                    105
190 #define SW_SERVICE_CHART2_DATA_PROVIDER                 106
191 #define SW_SERVICE_TYPE_FIELDMARK                       107
192 #define SW_SERVICE_TYPE_FORMFIELDMARK                   108
193 #define SW_SERVICE_TYPE_META                            109
194 
195 #define SW_SERVICE_LAST                 SW_SERVICE_TYPE_META
196 
197 #define SW_SERVICE_INVALID          USHRT_MAX
198 
199 //
200 // case-corrected versions of service-names (see #i67811)
201 //
202 #define CSS_TEXT_TEXTFIELD_DATE_TIME                    "com.sun.star.text.textfield.DateTime"
203 #define CSS_TEXT_TEXTFIELD_USER                         "com.sun.star.text.textfield.User"
204 #define CSS_TEXT_TEXTFIELD_SET_EXPRESSION               "com.sun.star.text.textfield.SetExpression"
205 #define CSS_TEXT_TEXTFIELD_GET_EXPRESSION               "com.sun.star.text.textfield.GetExpression"
206 #define CSS_TEXT_TEXTFIELD_FILE_NAME                    "com.sun.star.text.textfield.FileName"
207 #define CSS_TEXT_TEXTFIELD_PAGE_NUMBER                  "com.sun.star.text.textfield.PageNumber"
208 #define CSS_TEXT_TEXTFIELD_AUTHOR                       "com.sun.star.text.textfield.Author"
209 #define CSS_TEXT_TEXTFIELD_CHAPTER                      "com.sun.star.text.textfield.Chapter"
210 #define CSS_TEXT_TEXTFIELD_GET_REFERENCE                "com.sun.star.text.textfield.GetReference"
211 #define CSS_TEXT_TEXTFIELD_CONDITIONAL_TEXT             "com.sun.star.text.textfield.ConditionalText"
212 #define CSS_TEXT_TEXTFIELD_ANNOTATION                   "com.sun.star.text.textfield.Annotation"
213 #define CSS_TEXT_TEXTFIELD_INPUT                        "com.sun.star.text.textfield.Input"
214 #define CSS_TEXT_TEXTFIELD_MACRO                        "com.sun.star.text.textfield.Macro"
215 #define CSS_TEXT_TEXTFIELD_DDE                          "com.sun.star.text.textfield.DDE"
216 #define CSS_TEXT_TEXTFIELD_HIDDEN_PARAGRAPH             "com.sun.star.text.textfield.HiddenParagraph"
217 #define CSS_TEXT_TEXTFIELD_TEMPLATE_NAME                "com.sun.star.text.textfield.TemplateName"
218 #define CSS_TEXT_TEXTFIELD_EXTENDED_USER                "com.sun.star.text.textfield.ExtendedUser"
219 #define CSS_TEXT_TEXTFIELD_REFERENCE_PAGE_SET           "com.sun.star.text.textfield.ReferencePageSet"
220 #define CSS_TEXT_TEXTFIELD_REFERENCE_PAGE_GET           "com.sun.star.text.textfield.ReferencePageGet"
221 #define CSS_TEXT_TEXTFIELD_JUMP_EDIT                    "com.sun.star.text.textfield.JumpEdit"
222 #define CSS_TEXT_TEXTFIELD_SCRIPT                       "com.sun.star.text.textfield.Script"
223 #define CSS_TEXT_TEXTFIELD_DATABASE_NEXT_SET            "com.sun.star.text.textfield.DatabaseNextSet"
224 #define CSS_TEXT_TEXTFIELD_DATABASE_NUMBER_OF_SET       "com.sun.star.text.textfield.DatabaseNumberOfSet"
225 #define CSS_TEXT_TEXTFIELD_DATABASE_SET_NUMBER          "com.sun.star.text.textfield.DatabaseSetNumber"
226 #define CSS_TEXT_TEXTFIELD_DATABASE                     "com.sun.star.text.textfield.Database"
227 #define CSS_TEXT_TEXTFIELD_DATABASE_NAME                "com.sun.star.text.textfield.DatabaseName"
228 #define CSS_TEXT_TEXTFIELD_TABLE_FORMULA                "com.sun.star.text.textfield.TableFormula"
229 #define CSS_TEXT_TEXTFIELD_PAGE_COUNT                   "com.sun.star.text.textfield.PageCount"
230 #define CSS_TEXT_TEXTFIELD_PARAGRAPH_COUNT              "com.sun.star.text.textfield.ParagraphCount"
231 #define CSS_TEXT_TEXTFIELD_WORD_COUNT                   "com.sun.star.text.textfield.WordCount"
232 #define CSS_TEXT_TEXTFIELD_CHARACTER_COUNT              "com.sun.star.text.textfield.CharacterCount"
233 #define CSS_TEXT_TEXTFIELD_TABLE_COUNT                  "com.sun.star.text.textfield.TableCount"
234 #define CSS_TEXT_TEXTFIELD_GRAPHIC_OBJECT_COUNT         "com.sun.star.text.textfield.GraphicObjectCount"
235 #define CSS_TEXT_TEXTFIELD_EMBEDDED_OBJECT_COUNT        "com.sun.star.text.textfield.EmbeddedObjectCount"
236 #define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_AUTHOR        "com.sun.star.text.textfield.docinfo.ChangeAuthor"
237 #define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_DATE_TIME     "com.sun.star.text.textfield.docinfo.ChangeDateTime"
238 #define CSS_TEXT_TEXTFIELD_DOCINFO_EDIT_TIME            "com.sun.star.text.textfield.docinfo.EditTime"
239 #define CSS_TEXT_TEXTFIELD_DOCINFO_DESCRIPTION          "com.sun.star.text.textfield.docinfo.Description"
240 #define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_AUTHOR        "com.sun.star.text.textfield.docinfo.CreateAuthor"
241 #define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_DATE_TIME     "com.sun.star.text.textfield.docinfo.CreateDateTime"
242 #define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_AUTHOR         "com.sun.star.text.textfield.docinfo.PrintAuthor"
243 #define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_DATE_TIME      "com.sun.star.text.textfield.docinfo.PrintDateTime"
244 #define CSS_TEXT_TEXTFIELD_DOCINFO_KEY_WORDS            "com.sun.star.text.textfield.docinfo.KeyWords"
245 #define CSS_TEXT_TEXTFIELD_DOCINFO_SUBJECT              "com.sun.star.text.textfield.docinfo.Subject"
246 #define CSS_TEXT_TEXTFIELD_DOCINFO_TITLE                "com.sun.star.text.textfield.docinfo.Title"
247 #define CSS_TEXT_TEXTFIELD_DOCINFO_REVISION             "com.sun.star.text.textfield.docinfo.Revision"
248 #define CSS_TEXT_TEXTFIELD_DOCINFO_CUSTOM               "com.sun.star.text.textfield.docinfo.Custom"
249 #define CSS_TEXT_TEXTFIELD_BIBLIOGRAPHY                 "com.sun.star.text.textfield.Bibliography"
250 #define CSS_TEXT_TEXTFIELD_COMBINED_CHARACTERS          "com.sun.star.text.textfield.CombinedCharacters"
251 #define CSS_TEXT_TEXTFIELD_DROP_DOWN                    "com.sun.star.text.textfield.DropDown"
252 #define CSS_TEXT_TEXTFIELD_INPUT_USER                   "com.sun.star.text.textfield.InputUser"
253 #define CSS_TEXT_TEXTFIELD_HIDDEN_TEXT                  "com.sun.star.text.textfield.HiddenText"
254 #define CSS_TEXT_FIELDMASTER_USER                       "com.sun.star.text.fieldmaster.User"
255 #define CSS_TEXT_FIELDMASTER_DDE                        "com.sun.star.text.fieldmaster.DDE"
256 #define CSS_TEXT_FIELDMASTER_SET_EXPRESSION             "com.sun.star.text.fieldmaster.SetExpression"
257 #define CSS_TEXT_FIELDMASTER_DATABASE                   "com.sun.star.text.fieldmaster.Database"
258 #define CSS_TEXT_FIELDMASTER_BIBLIOGRAPHY               "com.sun.star.text.fieldmaster.Bibliography"
259 
260 
261 class SwXServiceProvider
262 {
263 public:
264     static rtl::OUString        GetProviderName(sal_uInt16 nObjectType);
265     static sal_uInt16           GetProviderType(const rtl::OUString& rServiceName);
266     static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >        MakeInstance(sal_uInt16 nObjectType, SwDoc* pDoc);
267     static ::com::sun::star::uno::Sequence<rtl::OUString>   GetAllServiceNames();
268 
269 };
270 /*-----------------11.12.97 09:38-------------------
271 
272 --------------------------------------------------*/
273 typedef
274 cppu::WeakImplHelper3
275 <
276     ::com::sun::star::container::XNameAccess,
277     ::com::sun::star::container::XIndexAccess,
278     ::com::sun::star::lang::XServiceInfo
279 >
280 SwCollectionBaseClass;
281 class SW_DLLPUBLIC SwXTextTables : public SwCollectionBaseClass,
282     public SwUnoCollection
283 {
284 protected:
285     virtual ~SwXTextTables();
286 public:
287     SwXTextTables(SwDoc* pDoc);
288 
289 
290     //XIndexAccess
291     virtual sal_Int32 SAL_CALL getCount(  ) throw(::com::sun::star::uno::RuntimeException);
292     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 );
293 
294     //XNameAccess
295     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 );
296     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
297     virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
298 
299     //XElementAccess
300     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
301     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
302 
303     //XServiceInfo
304 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
305     virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
306     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
307 
308     static ::com::sun::star::text::XTextTable*          GetObject( SwFrmFmt& rFmt );
309 };
310 
311 typedef
312 cppu::WeakImplHelper4
313 <
314     ::com::sun::star::container::XEnumerationAccess,
315     ::com::sun::star::container::XNameAccess,
316     ::com::sun::star::container::XIndexAccess,
317     ::com::sun::star::lang::XServiceInfo
318 > SwXFramesBaseClass;
319 
320 class SwXFrames : public SwXFramesBaseClass,
321     public SwUnoCollection
322 {
323     const FlyCntType    eType;
324 protected:
325     virtual ~SwXFrames();
326 public:
327     SwXFrames(SwDoc* pDoc, FlyCntType eSet);
328 
329     //XEnumerationAccess
330     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
331 
332     //XIndexAccess
333     virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
334     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 );
335 
336     //XNameAccess
337     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 );
338     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
339     virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
340 
341     //XElementAccess
342     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
343     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
344 
345     //XServiceInfo
346     virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
347     virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
348     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
349 
GetType() const350     FlyCntType          GetType()const{return eType;}
351     static SwXFrame*    GetObject( SwFrmFmt& rFmt, FlyCntType eType );
352 
353 };
354 
355 /*-----------------20.02.98 10:51-------------------
356 
357 --------------------------------------------------*/
358 class SwXTextFrames : public SwXFrames
359 {
360 protected:
361     virtual ~SwXTextFrames();
362 public:
363     SwXTextFrames(SwDoc* pDoc);
364 
365 
366 //  SMART_UNO_DECLARATION( SwXTextFrames, UsrObject );
367 
368     //XServiceInfo
369     virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
370     virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
371     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
372 
373 };
374 
375 /*-----------------20.02.98 10:55-------------------
376 
377 --------------------------------------------------*/
378 class SwXTextGraphicObjects : public SwXFrames
379 {
380 protected:
381     virtual ~SwXTextGraphicObjects();
382 public:
383         SwXTextGraphicObjects(SwDoc* pDoc);
384 
385 
386 //  SMART_UNO_DECLARATION( SwXTextGraphicObjects, UsrObject );
387 
388     //XServiceInfo
389     virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
390     virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
391     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
392 
393 };
394 
395 /*-----------------20.02.98 10:57-------------------
396 
397 --------------------------------------------------*/
398 class SwXTextEmbeddedObjects :  public SwXFrames
399 {
400 protected:
401     virtual ~SwXTextEmbeddedObjects();
402 public:
403     SwXTextEmbeddedObjects(SwDoc* pDoc);
404 
405 
406 //  SMART_UNO_DECLARATION( SwXTextEmbeddedObjects, UsrObject );
407 
408     //XServiceInfo
409     virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
410     virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
411     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
412 
413 };
414 
415 /*-----------------12.02.98 07:58-------------------
416 
417 --------------------------------------------------*/
418 class SwXTextSections : public SwCollectionBaseClass,
419                         public SwUnoCollection
420 {
421 protected:
422     virtual ~SwXTextSections();
423 public:
424     SwXTextSections(SwDoc* pDoc);
425 
426 
427     //XIndexAccess
428     virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
429     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 );
430 
431     //XNameAccess
432     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 );
433     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
434     virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
435 
436     //XElementAccess
437     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
438     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
439 
440     //XServiceInfo
441     virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
442     virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
443     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
444 
445     static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection> GetObject( SwSectionFmt& rFmt );
446 };
447 /*-----------------12.02.98 07:51-------------------
448 
449 --------------------------------------------------*/
450 class SwXBookmarks : public SwCollectionBaseClass,
451     public SwUnoCollection
452 {
453     protected:
454         virtual ~SwXBookmarks();
455     public:
456         SwXBookmarks(SwDoc* pDoc);
457 
458 
459         //XIndexAccess
460         virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
461         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 );
462 
463         //XNameAccess
464         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 );
465         virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
466         virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
467 
468         //XElementAccess
469         virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
470         virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
471 
472         //XServiceInfo
473         virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
474         virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
475         virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
476 
477 };
478 
479 class SwXNumberingRulesCollection : public cppu::WeakImplHelper1
480 <
481     ::com::sun::star::container::XIndexAccess
482 >,
483     public SwUnoCollection
484 {
485 protected:
486     virtual ~SwXNumberingRulesCollection();
487 
488 public:
489     SwXNumberingRulesCollection( SwDoc* pDoc );
490 
491     //XIndexAccess
492     virtual sal_Int32 SAL_CALL SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
493     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 
495     //XElementAccess
496     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
497     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
498 };
499 
500 /*-----------------12.02.98 08:01-------------------
501 
502 --------------------------------------------------*/
503 
504 typedef
505 cppu::WeakImplHelper2
506 <
507     ::com::sun::star::container::XIndexAccess,
508     ::com::sun::star::lang::XServiceInfo
509 >
510 SwSimpleIndexAccessBaseClass;
511 
512 class SwXFootnotes : public SwSimpleIndexAccessBaseClass,
513                      public SwUnoCollection
514 {
515     const bool m_bEndnote;
516 
517 protected:
518     virtual ~SwXFootnotes();
519 public:
520     SwXFootnotes(sal_Bool bEnd, SwDoc* pDoc);
521 
522     //XIndexAccess
523     virtual sal_Int32 SAL_CALL SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
524     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 );
525 
526     //XElementAccess
527     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
528     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
529 
530     //XServiceInfo
531     virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
532     virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
533     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
534 
535     static ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote> GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt );
536 };
537 
538 /* -----------------27.08.98 13:10-------------------
539  *
540  * --------------------------------------------------*/
541 class SwXReferenceMarks : public SwCollectionBaseClass,
542     public SwUnoCollection
543 {
544 protected:
545     virtual ~SwXReferenceMarks();
546 public:
547     SwXReferenceMarks(SwDoc* pDoc);
548 
549 
550     //XIndexAccess
551     virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
552     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 );
553 
554     //XNameAccess
555     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 );
556     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
557     virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
558 
559     //XElementAccess
560     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
561     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
562 
563     //XServiceInfo
564     virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
565     virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
566     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
567 
568     static SwXReferenceMark* GetObject( SwDoc* pDoc, const SwFmtRefMark* pMark );
569 };
570 
571 #endif
572 
573 
574 
575 
576 
577 
578