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 INCLUDED_SW_SOURCE_CORE_INC_UNOSECTION_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_UNOSECTION_HXX
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>
31 #include <cppuhelper/implbase.hxx>
33 #include <sfx2/Metadatable.hxx>
35 #include <unobaseclass.hxx>
37 class SwSectionFormat
;
39 typedef ::cppu::ImplInheritanceHelper
40 < ::sfx2::MetadatableMixin
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
48 > SwXTextSection_Base
;
51 : public SwXTextSection_Base
57 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
59 SwXTextSection(SwSectionFormat
*const pFormat
, const bool bIndexHeader
);
61 virtual ~SwXTextSection() override
;
65 SwSectionFormat
* GetFormat() const;
67 static css::uno::Reference
< css::text::XTextSection
>
68 CreateXTextSection(SwSectionFormat
*const pFormat
,
69 const bool bIndexHeader
= false);
72 virtual ::sfx2::Metadatable
* GetCoreObject() override
;
73 virtual css::uno::Reference
< css::frame::XModel
>
76 static const css::uno::Sequence
< sal_Int8
>& getUnoTunnelId();
79 virtual sal_Int64 SAL_CALL
getSomething(
80 const css::uno::Sequence
< sal_Int8
>& rIdentifier
) override
;
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
;
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
;
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
;
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
;
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
;
145 virtual OUString SAL_CALL
getName() override
;
146 virtual void SAL_CALL
setName(const OUString
& rName
) override
;
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
;
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
;
161 #endif // INCLUDED_SW_SOURCE_CORE_INC_UNOSECTION_HXX
163 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */