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/XUnoTunnel.hpp>
24#include <com/sun/star/lang/XServiceInfo.hpp>
25#include <com/sun/star/beans/XPropertySet.hpp>
26#include <com/sun/star/beans/XPropertyState.hpp>
27#include <com/sun/star/beans/XMultiPropertySet.hpp>
28#include <com/sun/star/container/XNamed.hpp>
29#include <com/sun/star/text/XTextSection.hpp>
30
32
33#include <sfx2/Metadatable.hxx>
34
35#include <unobaseclass.hxx>
36
37class SwSectionFormat;
38
39typedef ::cppu::ImplInheritanceHelper
41, css::lang::XUnoTunnel
42, css::lang::XServiceInfo
43, css::beans::XPropertySet
44, css::beans::XPropertyState
45, css::beans::XMultiPropertySet
46, css::container::XNamed
47, css::text::XTextSection
49
50class SwXTextSection final
51 : public SwXTextSection_Base
52{
53
54private:
55
56 class Impl;
58
59 SwXTextSection(SwSectionFormat *const pFormat, const bool bIndexHeader);
60
61 virtual ~SwXTextSection() override;
62
63public:
64
66
67 static css::uno::Reference< css::text::XTextSection >
69 const bool bIndexHeader = false);
70
71 // MetadatableMixin
72 virtual ::sfx2::Metadatable* GetCoreObject() override;
73 virtual css::uno::Reference< css::frame::XModel >
74 GetModel() override;
75
76 static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
77
78 // XUnoTunnel
79 virtual sal_Int64 SAL_CALL getSomething(
80 const css::uno::Sequence< sal_Int8 >& rIdentifier) override;
81
82 // XServiceInfo
83 virtual OUString SAL_CALL getImplementationName() override;
84 virtual sal_Bool SAL_CALL supportsService(
85 const OUString& rServiceName) override;
86 virtual css::uno::Sequence< OUString > SAL_CALL
87 getSupportedServiceNames() override;
88
89 // XComponent
90 virtual void SAL_CALL dispose() override;
91 virtual void SAL_CALL addEventListener(
92 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
93 virtual void SAL_CALL removeEventListener(
94 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
95
96 // XPropertySet
97 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
98 getPropertySetInfo() override;
99 virtual void SAL_CALL setPropertyValue(
100 const OUString& rPropertyName,
101 const css::uno::Any& rValue) override;
102 virtual css::uno::Any SAL_CALL getPropertyValue(
103 const OUString& rPropertyName) override;
104 virtual void SAL_CALL addPropertyChangeListener(
105 const OUString& rPropertyName,
106 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
107 virtual void SAL_CALL removePropertyChangeListener(
108 const OUString& rPropertyName,
109 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
110 virtual void SAL_CALL addVetoableChangeListener(
111 const OUString& rPropertyName,
112 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
113 virtual void SAL_CALL removeVetoableChangeListener(
114 const OUString& rPropertyName,
115 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
116
117 // XPropertyState
118 virtual css::beans::PropertyState SAL_CALL
119 getPropertyState(const OUString& rPropertyName) override;
120 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL
122 const css::uno::Sequence< OUString >& rPropertyNames) override;
123 virtual void SAL_CALL setPropertyToDefault(
124 const OUString& rPropertyName) override;
125 virtual css::uno::Any SAL_CALL getPropertyDefault(
126 const OUString& rPropertyName) override;
127
128 // XMultiPropertySet
129 virtual void SAL_CALL setPropertyValues(
130 const css::uno::Sequence< OUString >& rPropertyNames,
131 const css::uno::Sequence< css::uno::Any >& rValues) override;
132 virtual css::uno::Sequence< css::uno::Any >
133 SAL_CALL getPropertyValues(
134 const css::uno::Sequence< OUString >& rPropertyNames) override;
135 virtual void SAL_CALL addPropertiesChangeListener(
136 const css::uno::Sequence< OUString >& rPropertyNames,
137 const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener) override;
138 virtual void SAL_CALL removePropertiesChangeListener(
139 const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener) override;
140 virtual void SAL_CALL firePropertiesChangeEvent(
141 const css::uno::Sequence< OUString >& rPropertyNames,
142 const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener) override;
143
144 // XNamed
145 virtual OUString SAL_CALL getName() override;
146 virtual void SAL_CALL setName(const OUString& rName) override;
147
148 // XTextContent
149 virtual void SAL_CALL attach(
150 const css::uno::Reference< css::text::XTextRange > & xTextRange) override;
151 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override;
152
153 // XTextSection
154 virtual css::uno::Reference< css::text::XTextSection > SAL_CALL
155 getParentSection() override;
156 virtual css::uno::Sequence< css::uno::Reference< css::text::XTextSection > > SAL_CALL
157 getChildSections() override;
158
159};
160
161#endif // INCLUDED_SW_SOURCE_CORE_INC_UNOSECTION_HXX
162
163/* 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:1296
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosect.cxx:1715
virtual ::sfx2::Metadatable * GetCoreObject() override
Definition: unosect.cxx:1725
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosect.cxx:1325
virtual css::uno::Reference< css::frame::XModel > GetModel() override
Definition: unosect.cxx:1731
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames) override
Definition: unosect.cxx:1260
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: unosect.cxx:1309
virtual OUString SAL_CALL getName() override
Definition: unosect.cxx:1635
static css::uno::Reference< css::text::XTextSection > CreateXTextSection(SwSectionFormat *const pFormat, const bool bIndexHeader=false)
Definition: unosect.cxx:194
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
Definition: unosect.cxx:434
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unosect.cxx:1288
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:925
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rIdentifier) override
Definition: unosect.cxx:235
virtual css::uno::Reference< css::text::XTextSection > SAL_CALL getParentSection() override
Definition: unosect.cxx:241
virtual void SAL_CALL dispose() override
Definition: unosect.cxx:481
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unosect.cxx:946
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: unosect.cxx:1303
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unosect.cxx:500
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &rPropertyNames) override
Definition: unosect.cxx:1358
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unosect.cxx:228
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:1582
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unosect.cxx:1341
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unosection.hxx:56
virtual void SAL_CALL setPropertyToDefault(const OUString &rPropertyName) override
Definition: unosect.cxx:1440
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unosect.cxx:492
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosect.cxx:1317
virtual void SAL_CALL setName(const OUString &rName) override
Definition: unosect.cxx:1656
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &rPropertyName) override
Definition: unosect.cxx:1349
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unosect.cxx:1709
virtual css::uno::Sequence< css::uno::Reference< css::text::XTextSection > > SAL_CALL getChildSections() override
Definition: unosect.cxx:254
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unosect.cxx:1333
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosect.cxx:509
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unosect.cxx:273
virtual OUString SAL_CALL getImplementationName() override
Definition: unosect.cxx:1704
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::XUnoTunnel, css::lang::XServiceInfo, css::beans::XPropertySet, css::beans::XPropertyState, css::beans::XMultiPropertySet, css::container::XNamed, css::text::XTextSection > SwXTextSection_Base
Definition: unosection.hxx:37