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