1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SW_INC_UNOFIELDCOLL_HXX
21 #define INCLUDED_SW_INC_UNOFIELDCOLL_HXX
25 #include <com/sun/star/util/XRefreshable.hpp>
26 #include <com/sun/star/container/XUniqueIDAccess.hpp>
28 #include "unocoll.hxx"
32 typedef ::cppu::WeakImplHelper
33 < css::container::XNameAccess
34 , css::lang::XServiceInfo
35 > SwXTextFieldMasters_Base
;
37 class SAL_DLLPUBLIC_RTTI SwXTextFieldMasters final
38 : public SwXTextFieldMasters_Base
39 , public SwUnoCollection
41 virtual ~SwXTextFieldMasters() override
;
44 SwXTextFieldMasters(SwDoc
* pDoc
);
46 static bool getInstanceName(const SwFieldType
& rFieldType
, OUString
& rName
);
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
;
56 virtual css::uno::Type SAL_CALL
getElementType() override
;
57 virtual sal_Bool SAL_CALL
hasElements() override
;
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 SW_DLLPUBLIC
virtual sal_Bool SAL_CALL
hasByName(const OUString
& rName
) override
;
66 SW_DLLPUBLIC
rtl::Reference
<SwXFieldMaster
> getFieldMasterByName(const OUString
& rName
);
69 typedef ::cppu::WeakImplHelper
70 < css::container::XEnumerationAccess
71 , css::lang::XServiceInfo
72 , css::util::XRefreshable
73 , css::container::XUniqueIDAccess
74 > SwXTextFieldTypes_Base
;
76 class SwXTextFieldTypes final
77 : public SwXTextFieldTypes_Base
78 , public SwUnoCollection
82 std::unique_ptr
<Impl
> m_pImpl
; // currently does not need UnoImplPtr
84 virtual ~SwXTextFieldTypes() override
;
87 SwXTextFieldTypes(SwDoc
* pDoc
);
90 virtual void Invalidate() override
;
93 virtual OUString SAL_CALL
getImplementationName() override
;
94 virtual sal_Bool SAL_CALL
supportsService(
95 const OUString
& rServiceName
) override
;
96 virtual css::uno::Sequence
< OUString
> SAL_CALL
97 getSupportedServiceNames() override
;
100 virtual css::uno::Type SAL_CALL
getElementType() override
;
101 virtual sal_Bool SAL_CALL
hasElements() override
;
103 // XEnumerationAccess
104 virtual css::uno::Reference
<
105 css::container::XEnumeration
> SAL_CALL
106 createEnumeration() override
;
109 virtual void SAL_CALL
refresh() override
;
110 virtual void SAL_CALL
addRefreshListener(
111 const css::uno::Reference
<
112 css::util::XRefreshListener
>& xListener
) override
;
113 virtual void SAL_CALL
removeRefreshListener(
114 const css::uno::Reference
<
115 css::util::XRefreshListener
>& xListener
) override
;
117 // container::XUniqueIDAccess
118 virtual css::uno::Any SAL_CALL
getByUniqueID( const OUString
& ID
) override
;
119 virtual void SAL_CALL
removeByUniqueID( const OUString
& ID
) override
;
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */