nss: upgrade to release 3.73
[LibreOffice.git] / sw / source / core / inc / unoidx.hxx
blobc87460a3dd6903a3204d36bcd16a4a1220cc2506
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_SW_SOURCE_CORE_INC_UNOIDX_HXX
20 #define INCLUDED_SW_SOURCE_CORE_INC_UNOIDX_HXX
22 #include <com/sun/star/lang/XServiceInfo.hpp>
23 #include <com/sun/star/lang/XUnoTunnel.hpp>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/container/XNamed.hpp>
26 #include <com/sun/star/util/XRefreshable.hpp>
27 #include <com/sun/star/text/XDocumentIndexMark.hpp>
28 #include <com/sun/star/text/XDocumentIndex.hpp>
30 #include <cppuhelper/implbase.hxx>
32 #include <sfx2/Metadatable.hxx>
34 #include <toxe.hxx>
35 #include <unobaseclass.hxx>
37 class SwDoc;
38 class SwTOXBaseSection;
39 class SwTOXMark;
40 class SwTOXType;
42 typedef ::cppu::ImplInheritanceHelper
43 < ::sfx2::MetadatableMixin
44 , css::lang::XUnoTunnel
45 , css::lang::XServiceInfo
46 , css::beans::XPropertySet
47 , css::container::XNamed
48 , css::util::XRefreshable
49 , css::text::XDocumentIndex
50 > SwXDocumentIndex_Base;
52 class SwXDocumentIndex
53 : public SwXDocumentIndex_Base
56 private:
58 class StyleAccess_Impl;
59 class TokenAccess_Impl;
61 class Impl;
62 ::sw::UnoImplPtr<Impl> m_pImpl;
64 virtual ~SwXDocumentIndex() override;
66 SwXDocumentIndex(SwTOXBaseSection &, SwDoc &);
68 /// descriptor
69 SwXDocumentIndex(const TOXTypes eToxType, SwDoc& rDoc);
71 public:
73 static css::uno::Reference< css::text::XDocumentIndex>
74 CreateXDocumentIndex(SwDoc & rDoc, SwTOXBaseSection * pSection,
75 TOXTypes eTypes = TOX_INDEX);
77 // MetadatableMixin
78 virtual ::sfx2::Metadatable* GetCoreObject() override;
79 virtual css::uno::Reference< css::frame::XModel >
80 GetModel() override;
82 static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
84 // XUnoTunnel
85 virtual sal_Int64 SAL_CALL getSomething(
86 const css::uno::Sequence< sal_Int8 >& rIdentifier) override;
88 // XServiceInfo
89 virtual OUString SAL_CALL getImplementationName() override;
90 virtual sal_Bool SAL_CALL supportsService(
91 const OUString& rServiceName) override;
92 virtual css::uno::Sequence< OUString > SAL_CALL
93 getSupportedServiceNames() override;
95 // XComponent
96 virtual void SAL_CALL dispose() override;
97 virtual void SAL_CALL addEventListener(
98 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
99 virtual void SAL_CALL removeEventListener(
100 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
102 // XPropertySet
103 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
104 getPropertySetInfo() override;
105 virtual void SAL_CALL setPropertyValue(
106 const OUString& rPropertyName,
107 const css::uno::Any& rValue) override;
108 virtual css::uno::Any SAL_CALL getPropertyValue(
109 const OUString& rPropertyName) override;
110 virtual void SAL_CALL addPropertyChangeListener(
111 const OUString& rPropertyName,
112 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
113 virtual void SAL_CALL removePropertyChangeListener(
114 const OUString& rPropertyName,
115 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
116 virtual void SAL_CALL addVetoableChangeListener(
117 const OUString& rPropertyName,
118 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
119 virtual void SAL_CALL removeVetoableChangeListener(
120 const OUString& rPropertyName,
121 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
123 // XNamed
124 virtual OUString SAL_CALL getName() override;
125 virtual void SAL_CALL setName(const OUString& rName) override;
127 // XRefreshable
128 virtual void SAL_CALL refresh() override;
129 virtual void SAL_CALL addRefreshListener(
130 const css::uno::Reference< css::util::XRefreshListener>& xListener) override;
131 virtual void SAL_CALL removeRefreshListener(
132 const css::uno::Reference< css::util::XRefreshListener>& xListener) override;
134 // XTextContent
135 virtual void SAL_CALL attach(
136 const css::uno::Reference< css::text::XTextRange > & xTextRange) override;
137 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override;
139 // XDocumentIndex
140 virtual OUString SAL_CALL getServiceName() override;
141 virtual void SAL_CALL update() override;
145 typedef ::cppu::WeakImplHelper
146 < css::lang::XUnoTunnel
147 , css::lang::XServiceInfo
148 , css::beans::XPropertySet
149 , css::text::XDocumentIndexMark
150 > SwXDocumentIndexMark_Base;
152 class SwXDocumentIndexMark
153 : public SwXDocumentIndexMark_Base
156 private:
158 class Impl;
159 ::sw::UnoImplPtr<Impl> m_pImpl;
161 virtual ~SwXDocumentIndexMark() override;
163 SwXDocumentIndexMark(SwDoc & rDoc,
164 SwTOXType & rType, SwTOXMark & rMark);
166 /// descriptor
167 SwXDocumentIndexMark(const TOXTypes eToxType);
169 public:
171 static css::uno::Reference< css::text::XDocumentIndexMark>
172 CreateXDocumentIndexMark(SwDoc & rDoc,
173 SwTOXMark * pMark, TOXTypes eType = TOX_INDEX);
175 static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
177 // XUnoTunnel
178 virtual sal_Int64 SAL_CALL getSomething(
179 const css::uno::Sequence< sal_Int8 >& rIdentifier) override;
181 // XServiceInfo
182 virtual OUString SAL_CALL getImplementationName() override;
183 virtual sal_Bool SAL_CALL supportsService(
184 const OUString& rServiceName) override;
185 virtual css::uno::Sequence< OUString > SAL_CALL
186 getSupportedServiceNames() override;
188 // XComponent
189 virtual void SAL_CALL dispose() override;
190 virtual void SAL_CALL addEventListener(
191 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
192 virtual void SAL_CALL removeEventListener(
193 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
195 // XPropertySet
196 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
197 getPropertySetInfo() override;
198 virtual void SAL_CALL setPropertyValue(
199 const OUString& rPropertyName,
200 const css::uno::Any& rValue) override;
201 virtual css::uno::Any SAL_CALL getPropertyValue(
202 const OUString& rPropertyName) override;
203 virtual void SAL_CALL addPropertyChangeListener(
204 const OUString& rPropertyName,
205 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
206 virtual void SAL_CALL removePropertyChangeListener(
207 const OUString& rPropertyName,
208 const css::uno::Reference<css::beans::XPropertyChangeListener >& xListener) override;
209 virtual void SAL_CALL addVetoableChangeListener(
210 const OUString& rPropertyName,
211 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
212 virtual void SAL_CALL removeVetoableChangeListener(
213 const OUString& rPropertyName,
214 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
216 // XTextContent
217 virtual void SAL_CALL attach(
218 const css::uno::Reference< css::text::XTextRange > & xTextRange) override;
219 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override;
221 // XDocumentIndexMark
222 virtual OUString SAL_CALL getMarkEntry() override;
223 virtual void SAL_CALL setMarkEntry(const OUString& rIndexEntry) override;
227 #endif
229 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */