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