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 SW_UNOFIELDCOLL_HXX
21 #define SW_UNOFIELDCOLL_HXX
23 #include <boost/scoped_ptr.hpp>
25 #include <com/sun/star/util/XRefreshable.hpp>
27 #include <unocoll.hxx>
31 typedef ::cppu::WeakImplHelper2
32 < ::com::sun::star::container::XNameAccess
33 , ::com::sun::star::lang::XServiceInfo
34 > SwXTextFieldMasters_Base
;
36 class SwXTextFieldMasters
37 : public SwXTextFieldMasters_Base
38 , public SwUnoCollection
41 virtual ~SwXTextFieldMasters();
44 SwXTextFieldMasters(SwDoc
* pDoc
);
46 static sal_Bool
getInstanceName(const SwFieldType
& rFldType
, String
& rName
);
49 virtual OUString SAL_CALL
getImplementationName()
50 throw (::com::sun::star::uno::RuntimeException
);
51 virtual sal_Bool SAL_CALL
supportsService(
52 const OUString
& rServiceName
)
53 throw (::com::sun::star::uno::RuntimeException
);
54 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
55 getSupportedServiceNames()
56 throw (::com::sun::star::uno::RuntimeException
);
59 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
60 throw (::com::sun::star::uno::RuntimeException
);
61 virtual sal_Bool SAL_CALL
hasElements()
62 throw (::com::sun::star::uno::RuntimeException
);
65 virtual ::com::sun::star::uno::Any SAL_CALL
getByName(
66 const OUString
& rName
)
67 throw (::com::sun::star::container::NoSuchElementException
,
68 ::com::sun::star::lang::WrappedTargetException
,
69 ::com::sun::star::uno::RuntimeException
);
70 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
71 getElementNames() throw (::com::sun::star::uno::RuntimeException
);
72 virtual sal_Bool SAL_CALL
hasByName(const OUString
& rName
)
73 throw (::com::sun::star::uno::RuntimeException
);
77 typedef ::cppu::WeakImplHelper3
78 < ::com::sun::star::container::XEnumerationAccess
79 , ::com::sun::star::lang::XServiceInfo
80 , ::com::sun::star::util::XRefreshable
81 > SwXTextFieldTypes_Base
;
83 class SwXTextFieldTypes
84 : public SwXTextFieldTypes_Base
85 , public SwUnoCollection
89 ::boost::scoped_ptr
<Impl
> m_pImpl
; // currently does not need UnoImplPtr
92 virtual ~SwXTextFieldTypes();
95 SwXTextFieldTypes(SwDoc
* pDoc
);
98 virtual void Invalidate();
101 virtual OUString SAL_CALL
getImplementationName()
102 throw (::com::sun::star::uno::RuntimeException
);
103 virtual sal_Bool SAL_CALL
supportsService(
104 const OUString
& rServiceName
)
105 throw (::com::sun::star::uno::RuntimeException
);
106 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
107 getSupportedServiceNames()
108 throw (::com::sun::star::uno::RuntimeException
);
111 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
112 throw (::com::sun::star::uno::RuntimeException
);
113 virtual sal_Bool SAL_CALL
hasElements()
114 throw (::com::sun::star::uno::RuntimeException
);
116 // XEnumerationAccess
117 virtual ::com::sun::star::uno::Reference
<
118 ::com::sun::star::container::XEnumeration
> SAL_CALL
120 throw (::com::sun::star::uno::RuntimeException
);
123 virtual void SAL_CALL
refresh()
124 throw (::com::sun::star::uno::RuntimeException
);
125 virtual void SAL_CALL
addRefreshListener(
126 const ::com::sun::star::uno::Reference
<
127 ::com::sun::star::util::XRefreshListener
>& xListener
)
128 throw (::com::sun::star::uno::RuntimeException
);
129 virtual void SAL_CALL
removeRefreshListener(
130 const ::com::sun::star::uno::Reference
<
131 ::com::sun::star::util::XRefreshListener
>& xListener
)
132 throw (::com::sun::star::uno::RuntimeException
);
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */