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