LibreOffice Module sw (master)  1
unofieldcoll.hxx
Go to the documentation of this file.
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 
20 #ifndef INCLUDED_SW_INC_UNOFIELDCOLL_HXX
21 #define INCLUDED_SW_INC_UNOFIELDCOLL_HXX
22 
23 #include <memory>
24 
25 #include <com/sun/star/util/XRefreshable.hpp>
26 
27 #include "unocoll.hxx"
28 
30 
31 typedef ::cppu::WeakImplHelper
32 < css::container::XNameAccess
33 , css::lang::XServiceInfo
35 
38  , public SwUnoCollection
39 {
40  virtual ~SwXTextFieldMasters() override;
41 
42 public:
44 
45  static bool getInstanceName(const SwFieldType& rFieldType, OUString& rName);
46 
47  // XServiceInfo
48  virtual OUString SAL_CALL getImplementationName() override;
49  virtual sal_Bool SAL_CALL supportsService(
50  const OUString& rServiceName) override;
51  virtual css::uno::Sequence< OUString > SAL_CALL
52  getSupportedServiceNames() override;
53 
54  // XElementAccess
55  virtual css::uno::Type SAL_CALL getElementType() override;
56  virtual sal_Bool SAL_CALL hasElements() override;
57 
58  // XNameAccess
59  virtual css::uno::Any SAL_CALL getByName(
60  const OUString& rName) override;
61  virtual css::uno::Sequence< OUString > SAL_CALL
62  getElementNames() override;
63  virtual sal_Bool SAL_CALL hasByName(const OUString& rName) override;
64 
65 };
66 
67 typedef ::cppu::WeakImplHelper
68 < css::container::XEnumerationAccess
69 , css::lang::XServiceInfo
70 , css::util::XRefreshable
72 
73 class SwXTextFieldTypes final
74  : public SwXTextFieldTypes_Base
75  , public SwUnoCollection
76 {
77 private:
78  class Impl;
79  std::unique_ptr<Impl> m_pImpl; // currently does not need UnoImplPtr
80 
81  virtual ~SwXTextFieldTypes() override;
82 
83 public:
84  SwXTextFieldTypes(SwDoc* pDoc);
85 
86  // SwUnoCollection
87  virtual void Invalidate() override;
88 
89  // XServiceInfo
90  virtual OUString SAL_CALL getImplementationName() override;
91  virtual sal_Bool SAL_CALL supportsService(
92  const OUString& rServiceName) override;
93  virtual css::uno::Sequence< OUString > SAL_CALL
94  getSupportedServiceNames() override;
95 
96  // XElementAccess
97  virtual css::uno::Type SAL_CALL getElementType() override;
98  virtual sal_Bool SAL_CALL hasElements() override;
99 
100  // XEnumerationAccess
101  virtual css::uno::Reference<
102  css::container::XEnumeration > SAL_CALL
103  createEnumeration() override;
104 
105  // XRefreshable
106  virtual void SAL_CALL refresh() override;
107  virtual void SAL_CALL addRefreshListener(
108  const css::uno::Reference<
109  css::util::XRefreshListener>& xListener) override;
110  virtual void SAL_CALL removeRefreshListener(
111  const css::uno::Reference<
112  css::util::XRefreshListener>& xListener) override;
113 
114 };
115 
116 #endif
117 
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:234
SwXTextFieldMasters(SwDoc *pDoc)
Definition: unofield.cxx:2703
virtual ~SwXTextFieldTypes() override
Definition: unofield.cxx:2908
virtual css::uno::Any SAL_CALL getByName(const OUString &rName) override
Definition: unofield.cxx:2761
Definition: doc.hxx:185
virtual void Invalidate() override
Definition: unofield.cxx:2912
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unofield.cxx:2891
std::unique_ptr< Impl > m_pImpl
virtual sal_Bool SAL_CALL hasElements() override
Definition: unofield.cxx:2867
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unofield.cxx:2919
SwXTextFieldTypes(SwDoc *pDoc)
Definition: unofield.cxx:2902
static bool getInstanceName(const SwFieldType &rFieldType, OUString &rName)
Definition: unofield.cxx:2786
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unofield.cxx:2697
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: unofield.cxx:2820
virtual OUString SAL_CALL getImplementationName() override
Definition: unofield.cxx:2687
unsigned char sal_Bool
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unofield.cxx:2692
virtual OUString SAL_CALL getImplementationName() override
Definition: unofield.cxx:2886
virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &xListener) override
Definition: unofield.cxx:2956
virtual sal_Bool SAL_CALL hasElements() override
Definition: unofield.cxx:2932
virtual sal_Bool SAL_CALL hasByName(const OUString &rName) override
Definition: unofield.cxx:2844
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unofield.cxx:2896
virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &xListener) override
Definition: unofield.cxx:2963
virtual void SAL_CALL refresh() override
Definition: unofield.cxx:2940
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unofield.cxx:2927
virtual ~SwXTextFieldMasters() override
Definition: unofield.cxx:2708
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unofield.cxx:2861
::cppu::WeakImplHelper< css::container::XEnumerationAccess, css::lang::XServiceInfo, css::util::XRefreshable > SwXTextFieldTypes_Base
::cppu::WeakImplHelper< css::container::XNameAccess, css::lang::XServiceInfo > SwXTextFieldMasters_Base