LibreOffice Module sw (master) 1
unosection.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_SOURCE_CORE_INC_UNOSECTION_HXX
21#define INCLUDED_SW_SOURCE_CORE_INC_UNOSECTION_HXX
22
23#include <com/sun/star/lang/XServiceInfo.hpp>
24#include <com/sun/star/beans/XPropertySet.hpp>
25#include <com/sun/star/beans/XPropertyState.hpp>
26#include <com/sun/star/beans/XMultiPropertySet.hpp>
27#include <com/sun/star/container/XNamed.hpp>
28#include <com/sun/star/text/XTextSection.hpp>
29
31
32#include <sfx2/Metadatable.hxx>
33
34#include <unobaseclass.hxx>
35
36class SwSectionFormat;
37
38typedef ::cppu::ImplInheritanceHelper
40, css::lang::XServiceInfo
41, css::beans::XPropertySet
42, css::beans::XPropertyState
43, css::beans::XMultiPropertySet
44, css::container::XNamed
45, css::text::XTextSection
47
48class SwXTextSection final
49 : public SwXTextSection_Base
50{
51
52private:
53
54 class Impl;
56
57 SwXTextSection(SwSectionFormat *const pFormat, const bool bIndexHeader);
58
59 virtual ~SwXTextSection() override;
60
61public:
62
64
67 const bool bIndexHeader = false);
68
69 // MetadatableMixin
70 virtual ::sfx2::Metadatable* GetCoreObject() override;
71 virtual css::uno::Reference< css::frame::XModel >
72 GetModel() override;
73
74 // XServiceInfo
75 virtual OUString SAL_CALL getImplementationName() override;
76 virtual sal_Bool SAL_CALL supportsService(
77 const OUString& rServiceName) override;
78 virtual css::uno::Sequence< OUString > SAL_CALL
79 getSupportedServiceNames() override;
80
81 // XComponent
82 virtual void SAL_CALL dispose() override;
83 virtual void SAL_CALL addEventListener(
84 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
85 virtual void SAL_CALL removeEventListener(
86 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
87
88 // XPropertySet
89 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
90 getPropertySetInfo() override;
91 virtual void SAL_CALL setPropertyValue(
92 const OUString& rPropertyName,
93 const css::uno::Any& rValue) override;
94 virtual css::uno::Any SAL_CALL getPropertyValue(
95 const OUString& rPropertyName) override;
96 virtual void SAL_CALL addPropertyChangeListener(
97 const OUString& rPropertyName,
98 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
99 virtual void SAL_CALL removePropertyChangeListener(
100 const OUString& rPropertyName,
101 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
102 virtual void SAL_CALL addVetoableChangeListener(
103 const OUString& rPropertyName,
104 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
105 virtual void SAL_CALL removeVetoableChangeListener(
106 const OUString& rPropertyName,
107 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
108
109 // XPropertyState
110 virtual css::beans::PropertyState SAL_CALL
111 getPropertyState(const OUString& rPropertyName) override;
112 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL
114 const css::uno::Sequence< OUString >& rPropertyNames) override;
115 virtual void SAL_CALL setPropertyToDefault(
116 const OUString& rPropertyName) override;
117 virtual css::uno::Any SAL_CALL getPropertyDefault(
118 const OUString& rPropertyName) override;
119
120 // XMultiPropertySet
121 virtual void SAL_CALL setPropertyValues(
122 const css::uno::Sequence< OUString >& rPropertyNames,
123 const css::uno::Sequence< css::uno::Any >& rValues) override;
124 virtual css::uno::Sequence< css::uno::Any >
125 SAL_CALL getPropertyValues(
126 const css::uno::Sequence< OUString >& rPropertyNames) override;
127 virtual void SAL_CALL addPropertiesChangeListener(
128 const css::uno::Sequence< OUString >& rPropertyNames,
129 const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener) override;
130 virtual void SAL_CALL removePropertiesChangeListener(
131 const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener) override;
132 virtual void SAL_CALL firePropertiesChangeEvent(
133 const css::uno::Sequence< OUString >& rPropertyNames,
134 const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener) override;
135
136 // XNamed
137 virtual OUString SAL_CALL getName() override;
138 virtual void SAL_CALL setName(const OUString& rName) override;
139
140 // XTextContent
141 virtual void SAL_CALL attach(
142 const css::uno::Reference< css::text::XTextRange > & xTextRange) override;
143 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override;
144
145 // XTextSection
146 virtual css::uno::Reference< css::text::XTextSection > SAL_CALL
147 getParentSection() override;
148 virtual css::uno::Sequence< css::uno::Reference< css::text::XTextSection > > SAL_CALL
149 getChildSections() override;
150
151};
152
153#endif // INCLUDED_SW_SOURCE_CORE_INC_UNOSECTION_HXX
154
155/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: unosect.cxx:1283
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosect.cxx:1702
virtual ::sfx2::Metadatable * GetCoreObject() override
Definition: unosect.cxx:1712
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosect.cxx:1312
virtual css::uno::Reference< css::frame::XModel > GetModel() override
Definition: unosect.cxx:1718
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames) override
Definition: unosect.cxx:1247
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: unosect.cxx:1296
virtual OUString SAL_CALL getName() override
Definition: unosect.cxx:1622
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
Definition: unosect.cxx:421
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unosect.cxx:1275
virtual ~SwXTextSection() override
Definition: unosect.cxx:224
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Sequence< css::uno::Any > &rValues) override
Definition: unosect.cxx:912
virtual css::uno::Reference< css::text::XTextSection > SAL_CALL getParentSection() override
Definition: unosect.cxx:229
virtual void SAL_CALL dispose() override
Definition: unosect.cxx:468
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unosect.cxx:933
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: unosect.cxx:1290
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unosect.cxx:487
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &rPropertyNames) override
Definition: unosect.cxx:1345
SwSectionFormat * GetFormat() const
Definition: unosect.cxx:188
SwXTextSection(SwSectionFormat *const pFormat, const bool bIndexHeader)
Definition: unosect.cxx:218
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &rPropertyName) override
Definition: unosect.cxx:1569
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unosect.cxx:1328
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unosection.hxx:54
virtual void SAL_CALL setPropertyToDefault(const OUString &rPropertyName) override
Definition: unosect.cxx:1427
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unosect.cxx:479
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosect.cxx:1304
virtual void SAL_CALL setName(const OUString &rName) override
Definition: unosect.cxx:1643
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &rPropertyName) override
Definition: unosect.cxx:1336
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unosect.cxx:1696
static rtl::Reference< SwXTextSection > CreateXTextSection(SwSectionFormat *const pFormat, const bool bIndexHeader=false)
Definition: unosect.cxx:194
virtual css::uno::Sequence< css::uno::Reference< css::text::XTextSection > > SAL_CALL getChildSections() override
Definition: unosect.cxx:242
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unosect.cxx:1320
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosect.cxx:496
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unosect.cxx:261
virtual OUString SAL_CALL getImplementationName() override
Definition: unosect.cxx:1691
std::unique_ptr< T, UnoImplPtrDeleter< T > > UnoImplPtr
Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex.
unsigned char sal_Bool
::cppu::ImplInheritanceHelper< ::sfx2::MetadatableMixin, css::lang::XServiceInfo, css::beans::XPropertySet, css::beans::XPropertyState, css::beans::XMultiPropertySet, css::container::XNamed, css::text::XTextSection > SwXTextSection_Base
Definition: unosection.hxx:36