/src/libreoffice/sw/inc/unocoll.hxx
Line | Count | Source |
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 <limits.h> |
22 | | #include "flyenum.hxx" |
23 | | #include <com/sun/star/lang/XServiceInfo.hpp> |
24 | | #include <com/sun/star/container/XEnumerationAccess.hpp> |
25 | | #include <com/sun/star/container/XNameAccess.hpp> |
26 | | #include <com/sun/star/container/XIndexAccess.hpp> |
27 | | #include <cppuhelper/implbase.hxx> |
28 | | #include "swdllapi.h" |
29 | | |
30 | | class SwDoc; |
31 | | class SwFrameFormat; |
32 | | namespace com::sun::star::text |
33 | | { |
34 | | class XTextTable; |
35 | | class XTextSection; |
36 | | class XFootnote; |
37 | | } |
38 | | class SwFormatFootnote; |
39 | | class SwSectionFormat; |
40 | | struct SvEventDescription; |
41 | | class SwXFootnote; |
42 | | class SwXTextSection; |
43 | | class SwXTextTable; |
44 | | |
45 | | const SvEventDescription* sw_GetSupportedMacroItems(); |
46 | | |
47 | | class SwUnoCollection |
48 | | { |
49 | | SwDoc* m_pDoc; |
50 | | |
51 | | public: |
52 | | SwUnoCollection(SwDoc* p) : |
53 | 175k | m_pDoc(p){} |
54 | | |
55 | 175k | virtual ~SwUnoCollection() {} |
56 | | |
57 | | virtual void Invalidate(); |
58 | | |
59 | | protected: |
60 | 778k | bool IsValid() const { return m_pDoc; } |
61 | | |
62 | | SwDoc& GetDoc() const; |
63 | | }; |
64 | | |
65 | | /** entries in this enum are mapped in an array in unocoll.cxx */ |
66 | | enum class SwServiceType { |
67 | | TypeTextTable = 0, |
68 | | TypeTextFrame = 1, |
69 | | TypeGraphic = 2, |
70 | | TypeOLE = 3, |
71 | | TypeBookmark = 4, |
72 | | TypeFootnote = 5, |
73 | | TypeEndnote = 6, |
74 | | TypeIndexMark = 7, |
75 | | TypeIndex = 8, |
76 | | ReferenceMark = 9, |
77 | | StyleCharacter = 10, |
78 | | StyleParagraph = 11, |
79 | | StyleFrame = 12, |
80 | | StylePage = 13, |
81 | | StyleNumbering = 14, |
82 | | ContentIndexMark = 15, |
83 | | ContentIndex = 16, |
84 | | UserIndexMark = 17, |
85 | | UserIndex = 18, |
86 | | TextSection = 19, |
87 | | FieldTypeDateTime = 20, |
88 | | FieldTypeUser = 21, |
89 | | FieldTypeSetExp = 22, |
90 | | FieldTypeGetExp = 23, |
91 | | FieldTypeFileName = 24, |
92 | | FieldTypePageNum = 25, |
93 | | FieldTypeAuthor = 26, |
94 | | FieldTypeChapter = 27, |
95 | | FieldTypeDummy0 = 28, |
96 | | FieldTypeGetReference = 29, |
97 | | FieldTypeConditionedText = 30, |
98 | | FieldTypeAnnotation = 31, |
99 | | FieldTypeInput = 32, |
100 | | FieldTypeMacro = 33, |
101 | | FieldTypeDDE = 34, |
102 | | FieldTypeHiddenPara = 35, |
103 | | FieldTypeDocInfo = 36, |
104 | | FieldTypeTemplateName = 37, |
105 | | FieldTypeUserExt = 38, |
106 | | FieldTypeRefPageSet = 39, |
107 | | FieldTypeRefPageGet = 40, |
108 | | FieldTypeJumpEdit = 41, |
109 | | FieldTypeScript = 42, |
110 | | FieldTypeDatabaseNextSet = 43, |
111 | | FieldTypeDatabaseNumSet = 44, |
112 | | FieldTypeDatabaseSetNum = 45, |
113 | | FieldTypeDatabase = 46, |
114 | | FieldTypeDatabaseName = 47, |
115 | | FieldTypeTableFormula = 48, |
116 | | FieldTypePageCount = 49, |
117 | | FieldTypeParagraphCount = 50, |
118 | | FieldTypeWordCount = 51, |
119 | | FieldTypeCharacterCount = 52, |
120 | | FieldTypeTableCount = 53, |
121 | | FieldTypeGraphicObjectCount = 54, |
122 | | FieldTypeEmbeddedObjectCount = 55, |
123 | | FieldTypeDocInfoChangeAuthor = 56, |
124 | | FieldTypeDocInfoChangeDateTime = 57, |
125 | | FieldTypeDocInfoEditTime = 58, |
126 | | FieldTypeDocInfoDescription = 59, |
127 | | FieldTypeDocInfoCreateAuthor = 60, |
128 | | FieldTypeDocInfoCreateDateTime = 61, |
129 | | FieldTypePageCountRange = 62, |
130 | | FieldTypeDummy1 = 63, |
131 | | FieldTypeDummy2 = 64, |
132 | | FieldTypeDummy3 = 65, |
133 | | FieldTypeDocInfoCustom = 66, |
134 | | FieldTypeDocInfoPrintAuthor = 67, |
135 | | FieldTypeDocInfoPrintDateTime = 68, |
136 | | FieldTypeDocInfoKeywords = 69, |
137 | | FieldTypeDocInfoSubject = 70, |
138 | | FieldTypeDocInfoTitle = 71, |
139 | | FieldTypeDocInfoRevision = 72, |
140 | | FieldTypeBibliography = 73, |
141 | | FieldTypeCombinedCharacters = 74, |
142 | | FieldTypeDropdown = 75, |
143 | | FieldTypeMetafield = 76, |
144 | | FieldTypeDummy4 = 77, |
145 | | FieldTypeDummy5 = 78, |
146 | | FieldTypeDummy6 = 79, |
147 | | FieldTypeDummy7 = 80, |
148 | | FieldMasterUser = 81, |
149 | | FieldMasterDDE = 82, |
150 | | FieldMasterSetExp = 83, |
151 | | FieldMasterDatabase = 84, |
152 | | FieldMasterBibliography = 85, |
153 | | FieldMasterDummy2 = 86, |
154 | | FieldMasterDummy3 = 87, |
155 | | FieldMasterDummy4 = 88, |
156 | | FieldMasterDummy5 = 89, |
157 | | IndexIllustrations = 90, |
158 | | IndexObjects = 91, |
159 | | IndexTables = 92, |
160 | | IndexBibliography = 93, |
161 | | Paragraph = 94, |
162 | | FieldTypeInputUser = 95, |
163 | | FieldTypeHiddenText = 96, |
164 | | StyleConditionalParagraph = 97, |
165 | | NumberingRules = 98, |
166 | | TextColumns = 99, |
167 | | IndexHeaderSection = 100, |
168 | | Defaults = 101, |
169 | | IMapRectangle = 102, |
170 | | IMapCircle = 103, |
171 | | IMapPolygon = 104, |
172 | | TypeTextGraphic = 105, |
173 | | Chart2DataProvider = 106, |
174 | | TypeFieldMark = 107, |
175 | | TypeFormFieldMark = 108, |
176 | | TypeMeta = 109, |
177 | | VbaObjectProvider = 110, |
178 | | VbaCodeNameProvider = 111, |
179 | | VbaProjectNameProvider = 112, |
180 | | VbaGlobals = 113, |
181 | | StyleTable = 114, |
182 | | StyleCell = 115, |
183 | | LineBreak = 116, |
184 | | ContentControl = 117, |
185 | | |
186 | | Invalid = USHRT_MAX |
187 | | }; |
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_PAGE_COUNT_RANGE "com.sun.star.text.textfield.PageCountRange" |
220 | | #define CSS_TEXT_TEXTFIELD_PARAGRAPH_COUNT "com.sun.star.text.textfield.ParagraphCount" |
221 | | #define CSS_TEXT_TEXTFIELD_WORD_COUNT "com.sun.star.text.textfield.WordCount" |
222 | | #define CSS_TEXT_TEXTFIELD_CHARACTER_COUNT "com.sun.star.text.textfield.CharacterCount" |
223 | | #define CSS_TEXT_TEXTFIELD_TABLE_COUNT "com.sun.star.text.textfield.TableCount" |
224 | | #define CSS_TEXT_TEXTFIELD_GRAPHIC_OBJECT_COUNT "com.sun.star.text.textfield.GraphicObjectCount" |
225 | | #define CSS_TEXT_TEXTFIELD_EMBEDDED_OBJECT_COUNT "com.sun.star.text.textfield.EmbeddedObjectCount" |
226 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_AUTHOR "com.sun.star.text.textfield.docinfo.ChangeAuthor" |
227 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_DATE_TIME "com.sun.star.text.textfield.docinfo.ChangeDateTime" |
228 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_EDIT_TIME "com.sun.star.text.textfield.docinfo.EditTime" |
229 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_DESCRIPTION "com.sun.star.text.textfield.docinfo.Description" |
230 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_AUTHOR "com.sun.star.text.textfield.docinfo.CreateAuthor" |
231 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_DATE_TIME "com.sun.star.text.textfield.docinfo.CreateDateTime" |
232 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_AUTHOR "com.sun.star.text.textfield.docinfo.PrintAuthor" |
233 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_DATE_TIME "com.sun.star.text.textfield.docinfo.PrintDateTime" |
234 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_KEY_WORDS "com.sun.star.text.textfield.docinfo.KeyWords" |
235 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_SUBJECT "com.sun.star.text.textfield.docinfo.Subject" |
236 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_TITLE "com.sun.star.text.textfield.docinfo.Title" |
237 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_REVISION "com.sun.star.text.textfield.docinfo.Revision" |
238 | | #define CSS_TEXT_TEXTFIELD_DOCINFO_CUSTOM "com.sun.star.text.textfield.docinfo.Custom" |
239 | | #define CSS_TEXT_TEXTFIELD_BIBLIOGRAPHY "com.sun.star.text.textfield.Bibliography" |
240 | | #define CSS_TEXT_TEXTFIELD_COMBINED_CHARACTERS "com.sun.star.text.textfield.CombinedCharacters" |
241 | | #define CSS_TEXT_TEXTFIELD_DROP_DOWN "com.sun.star.text.textfield.DropDown" |
242 | | #define CSS_TEXT_TEXTFIELD_INPUT_USER "com.sun.star.text.textfield.InputUser" |
243 | | #define CSS_TEXT_TEXTFIELD_HIDDEN_TEXT "com.sun.star.text.textfield.HiddenText" |
244 | | #define CSS_TEXT_FIELDMASTER_USER "com.sun.star.text.fieldmaster.User" |
245 | | #define CSS_TEXT_FIELDMASTER_DDE "com.sun.star.text.fieldmaster.DDE" |
246 | | #define CSS_TEXT_FIELDMASTER_SET_EXPRESSION "com.sun.star.text.fieldmaster.SetExpression" |
247 | | #define CSS_TEXT_FIELDMASTER_DATABASE "com.sun.star.text.fieldmaster.Database" |
248 | | #define CSS_TEXT_FIELDMASTER_BIBLIOGRAPHY "com.sun.star.text.fieldmaster.Bibliography" |
249 | | |
250 | | class SwXServiceProvider |
251 | | { |
252 | | public: |
253 | | static OUString GetProviderName(SwServiceType nObjectType); |
254 | | static SwServiceType GetProviderType(std::u16string_view rServiceName); |
255 | | static css::uno::Reference< css::uno::XInterface > MakeInstance(SwServiceType nObjectType, SwDoc & rDoc); |
256 | | static css::uno::Sequence<OUString> GetAllServiceNames(); |
257 | | |
258 | | }; |
259 | | |
260 | | typedef |
261 | | cppu::WeakImplHelper |
262 | | < |
263 | | css::container::XNameAccess, |
264 | | css::container::XIndexAccess, |
265 | | css::lang::XServiceInfo |
266 | | > |
267 | | SwCollectionBaseClass; |
268 | | class SW_DLLPUBLIC SwXTextTables final : public SwCollectionBaseClass, |
269 | | public SwUnoCollection |
270 | | { |
271 | | virtual ~SwXTextTables() override; |
272 | | public: |
273 | | SwXTextTables(SwDoc* pDoc); |
274 | | |
275 | | //XIndexAccess |
276 | | virtual sal_Int32 SAL_CALL getCount( ) override; |
277 | | virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override; |
278 | | |
279 | | //XNameAccess |
280 | | virtual css::uno::Any SAL_CALL getByName(const OUString& Name) override; |
281 | | virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override; |
282 | | virtual sal_Bool SAL_CALL hasByName(const OUString& Name) override; |
283 | | |
284 | | //XElementAccess |
285 | | virtual css::uno::Type SAL_CALL getElementType( ) override; |
286 | | virtual sal_Bool SAL_CALL hasElements( ) override; |
287 | | |
288 | | //XServiceInfo |
289 | | virtual OUString SAL_CALL getImplementationName() override; |
290 | | virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; |
291 | | virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; |
292 | | |
293 | | rtl::Reference<SwXTextTable> getTextTableByName(std::u16string_view Name); |
294 | | rtl::Reference<SwXTextTable> getTextTableByIndex(sal_Int32 nIndex); |
295 | | }; |
296 | | |
297 | | typedef |
298 | | cppu::WeakImplHelper |
299 | | < |
300 | | css::container::XEnumerationAccess, |
301 | | css::container::XNameAccess, |
302 | | css::container::XIndexAccess, |
303 | | css::lang::XServiceInfo |
304 | | > SwXFramesBaseClass; |
305 | | |
306 | | class SwXFrames : public SwXFramesBaseClass, |
307 | | public SwUnoCollection |
308 | | { |
309 | | const FlyCntType m_eType; |
310 | | protected: |
311 | | virtual ~SwXFrames() override; |
312 | | public: |
313 | | SwXFrames(SwDoc* pDoc, FlyCntType eSet); |
314 | | |
315 | | //XEnumerationAccess |
316 | | virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override; |
317 | | |
318 | | //XIndexAccess |
319 | | virtual sal_Int32 SAL_CALL getCount() override; |
320 | | virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override; |
321 | | |
322 | | //XNameAccess |
323 | | virtual css::uno::Any SAL_CALL getByName(const OUString& Name) override; |
324 | | virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override; |
325 | | virtual sal_Bool SAL_CALL hasByName(const OUString& Name) override; |
326 | | |
327 | | //XElementAccess |
328 | | virtual css::uno::Type SAL_CALL getElementType( ) override; |
329 | | virtual sal_Bool SAL_CALL hasElements( ) override; |
330 | | |
331 | | //XServiceInfo |
332 | | virtual OUString SAL_CALL getImplementationName() override; |
333 | | virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; |
334 | | virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; |
335 | | }; |
336 | | |
337 | | class SwXTextFrames final : public SwXFrames |
338 | | { |
339 | | virtual ~SwXTextFrames() override; |
340 | | public: |
341 | | SwXTextFrames(SwDoc* pDoc); |
342 | | |
343 | | //XServiceInfo |
344 | | virtual OUString SAL_CALL getImplementationName() override; |
345 | | virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; |
346 | | virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; |
347 | | |
348 | | }; |
349 | | |
350 | | class SwXTextGraphicObjects final : public SwXFrames |
351 | | { |
352 | | virtual ~SwXTextGraphicObjects() override; |
353 | | public: |
354 | | SwXTextGraphicObjects(SwDoc* pDoc); |
355 | | |
356 | | //XServiceInfo |
357 | | virtual OUString SAL_CALL getImplementationName() override; |
358 | | virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; |
359 | | virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; |
360 | | |
361 | | }; |
362 | | |
363 | | class SwXTextEmbeddedObjects final : public SwXFrames |
364 | | { |
365 | | virtual ~SwXTextEmbeddedObjects() override; |
366 | | public: |
367 | | SwXTextEmbeddedObjects(SwDoc* pDoc); |
368 | | |
369 | | //XServiceInfo |
370 | | virtual OUString SAL_CALL getImplementationName() override; |
371 | | virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; |
372 | | virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; |
373 | | |
374 | | }; |
375 | | |
376 | | class SwXTextSections final : public SwCollectionBaseClass, |
377 | | public SwUnoCollection |
378 | | { |
379 | | virtual ~SwXTextSections() override; |
380 | | public: |
381 | | SwXTextSections(SwDoc* pDoc); |
382 | | |
383 | | //XIndexAccess |
384 | | virtual sal_Int32 SAL_CALL getCount() override; |
385 | | virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override; |
386 | | |
387 | | //XNameAccess |
388 | | virtual css::uno::Any SAL_CALL getByName(const OUString& Name) override; |
389 | | virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override; |
390 | | virtual sal_Bool SAL_CALL hasByName(const OUString& Name) override; |
391 | | |
392 | | //XElementAccess |
393 | | virtual css::uno::Type SAL_CALL getElementType( ) override; |
394 | | virtual sal_Bool SAL_CALL hasElements( ) override; |
395 | | |
396 | | //XServiceInfo |
397 | | virtual OUString SAL_CALL getImplementationName() override; |
398 | | virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; |
399 | | virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; |
400 | | }; |
401 | | |
402 | | class SwXBookmarks final : public SwCollectionBaseClass, |
403 | | public SwUnoCollection |
404 | | { |
405 | | virtual ~SwXBookmarks() override; |
406 | | public: |
407 | | SwXBookmarks(SwDoc* pDoc); |
408 | | |
409 | | //XIndexAccess |
410 | | virtual sal_Int32 SAL_CALL getCount() override; |
411 | | virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override; |
412 | | |
413 | | //XNameAccess |
414 | | virtual css::uno::Any SAL_CALL getByName(const OUString& Name) override; |
415 | | virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override; |
416 | | virtual sal_Bool SAL_CALL hasByName(const OUString& Name) override; |
417 | | |
418 | | //XElementAccess |
419 | | virtual css::uno::Type SAL_CALL getElementType( ) override; |
420 | | virtual sal_Bool SAL_CALL hasElements( ) override; |
421 | | |
422 | | //XServiceInfo |
423 | | virtual OUString SAL_CALL getImplementationName() override; |
424 | | virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; |
425 | | virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; |
426 | | |
427 | | }; |
428 | | |
429 | | class SwXNumberingRulesCollection final : public cppu::WeakImplHelper |
430 | | < |
431 | | css::container::XIndexAccess |
432 | | >, |
433 | | public SwUnoCollection |
434 | | { |
435 | | virtual ~SwXNumberingRulesCollection() override; |
436 | | |
437 | | public: |
438 | | SwXNumberingRulesCollection( SwDoc* pDoc ); |
439 | | |
440 | | //XIndexAccess |
441 | | virtual sal_Int32 SAL_CALL getCount() override; |
442 | | virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override; |
443 | | |
444 | | //XElementAccess |
445 | | virtual css::uno::Type SAL_CALL getElementType( ) override; |
446 | | virtual sal_Bool SAL_CALL hasElements( ) override; |
447 | | }; |
448 | | |
449 | | typedef |
450 | | cppu::WeakImplHelper |
451 | | < |
452 | | css::container::XIndexAccess, |
453 | | css::lang::XServiceInfo |
454 | | > |
455 | | SwSimpleIndexAccessBaseClass; |
456 | | |
457 | | class SW_DLLPUBLIC SwXFootnotes final : public SwSimpleIndexAccessBaseClass, |
458 | | public SwUnoCollection |
459 | | { |
460 | | const bool m_bEndnote; |
461 | | |
462 | | virtual ~SwXFootnotes() override; |
463 | | public: |
464 | | SwXFootnotes(bool bEnd, SwDoc* pDoc); |
465 | | |
466 | | //XIndexAccess |
467 | | virtual sal_Int32 SAL_CALL getCount() override; |
468 | | virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override; |
469 | | |
470 | | //XElementAccess |
471 | | virtual css::uno::Type SAL_CALL getElementType( ) override; |
472 | | virtual sal_Bool SAL_CALL hasElements( ) override; |
473 | | |
474 | | //XServiceInfo |
475 | | virtual OUString SAL_CALL getImplementationName() override; |
476 | | virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; |
477 | | virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; |
478 | | |
479 | | rtl::Reference<SwXFootnote> getFootnoteByIndex(sal_Int32 nIndex) ; |
480 | | }; |
481 | | |
482 | | class SwXReferenceMarks final : public SwCollectionBaseClass, |
483 | | public SwUnoCollection |
484 | | { |
485 | | virtual ~SwXReferenceMarks() override; |
486 | | public: |
487 | | SwXReferenceMarks(SwDoc* pDoc); |
488 | | |
489 | | //XIndexAccess |
490 | | virtual sal_Int32 SAL_CALL getCount() override; |
491 | | virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override; |
492 | | |
493 | | //XNameAccess |
494 | | virtual css::uno::Any SAL_CALL getByName(const OUString& Name) override; |
495 | | virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override; |
496 | | virtual sal_Bool SAL_CALL hasByName(const OUString& Name) override; |
497 | | |
498 | | //XElementAccess |
499 | | virtual css::uno::Type SAL_CALL getElementType( ) override; |
500 | | virtual sal_Bool SAL_CALL hasElements( ) override; |
501 | | |
502 | | //XServiceInfo |
503 | | virtual OUString SAL_CALL getImplementationName() override; |
504 | | virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; |
505 | | virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; |
506 | | |
507 | | }; |
508 | | |
509 | | #endif |
510 | | |
511 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |