LibreOffice Module sw (master) 1
unoidx.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#ifndef INCLUDED_SW_SOURCE_CORE_INC_UNOIDX_HXX
20#define INCLUDED_SW_SOURCE_CORE_INC_UNOIDX_HXX
21
22#include <com/sun/star/lang/XServiceInfo.hpp>
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/container/XNamed.hpp>
25#include <com/sun/star/util/XRefreshable.hpp>
26#include <com/sun/star/text/XDocumentIndexMark.hpp>
27#include <com/sun/star/text/XDocumentIndex.hpp>
28
30
31#include <sfx2/Metadatable.hxx>
32
33#include <toxe.hxx>
34#include <unobaseclass.hxx>
35
36class SwDoc;
38class SwTOXMark;
39class SwTOXType;
40
41typedef ::cppu::ImplInheritanceHelper
43, css::lang::XServiceInfo
44, css::beans::XPropertySet
45, css::container::XNamed
46, css::util::XRefreshable
47, css::text::XDocumentIndex
49
52{
53
54private:
55
56 class StyleAccess_Impl;
57 class TokenAccess_Impl;
58
59 class Impl;
61
62 virtual ~SwXDocumentIndex() override;
63
65
67 SwXDocumentIndex(const TOXTypes eToxType, SwDoc& rDoc);
68
69public:
70
73 TOXTypes eTypes = TOX_INDEX);
74
75 // MetadatableMixin
76 virtual ::sfx2::Metadatable* GetCoreObject() override;
77 virtual css::uno::Reference< css::frame::XModel >
78 GetModel() override;
79
80 // XServiceInfo
81 virtual OUString SAL_CALL getImplementationName() override;
82 virtual sal_Bool SAL_CALL supportsService(
83 const OUString& rServiceName) override;
84 virtual css::uno::Sequence< OUString > SAL_CALL
85 getSupportedServiceNames() override;
86
87 // XComponent
88 virtual void SAL_CALL dispose() override;
89 virtual void SAL_CALL addEventListener(
90 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
91 virtual void SAL_CALL removeEventListener(
92 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
93
94 // XPropertySet
95 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
96 getPropertySetInfo() override;
97 virtual void SAL_CALL setPropertyValue(
98 const OUString& rPropertyName,
99 const css::uno::Any& rValue) override;
100 virtual css::uno::Any SAL_CALL getPropertyValue(
101 const OUString& rPropertyName) override;
102 virtual void SAL_CALL addPropertyChangeListener(
103 const OUString& rPropertyName,
104 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
105 virtual void SAL_CALL removePropertyChangeListener(
106 const OUString& rPropertyName,
107 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
108 virtual void SAL_CALL addVetoableChangeListener(
109 const OUString& rPropertyName,
110 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
111 virtual void SAL_CALL removeVetoableChangeListener(
112 const OUString& rPropertyName,
113 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
114
115 // XNamed
116 virtual OUString SAL_CALL getName() override;
117 virtual void SAL_CALL setName(const OUString& rName) override;
118
119 // XRefreshable
120 virtual void SAL_CALL refresh() override;
121 virtual void SAL_CALL addRefreshListener(
122 const css::uno::Reference< css::util::XRefreshListener>& xListener) override;
123 virtual void SAL_CALL removeRefreshListener(
124 const css::uno::Reference< css::util::XRefreshListener>& xListener) override;
125
126 // XTextContent
127 virtual void SAL_CALL attach(
128 const css::uno::Reference< css::text::XTextRange > & xTextRange) override;
129 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override;
130
131 // XDocumentIndex
132 virtual OUString SAL_CALL getServiceName() override;
133 virtual void SAL_CALL update() override;
134
135};
136
137typedef ::cppu::WeakImplHelper
138< css::lang::XServiceInfo
139, css::beans::XPropertySet
140, css::text::XDocumentIndexMark
142
145{
146
147private:
148
149 class Impl;
151
152 virtual ~SwXDocumentIndexMark() override;
153
155 const SwTOXType & rType, const SwTOXMark & rMark);
156
158 SwXDocumentIndexMark(const TOXTypes eToxType);
159
160public:
161
164 SwTOXMark * pMark, TOXTypes eType = TOX_INDEX);
165
166 // XServiceInfo
167 virtual OUString SAL_CALL getImplementationName() override;
168 virtual sal_Bool SAL_CALL supportsService(
169 const OUString& rServiceName) override;
170 virtual css::uno::Sequence< OUString > SAL_CALL
171 getSupportedServiceNames() override;
172
173 // XComponent
174 virtual void SAL_CALL dispose() override;
175 virtual void SAL_CALL addEventListener(
176 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
177 virtual void SAL_CALL removeEventListener(
178 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
179
180 // XPropertySet
181 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
182 getPropertySetInfo() override;
183 virtual void SAL_CALL setPropertyValue(
184 const OUString& rPropertyName,
185 const css::uno::Any& rValue) override;
186 virtual css::uno::Any SAL_CALL getPropertyValue(
187 const OUString& rPropertyName) override;
188 virtual void SAL_CALL addPropertyChangeListener(
189 const OUString& rPropertyName,
190 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
191 virtual void SAL_CALL removePropertyChangeListener(
192 const OUString& rPropertyName,
193 const css::uno::Reference<css::beans::XPropertyChangeListener >& xListener) override;
194 virtual void SAL_CALL addVetoableChangeListener(
195 const OUString& rPropertyName,
196 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
197 virtual void SAL_CALL removeVetoableChangeListener(
198 const OUString& rPropertyName,
199 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
200
201 // XTextContent
202 virtual void SAL_CALL attach(
203 const css::uno::Reference< css::text::XTextRange > & xTextRange) override;
204 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override;
205
206 // XDocumentIndexMark
207 virtual OUString SAL_CALL getMarkEntry() override;
208 virtual void SAL_CALL setMarkEntry(const OUString& rIndexEntry) override;
209
210};
211
212#endif
213
214/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: doc.hxx:197
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoidx.cxx:2279
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unoidx.cxx:1675
static rtl::Reference< SwXDocumentIndexMark > CreateXDocumentIndexMark(SwDoc &rDoc, SwTOXMark *pMark, TOXTypes eType=TOX_INDEX)
Definition: unoidx.cxx:1638
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoidx.cxx:2014
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unoidx.cxx:2043
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unoidx.cxx:2172
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unoidx.cxx:1762
virtual ~SwXDocumentIndexMark() override
Definition: unoidx.cxx:1633
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unoidx.hxx:149
SwXDocumentIndexMark(SwDoc &rDoc, const SwTOXType &rType, const SwTOXMark &rMark)
Definition: unoidx.cxx:1626
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoidx.cxx:2303
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
Definition: unoidx.cxx:1950
virtual OUString SAL_CALL getMarkEntry() override
Definition: unoidx.cxx:1710
virtual void SAL_CALL dispose() override
Definition: unoidx.cxx:1984
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoidx.cxx:1681
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoidx.cxx:2287
virtual void SAL_CALL setMarkEntry(const OUString &rIndexEntry) override
Definition: unoidx.cxx:1729
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unoidx.cxx:2005
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoidx.cxx:2295
virtual OUString SAL_CALL getImplementationName() override
Definition: unoidx.cxx:1670
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unoidx.cxx:1996
static rtl::Reference< SwXDocumentIndex > CreateXDocumentIndex(SwDoc &rDoc, SwTOXBaseSection *pSection, TOXTypes eTypes=TOX_INDEX)
Definition: unoidx.cxx:401
virtual ::sfx2::Metadatable * GetCoreObject() override
Definition: unoidx.cxx:1470
virtual css::uno::Reference< css::frame::XModel > GetModel() override
Definition: unoidx.cxx:1476
virtual void SAL_CALL dispose() override
Definition: unoidx.cxx:1390
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoidx.cxx:1218
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unoidx.cxx:865
SwXDocumentIndex(SwTOXBaseSection &, SwDoc &)
Definition: unoidx.cxx:384
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unoidx.cxx:1404
virtual void SAL_CALL refresh() override
Definition: unoidx.cxx:1262
virtual ~SwXDocumentIndex() override
Definition: unoidx.cxx:396
virtual OUString SAL_CALL getServiceName() override
Definition: unoidx.cxx:474
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unoidx.cxx:1413
virtual void SAL_CALL update() override
Definition: unoidx.cxx:499
virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &xListener) override
Definition: unoidx.cxx:1293
virtual void SAL_CALL setName(const OUString &rName) override
Definition: unoidx.cxx:1440
virtual OUString SAL_CALL getImplementationName() override
Definition: unoidx.cxx:428
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoidx.cxx:1226
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoidx.cxx:440
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
Definition: unoidx.cxx:1365
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unoidx.hxx:59
virtual OUString SAL_CALL getName() override
Definition: unoidx.cxx:1421
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unoidx.cxx:434
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoidx.cxx:505
virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &xListener) override
Definition: unoidx.cxx:1301
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoidx.cxx:1234
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unoidx.cxx:515
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoidx.cxx:1210
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unoidx.cxx:1310
std::unique_ptr< T, UnoImplPtrDeleter< T > > UnoImplPtr
Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex.
TOXTypes
Definition: toxe.hxx:40
@ TOX_INDEX
Definition: toxe.hxx:41
unsigned char sal_Bool
::cppu::ImplInheritanceHelper< ::sfx2::MetadatableMixin, css::lang::XServiceInfo, css::beans::XPropertySet, css::container::XNamed, css::util::XRefreshable, css::text::XDocumentIndex > SwXDocumentIndex_Base
Definition: unoidx.hxx:39
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::beans::XPropertySet, css::text::XDocumentIndexMark > SwXDocumentIndexMark_Base
Definition: unoidx.hxx:141