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 protected:
41  virtual ~SwXTextFieldMasters() override;
42 
43 public:
45 
46  static bool getInstanceName(const SwFieldType& rFieldType, OUString& rName);
47 
48  // XServiceInfo
49  virtual OUString SAL_CALL getImplementationName() override;
50  virtual sal_Bool SAL_CALL supportsService(
51  const OUString& rServiceName) override;
52  virtual css::uno::Sequence< OUString > SAL_CALL
53  getSupportedServiceNames() override;
54 
55  // XElementAccess
56  virtual css::uno::Type SAL_CALL getElementType() override;
57  virtual sal_Bool SAL_CALL hasElements() override;
58 
59  // XNameAccess
60  virtual css::uno::Any SAL_CALL getByName(
61  const OUString& rName) override;
62  virtual css::uno::Sequence< OUString > SAL_CALL
63  getElementNames() override;
64  virtual sal_Bool SAL_CALL hasByName(const OUString& rName) override;
65 
66 };
67 
68 typedef ::cppu::WeakImplHelper
69 < css::container::XEnumerationAccess
70 , css::lang::XServiceInfo
71 , css::util::XRefreshable
73 
75  : public SwXTextFieldTypes_Base
76  , public SwUnoCollection
77 {
78 private:
79  class Impl;
80  std::unique_ptr<Impl> m_pImpl; // currently does not need UnoImplPtr
81 
82 protected:
83  virtual ~SwXTextFieldTypes() override;
84 
85 public:
86  SwXTextFieldTypes(SwDoc* pDoc);
87 
88  // SwUnoCollection
89  virtual void Invalidate() override;
90 
91  // XServiceInfo
92  virtual OUString SAL_CALL getImplementationName() override;
93  virtual sal_Bool SAL_CALL supportsService(
94  const OUString& rServiceName) override;
95  virtual css::uno::Sequence< OUString > SAL_CALL
96  getSupportedServiceNames() override;
97 
98  // XElementAccess
99  virtual css::uno::Type SAL_CALL getElementType() override;
100  virtual sal_Bool SAL_CALL hasElements() override;
101 
102  // XEnumerationAccess
103  virtual css::uno::Reference<
104  css::container::XEnumeration > SAL_CALL
105  createEnumeration() override;
106 
107  // XRefreshable
108  virtual void SAL_CALL refresh() override;
109  virtual void SAL_CALL addRefreshListener(
110  const css::uno::Reference<
111  css::util::XRefreshListener>& xListener) override;
112  virtual void SAL_CALL removeRefreshListener(
113  const css::uno::Reference<
114  css::util::XRefreshListener>& xListener) override;
115 
116 };
117 
118 #endif
119 
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:233
SwXTextFieldMasters(SwDoc *pDoc)
Definition: unofield.cxx:2704
virtual ~SwXTextFieldTypes() override
Definition: unofield.cxx:2909
virtual css::uno::Any SAL_CALL getByName(const OUString &rName) override
Definition: unofield.cxx:2762
Definition: doc.hxx:185
virtual void Invalidate() override
Definition: unofield.cxx:2913
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unofield.cxx:2892
std::unique_ptr< Impl > m_pImpl
virtual sal_Bool SAL_CALL hasElements() override
Definition: unofield.cxx:2868
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unofield.cxx:2920
SwXTextFieldTypes(SwDoc *pDoc)
Definition: unofield.cxx:2903
static bool getInstanceName(const SwFieldType &rFieldType, OUString &rName)
Definition: unofield.cxx:2787
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unofield.cxx:2698
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: unofield.cxx:2821
virtual OUString SAL_CALL getImplementationName() override
Definition: unofield.cxx:2688
unsigned char sal_Bool
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unofield.cxx:2693
virtual OUString SAL_CALL getImplementationName() override
Definition: unofield.cxx:2887
virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &xListener) override
Definition: unofield.cxx:2957
virtual sal_Bool SAL_CALL hasElements() override
Definition: unofield.cxx:2933
virtual sal_Bool SAL_CALL hasByName(const OUString &rName) override
Definition: unofield.cxx:2845
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unofield.cxx:2897
virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &xListener) override
Definition: unofield.cxx:2964
virtual void SAL_CALL refresh() override
Definition: unofield.cxx:2941
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unofield.cxx:2928
virtual ~SwXTextFieldMasters() override
Definition: unofield.cxx:2709
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unofield.cxx:2862
::cppu::WeakImplHelper< css::container::XEnumerationAccess, css::lang::XServiceInfo, css::util::XRefreshable > SwXTextFieldTypes_Base
::cppu::WeakImplHelper< css::container::XNameAccess, css::lang::XServiceInfo > SwXTextFieldMasters_Base