merged tag ooo/OOO330_m14
[LibreOffice.git] / sw / inc / unosection.hxx
blobe54bdd5775af3aa3c30509da6f4d49d54786148d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef SW_UNOSECTION_HXX
29 #define SW_UNOSECTION_HXX
31 #include <com/sun/star/lang/XUnoTunnel.hpp>
32 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <com/sun/star/beans/XPropertySet.hpp>
34 #include <com/sun/star/beans/XPropertyState.hpp>
35 #include <com/sun/star/beans/XMultiPropertySet.hpp>
36 #include <com/sun/star/container/XNamed.hpp>
37 #include <com/sun/star/text/XTextContent.hpp>
38 #include <com/sun/star/text/XTextSection.hpp>
40 #include <cppuhelper/implbase7.hxx>
42 #include <sfx2/Metadatable.hxx>
44 #include <unobaseclass.hxx>
47 class SwSectionFmt;
50 /*-----------------09.03.98 13:57-------------------
52 --------------------------------------------------*/
55 struct SwTextSectionProperties_Impl;
57 typedef ::cppu::ImplInheritanceHelper7
58 < ::sfx2::MetadatableMixin
59 , ::com::sun::star::lang::XUnoTunnel
60 , ::com::sun::star::lang::XServiceInfo
61 , ::com::sun::star::beans::XPropertySet
62 , ::com::sun::star::beans::XPropertyState
63 , ::com::sun::star::beans::XMultiPropertySet
64 , ::com::sun::star::container::XNamed
65 , ::com::sun::star::text::XTextSection
66 > SwXTextSection_Base;
68 class SwXTextSection
69 : public SwXTextSection_Base
72 private:
74 class Impl;
75 ::sw::UnoImplPtr<Impl> m_pImpl;
77 SwXTextSection(SwSectionFmt *const pFmt, const bool bIndexHeader = false);
79 virtual ~SwXTextSection();
81 public:
83 SwSectionFmt* GetFmt() const;
85 static ::com::sun::star::uno::Reference<
86 ::com::sun::star::text::XTextSection >
87 CreateXTextSection(SwSectionFmt *const pFmt = 0,
88 const bool bIndexHeader = false);
90 // MetadatableMixin
91 virtual ::sfx2::Metadatable* GetCoreObject();
92 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
93 GetModel();
95 static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
97 // XUnoTunnel
98 virtual sal_Int64 SAL_CALL getSomething(
99 const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
100 throw (::com::sun::star::uno::RuntimeException);
102 // XServiceInfo
103 virtual ::rtl::OUString SAL_CALL getImplementationName()
104 throw (::com::sun::star::uno::RuntimeException);
105 virtual sal_Bool SAL_CALL supportsService(
106 const ::rtl::OUString& rServiceName)
107 throw (::com::sun::star::uno::RuntimeException);
108 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
109 getSupportedServiceNames()
110 throw (::com::sun::star::uno::RuntimeException);
112 // XComponent
113 virtual void SAL_CALL dispose()
114 throw (::com::sun::star::uno::RuntimeException);
115 virtual void SAL_CALL addEventListener(
116 const ::com::sun::star::uno::Reference<
117 ::com::sun::star::lang::XEventListener > & xListener)
118 throw (::com::sun::star::uno::RuntimeException);
119 virtual void SAL_CALL removeEventListener(
120 const ::com::sun::star::uno::Reference<
121 ::com::sun::star::lang::XEventListener > & xListener)
122 throw (::com::sun::star::uno::RuntimeException);
124 // XPropertySet
125 virtual ::com::sun::star::uno::Reference<
126 ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
127 getPropertySetInfo()
128 throw (::com::sun::star::uno::RuntimeException);
129 virtual void SAL_CALL setPropertyValue(
130 const ::rtl::OUString& rPropertyName,
131 const ::com::sun::star::uno::Any& rValue)
132 throw (::com::sun::star::beans::UnknownPropertyException,
133 ::com::sun::star::beans::PropertyVetoException,
134 ::com::sun::star::lang::IllegalArgumentException,
135 ::com::sun::star::lang::WrappedTargetException,
136 ::com::sun::star::uno::RuntimeException);
137 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
138 const ::rtl::OUString& rPropertyName)
139 throw (::com::sun::star::beans::UnknownPropertyException,
140 ::com::sun::star::lang::WrappedTargetException,
141 ::com::sun::star::uno::RuntimeException);
142 virtual void SAL_CALL addPropertyChangeListener(
143 const ::rtl::OUString& rPropertyName,
144 const ::com::sun::star::uno::Reference<
145 ::com::sun::star::beans::XPropertyChangeListener >& xListener)
146 throw (::com::sun::star::beans::UnknownPropertyException,
147 ::com::sun::star::lang::WrappedTargetException,
148 ::com::sun::star::uno::RuntimeException);
149 virtual void SAL_CALL removePropertyChangeListener(
150 const ::rtl::OUString& rPropertyName,
151 const ::com::sun::star::uno::Reference<
152 ::com::sun::star::beans::XPropertyChangeListener >& xListener)
153 throw (::com::sun::star::beans::UnknownPropertyException,
154 ::com::sun::star::lang::WrappedTargetException,
155 ::com::sun::star::uno::RuntimeException);
156 virtual void SAL_CALL addVetoableChangeListener(
157 const ::rtl::OUString& rPropertyName,
158 const ::com::sun::star::uno::Reference<
159 ::com::sun::star::beans::XVetoableChangeListener >& xListener)
160 throw (::com::sun::star::beans::UnknownPropertyException,
161 ::com::sun::star::lang::WrappedTargetException,
162 ::com::sun::star::uno::RuntimeException);
163 virtual void SAL_CALL removeVetoableChangeListener(
164 const ::rtl::OUString& rPropertyName,
165 const ::com::sun::star::uno::Reference<
166 ::com::sun::star::beans::XVetoableChangeListener >& xListener)
167 throw (::com::sun::star::beans::UnknownPropertyException,
168 ::com::sun::star::lang::WrappedTargetException,
169 ::com::sun::star::uno::RuntimeException);
171 // XPropertyState
172 virtual ::com::sun::star::beans::PropertyState SAL_CALL
173 getPropertyState(const ::rtl::OUString& rPropertyName)
174 throw (::com::sun::star::beans::UnknownPropertyException,
175 ::com::sun::star::uno::RuntimeException);
176 virtual ::com::sun::star::uno::Sequence<
177 ::com::sun::star::beans::PropertyState > SAL_CALL
178 getPropertyStates(
179 const ::com::sun::star::uno::Sequence<
180 ::rtl::OUString >& rPropertyNames)
181 throw (::com::sun::star::beans::UnknownPropertyException,
182 ::com::sun::star::uno::RuntimeException);
183 virtual void SAL_CALL setPropertyToDefault(
184 const ::rtl::OUString& rPropertyName)
185 throw (::com::sun::star::beans::UnknownPropertyException,
186 ::com::sun::star::uno::RuntimeException);
187 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
188 const ::rtl::OUString& rPropertyName)
189 throw (::com::sun::star::beans::UnknownPropertyException,
190 ::com::sun::star::lang::WrappedTargetException,
191 ::com::sun::star::uno::RuntimeException);
193 // XMultiPropertySet
194 virtual void SAL_CALL setPropertyValues(
195 const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
196 rPropertyNames,
197 const ::com::sun::star::uno::Sequence<
198 ::com::sun::star::uno::Any >& rValues)
199 throw (::com::sun::star::beans::PropertyVetoException,
200 ::com::sun::star::lang::IllegalArgumentException,
201 ::com::sun::star::lang::WrappedTargetException,
202 ::com::sun::star::uno::RuntimeException);
203 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
204 SAL_CALL getPropertyValues(
205 const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
206 rPropertyNames)
207 throw (::com::sun::star::uno::RuntimeException);
208 virtual void SAL_CALL addPropertiesChangeListener(
209 const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
210 rPropertyNames,
211 const ::com::sun::star::uno::Reference<
212 ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
213 throw (::com::sun::star::uno::RuntimeException);
214 virtual void SAL_CALL removePropertiesChangeListener(
215 const ::com::sun::star::uno::Reference<
216 ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
217 throw (::com::sun::star::uno::RuntimeException);
218 virtual void SAL_CALL firePropertiesChangeEvent(
219 const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
220 rPropertyNames,
221 const ::com::sun::star::uno::Reference<
222 ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
223 throw (::com::sun::star::uno::RuntimeException);
225 // XNamed
226 virtual ::rtl::OUString SAL_CALL getName()
227 throw (::com::sun::star::uno::RuntimeException);
228 virtual void SAL_CALL setName(const ::rtl::OUString& rName)
229 throw (::com::sun::star::uno::RuntimeException);
231 // XTextContent
232 virtual void SAL_CALL attach(
233 const ::com::sun::star::uno::Reference<
234 ::com::sun::star::text::XTextRange > & xTextRange)
235 throw (::com::sun::star::lang::IllegalArgumentException,
236 ::com::sun::star::uno::RuntimeException);
237 virtual ::com::sun::star::uno::Reference<
238 ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
239 throw (::com::sun::star::uno::RuntimeException);
241 // XTextSection
242 virtual ::com::sun::star::uno::Reference<
243 ::com::sun::star::text::XTextSection > SAL_CALL
244 getParentSection()
245 throw (::com::sun::star::uno::RuntimeException);
246 virtual ::com::sun::star::uno::Sequence<
247 ::com::sun::star::uno::Reference<
248 ::com::sun::star::text::XTextSection > > SAL_CALL
249 getChildSections()
250 throw (::com::sun::star::uno::RuntimeException);
254 #endif // SW_UNOSECTION_HXX