xref: /aoo42x/main/sw/inc/unosection.hxx (revision 1d2dbeb0)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*1d2dbeb0SAndrew Rist  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1d2dbeb0SAndrew Rist  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19*1d2dbeb0SAndrew Rist  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SW_UNOSECTION_HXX
25cdf0e10cSrcweir #define SW_UNOSECTION_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp>
28cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
29cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
30cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyState.hpp>
31cdf0e10cSrcweir #include <com/sun/star/beans/XMultiPropertySet.hpp>
32cdf0e10cSrcweir #include <com/sun/star/container/XNamed.hpp>
33cdf0e10cSrcweir #include <com/sun/star/text/XTextContent.hpp>
34cdf0e10cSrcweir #include <com/sun/star/text/XTextSection.hpp>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #include <cppuhelper/implbase7.hxx>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #include <sfx2/Metadatable.hxx>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir #include <unobaseclass.hxx>
41cdf0e10cSrcweir 
42cdf0e10cSrcweir 
43cdf0e10cSrcweir class SwSectionFmt;
44cdf0e10cSrcweir 
45cdf0e10cSrcweir 
46cdf0e10cSrcweir /*-----------------09.03.98 13:57-------------------
47cdf0e10cSrcweir 
48cdf0e10cSrcweir --------------------------------------------------*/
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 
51cdf0e10cSrcweir struct SwTextSectionProperties_Impl;
52cdf0e10cSrcweir 
53cdf0e10cSrcweir typedef ::cppu::ImplInheritanceHelper7
54cdf0e10cSrcweir <   ::sfx2::MetadatableMixin
55cdf0e10cSrcweir ,   ::com::sun::star::lang::XUnoTunnel
56cdf0e10cSrcweir ,   ::com::sun::star::lang::XServiceInfo
57cdf0e10cSrcweir ,   ::com::sun::star::beans::XPropertySet
58cdf0e10cSrcweir ,   ::com::sun::star::beans::XPropertyState
59cdf0e10cSrcweir ,   ::com::sun::star::beans::XMultiPropertySet
60cdf0e10cSrcweir ,   ::com::sun::star::container::XNamed
61cdf0e10cSrcweir ,   ::com::sun::star::text::XTextSection
62cdf0e10cSrcweir > SwXTextSection_Base;
63cdf0e10cSrcweir 
64cdf0e10cSrcweir class SwXTextSection
65cdf0e10cSrcweir     : public SwXTextSection_Base
66cdf0e10cSrcweir {
67cdf0e10cSrcweir 
68cdf0e10cSrcweir private:
69cdf0e10cSrcweir 
70cdf0e10cSrcweir     class Impl;
71cdf0e10cSrcweir     ::sw::UnoImplPtr<Impl> m_pImpl;
72cdf0e10cSrcweir 
73cdf0e10cSrcweir     SwXTextSection(SwSectionFmt *const pFmt, const bool bIndexHeader = false);
74cdf0e10cSrcweir 
75cdf0e10cSrcweir     virtual ~SwXTextSection();
76cdf0e10cSrcweir 
77cdf0e10cSrcweir public:
78cdf0e10cSrcweir 
79cdf0e10cSrcweir     SwSectionFmt*   GetFmt() const;
80cdf0e10cSrcweir 
81cdf0e10cSrcweir     static ::com::sun::star::uno::Reference<
82cdf0e10cSrcweir             ::com::sun::star::text::XTextSection >
83cdf0e10cSrcweir         CreateXTextSection(SwSectionFmt *const pFmt = 0,
84cdf0e10cSrcweir                 const bool bIndexHeader = false);
85cdf0e10cSrcweir 
86cdf0e10cSrcweir     // MetadatableMixin
87cdf0e10cSrcweir     virtual ::sfx2::Metadatable* GetCoreObject();
88cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
89cdf0e10cSrcweir         GetModel();
90cdf0e10cSrcweir 
91cdf0e10cSrcweir     static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
92cdf0e10cSrcweir 
93cdf0e10cSrcweir     // XUnoTunnel
94cdf0e10cSrcweir     virtual sal_Int64 SAL_CALL getSomething(
95cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
96cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
97cdf0e10cSrcweir 
98cdf0e10cSrcweir     // XServiceInfo
99cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getImplementationName()
100cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
101cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService(
102cdf0e10cSrcweir             const ::rtl::OUString& rServiceName)
103cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
104cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
105cdf0e10cSrcweir         getSupportedServiceNames()
106cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
107cdf0e10cSrcweir 
108cdf0e10cSrcweir     // XComponent
109cdf0e10cSrcweir     virtual void SAL_CALL dispose()
110cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
111cdf0e10cSrcweir     virtual void SAL_CALL addEventListener(
112cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
113cdf0e10cSrcweir                 ::com::sun::star::lang::XEventListener > & xListener)
114cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
115cdf0e10cSrcweir     virtual void SAL_CALL removeEventListener(
116cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
117cdf0e10cSrcweir                 ::com::sun::star::lang::XEventListener > & xListener)
118cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
119cdf0e10cSrcweir 
120cdf0e10cSrcweir     // XPropertySet
121cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
122cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
123cdf0e10cSrcweir         getPropertySetInfo()
124cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
125cdf0e10cSrcweir     virtual void SAL_CALL setPropertyValue(
126cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
127cdf0e10cSrcweir             const ::com::sun::star::uno::Any& rValue)
128cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
129cdf0e10cSrcweir                 ::com::sun::star::beans::PropertyVetoException,
130cdf0e10cSrcweir                 ::com::sun::star::lang::IllegalArgumentException,
131cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
132cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
133cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
134cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName)
135cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
136cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
137cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
138cdf0e10cSrcweir     virtual void SAL_CALL addPropertyChangeListener(
139cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
140cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
141cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertyChangeListener >& xListener)
142cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
143cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
144cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
145cdf0e10cSrcweir     virtual void SAL_CALL removePropertyChangeListener(
146cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
147cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
148cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertyChangeListener >& xListener)
149cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
150cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
151cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
152cdf0e10cSrcweir     virtual void SAL_CALL addVetoableChangeListener(
153cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
154cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
155cdf0e10cSrcweir                 ::com::sun::star::beans::XVetoableChangeListener >& xListener)
156cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
157cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
158cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
159cdf0e10cSrcweir     virtual void SAL_CALL removeVetoableChangeListener(
160cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
161cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
162cdf0e10cSrcweir                 ::com::sun::star::beans::XVetoableChangeListener >& xListener)
163cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
164cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
165cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
166cdf0e10cSrcweir 
167cdf0e10cSrcweir     // XPropertyState
168cdf0e10cSrcweir     virtual ::com::sun::star::beans::PropertyState SAL_CALL
169cdf0e10cSrcweir         getPropertyState(const ::rtl::OUString& rPropertyName)
170cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
171cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
172cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence<
173cdf0e10cSrcweir             ::com::sun::star::beans::PropertyState > SAL_CALL
174cdf0e10cSrcweir         getPropertyStates(
175cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence<
176cdf0e10cSrcweir                 ::rtl::OUString >& rPropertyNames)
177cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
178cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
179cdf0e10cSrcweir     virtual void SAL_CALL setPropertyToDefault(
180cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName)
181cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
182cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
183cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
184cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName)
185cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
186cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
187cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
188cdf0e10cSrcweir 
189cdf0e10cSrcweir     // XMultiPropertySet
190cdf0e10cSrcweir     virtual void SAL_CALL setPropertyValues(
191cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
192cdf0e10cSrcweir                 rPropertyNames,
193cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence<
194cdf0e10cSrcweir                 ::com::sun::star::uno::Any >& rValues)
195cdf0e10cSrcweir         throw (::com::sun::star::beans::PropertyVetoException,
196cdf0e10cSrcweir                 ::com::sun::star::lang::IllegalArgumentException,
197cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
198cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
199cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
200cdf0e10cSrcweir         SAL_CALL getPropertyValues(
201cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
202cdf0e10cSrcweir                 rPropertyNames)
203cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
204cdf0e10cSrcweir     virtual void SAL_CALL addPropertiesChangeListener(
205cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
206cdf0e10cSrcweir                 rPropertyNames,
207cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
208cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
209cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
210cdf0e10cSrcweir     virtual void SAL_CALL removePropertiesChangeListener(
211cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
212cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
213cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
214cdf0e10cSrcweir     virtual void SAL_CALL firePropertiesChangeEvent(
215cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
216cdf0e10cSrcweir                 rPropertyNames,
217cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
218cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
219cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
220cdf0e10cSrcweir 
221cdf0e10cSrcweir     // XNamed
222cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getName()
223cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
224cdf0e10cSrcweir     virtual void SAL_CALL setName(const ::rtl::OUString& rName)
225cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
226cdf0e10cSrcweir 
227cdf0e10cSrcweir     // XTextContent
228cdf0e10cSrcweir     virtual void SAL_CALL attach(
229cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
230cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > & xTextRange)
231cdf0e10cSrcweir         throw (::com::sun::star::lang::IllegalArgumentException,
232cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
233cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
234cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
235cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
236cdf0e10cSrcweir 
237cdf0e10cSrcweir     // XTextSection
238cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
239cdf0e10cSrcweir                 ::com::sun::star::text::XTextSection > SAL_CALL
240cdf0e10cSrcweir         getParentSection()
241cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
242cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence<
243cdf0e10cSrcweir                 ::com::sun::star::uno::Reference<
244cdf0e10cSrcweir                     ::com::sun::star::text::XTextSection >  > SAL_CALL
245cdf0e10cSrcweir         getChildSections()
246cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
247cdf0e10cSrcweir 
248cdf0e10cSrcweir };
249cdf0e10cSrcweir 
250cdf0e10cSrcweir #endif // SW_UNOSECTION_HXX
251cdf0e10cSrcweir 
252