xref: /aoo41x/main/sw/inc/unofootnote.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef SW_UNOFOOTNOTE_HXX
29*cdf0e10cSrcweir #define SW_UNOFOOTNOTE_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp>
32*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
33*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
34*cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp>
35*cdf0e10cSrcweir #include <com/sun/star/text/XTextContent.hpp>
36*cdf0e10cSrcweir #include <com/sun/star/text/XFootnote.hpp>
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir #include <cppuhelper/implbase5.hxx>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir #include <unotext.hxx>
41*cdf0e10cSrcweir 
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir class SwDoc;
44*cdf0e10cSrcweir class SwModify;
45*cdf0e10cSrcweir class SwFmtFtn;
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir 
48*cdf0e10cSrcweir /*-----------------12.02.98 08:01-------------------
49*cdf0e10cSrcweir 
50*cdf0e10cSrcweir --------------------------------------------------*/
51*cdf0e10cSrcweir typedef ::cppu::WeakImplHelper5
52*cdf0e10cSrcweir <   ::com::sun::star::lang::XUnoTunnel
53*cdf0e10cSrcweir ,   ::com::sun::star::lang::XServiceInfo
54*cdf0e10cSrcweir ,   ::com::sun::star::beans::XPropertySet
55*cdf0e10cSrcweir ,   ::com::sun::star::container::XEnumerationAccess
56*cdf0e10cSrcweir ,   ::com::sun::star::text::XFootnote
57*cdf0e10cSrcweir > SwXFootnote_Base;
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir class SwXFootnote
60*cdf0e10cSrcweir     : public SwXFootnote_Base
61*cdf0e10cSrcweir     , public SwXText
62*cdf0e10cSrcweir {
63*cdf0e10cSrcweir 
64*cdf0e10cSrcweir private:
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir     friend class SwXFootnotes;
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir     class Impl;
69*cdf0e10cSrcweir     ::sw::UnoImplPtr<Impl> m_pImpl;
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir protected:
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir     virtual const SwStartNode *GetStartNode() const;
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
77*cdf0e10cSrcweir                 ::com::sun::star::text::XTextCursor >
78*cdf0e10cSrcweir         CreateCursor()
79*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir     virtual ~SwXFootnote();
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir     SwXFootnote(SwDoc & rDoc, const SwFmtFtn & rFmt);
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir public:
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir     SwXFootnote(const bool bEndnote);
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir     static SwXFootnote *
90*cdf0e10cSrcweir         CreateXFootnote(SwDoc & rDoc, SwFmtFtn const& rFootnoteFmt);
91*cdf0e10cSrcweir     /// may return 0
92*cdf0e10cSrcweir     static SwXFootnote *
93*cdf0e10cSrcweir         GetXFootnote(SwModify const& rUnoCB, SwFmtFtn const& rFootnoteFmt);
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir     // XInterface
96*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
97*cdf0e10cSrcweir             const ::com::sun::star::uno::Type& rType)
98*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
99*cdf0e10cSrcweir     virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
100*cdf0e10cSrcweir     virtual void SAL_CALL release() throw() { OWeakObject::release(); }
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir     // XTypeProvider
103*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
104*cdf0e10cSrcweir         SAL_CALL getTypes()
105*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
106*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
107*cdf0e10cSrcweir         getImplementationId()
108*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir     static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
111*cdf0e10cSrcweir 
112*cdf0e10cSrcweir     // XUnoTunnel
113*cdf0e10cSrcweir     virtual sal_Int64 SAL_CALL getSomething(
114*cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
115*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir     // XServiceInfo
118*cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getImplementationName()
119*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
120*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService(
121*cdf0e10cSrcweir             const ::rtl::OUString& rServiceName)
122*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
123*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
124*cdf0e10cSrcweir         getSupportedServiceNames()
125*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir     // XComponent
128*cdf0e10cSrcweir     virtual void SAL_CALL dispose()
129*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
130*cdf0e10cSrcweir     virtual void SAL_CALL addEventListener(
131*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
132*cdf0e10cSrcweir                 ::com::sun::star::lang::XEventListener > & xListener)
133*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
134*cdf0e10cSrcweir     virtual void SAL_CALL removeEventListener(
135*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
136*cdf0e10cSrcweir                 ::com::sun::star::lang::XEventListener > & xListener)
137*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
138*cdf0e10cSrcweir 
139*cdf0e10cSrcweir     // XPropertySet
140*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
141*cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
142*cdf0e10cSrcweir         getPropertySetInfo()
143*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
144*cdf0e10cSrcweir     virtual void SAL_CALL setPropertyValue(
145*cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
146*cdf0e10cSrcweir             const ::com::sun::star::uno::Any& rValue)
147*cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
148*cdf0e10cSrcweir                 ::com::sun::star::beans::PropertyVetoException,
149*cdf0e10cSrcweir                 ::com::sun::star::lang::IllegalArgumentException,
150*cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
151*cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
152*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
153*cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName)
154*cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
155*cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
156*cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
157*cdf0e10cSrcweir     virtual void SAL_CALL addPropertyChangeListener(
158*cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
159*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
160*cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertyChangeListener >& xListener)
161*cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
162*cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
163*cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
164*cdf0e10cSrcweir     virtual void SAL_CALL removePropertyChangeListener(
165*cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
166*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
167*cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertyChangeListener >& xListener)
168*cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
169*cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
170*cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
171*cdf0e10cSrcweir     virtual void SAL_CALL addVetoableChangeListener(
172*cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
173*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
174*cdf0e10cSrcweir                 ::com::sun::star::beans::XVetoableChangeListener >& xListener)
175*cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
176*cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
177*cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
178*cdf0e10cSrcweir     virtual void SAL_CALL removeVetoableChangeListener(
179*cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
180*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
181*cdf0e10cSrcweir                 ::com::sun::star::beans::XVetoableChangeListener >& xListener)
182*cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
183*cdf0e10cSrcweir                 ::com::sun::star::lang::WrappedTargetException,
184*cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir     // XElementAccess
187*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
188*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
189*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasElements()
190*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
191*cdf0e10cSrcweir 
192*cdf0e10cSrcweir     // XEnumerationAccess
193*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
194*cdf0e10cSrcweir             ::com::sun::star::container::XEnumeration >  SAL_CALL
195*cdf0e10cSrcweir         createEnumeration()
196*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
197*cdf0e10cSrcweir 
198*cdf0e10cSrcweir     // XTextContent
199*cdf0e10cSrcweir     virtual void SAL_CALL attach(
200*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
201*cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > & xTextRange)
202*cdf0e10cSrcweir         throw (::com::sun::star::lang::IllegalArgumentException,
203*cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
204*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
205*cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
206*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir     // XFootnote
209*cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getLabel()
210*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
211*cdf0e10cSrcweir     virtual void SAL_CALL setLabel(const ::rtl::OUString& rLabel)
212*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
213*cdf0e10cSrcweir 
214*cdf0e10cSrcweir     // XSimpleText
215*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
216*cdf0e10cSrcweir                 ::com::sun::star::text::XTextCursor >  SAL_CALL
217*cdf0e10cSrcweir         createTextCursor()
218*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
219*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
220*cdf0e10cSrcweir                 ::com::sun::star::text::XTextCursor >  SAL_CALL
221*cdf0e10cSrcweir         createTextCursorByRange(
222*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
223*cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > & xTextPosition)
224*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir };
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir #endif // SW_UNOFOOTNOTE_HXX
229*cdf0e10cSrcweir 
230