xref: /trunk/main/sw/source/core/unocore/unoftn.cxx (revision efeef26f)
1*efeef26fSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*efeef26fSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*efeef26fSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*efeef26fSAndrew Rist  * distributed with this work for additional information
6*efeef26fSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*efeef26fSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*efeef26fSAndrew Rist  * "License"); you may not use this file except in compliance
9*efeef26fSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*efeef26fSAndrew Rist  *
11*efeef26fSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*efeef26fSAndrew Rist  *
13*efeef26fSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*efeef26fSAndrew Rist  * software distributed under the License is distributed on an
15*efeef26fSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*efeef26fSAndrew Rist  * KIND, either express or implied.  See the License for the
17*efeef26fSAndrew Rist  * specific language governing permissions and limitations
18*efeef26fSAndrew Rist  * under the License.
19*efeef26fSAndrew Rist  *
20*efeef26fSAndrew Rist  *************************************************************/
21*efeef26fSAndrew Rist 
22*efeef26fSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sw.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <rtl/uuid.h>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include <vos/mutex.hxx>
30cdf0e10cSrcweir #include <vcl/svapp.hxx>
31cdf0e10cSrcweir #include <comphelper/sequence.hxx>
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #include <unomid.h>
34cdf0e10cSrcweir #include <unofootnote.hxx>
35cdf0e10cSrcweir #include <unotextrange.hxx>
36cdf0e10cSrcweir #include <unotextcursor.hxx>
37cdf0e10cSrcweir #include <unoparagraph.hxx>
38cdf0e10cSrcweir #include <unomap.hxx>
39cdf0e10cSrcweir #include <unoprnms.hxx>
40cdf0e10cSrcweir #include <unoevtlstnr.hxx>
41cdf0e10cSrcweir #include <doc.hxx>
42cdf0e10cSrcweir #include <ftnidx.hxx>
43cdf0e10cSrcweir #include <fmtftn.hxx>
44cdf0e10cSrcweir #include <txtftn.hxx>
45cdf0e10cSrcweir #include <ndtxt.hxx>
46cdf0e10cSrcweir #include <unocrsr.hxx>
47cdf0e10cSrcweir #include <hints.hxx>
48cdf0e10cSrcweir 
49cdf0e10cSrcweir 
50cdf0e10cSrcweir using namespace ::com::sun::star;
51cdf0e10cSrcweir using ::rtl::OUString;
52cdf0e10cSrcweir 
53cdf0e10cSrcweir /******************************************************************
54cdf0e10cSrcweir  * SwXFootnote
55cdf0e10cSrcweir  ******************************************************************/
56cdf0e10cSrcweir 
57cdf0e10cSrcweir class SwXFootnote::Impl
58cdf0e10cSrcweir     : public SwClient
59cdf0e10cSrcweir {
60cdf0e10cSrcweir 
61cdf0e10cSrcweir public:
62cdf0e10cSrcweir 
63cdf0e10cSrcweir     SwXFootnote &               m_rThis;
64cdf0e10cSrcweir     const bool                  m_bIsEndnote;
65cdf0e10cSrcweir     SwEventListenerContainer    m_ListenerContainer;
66cdf0e10cSrcweir     bool                        m_bIsDescriptor;
67cdf0e10cSrcweir     const SwFmtFtn *            m_pFmtFtn;
68cdf0e10cSrcweir     ::rtl::OUString             m_sLabel;
69cdf0e10cSrcweir 
Impl(SwXFootnote & rThis,SwDoc * const pDoc,SwFmtFtn const * const pFootnote,const bool bIsEndnote)70cdf0e10cSrcweir     Impl(   SwXFootnote & rThis,
71cdf0e10cSrcweir             SwDoc *const pDoc, SwFmtFtn const*const pFootnote,
72cdf0e10cSrcweir             const bool bIsEndnote)
73cdf0e10cSrcweir         : SwClient((pDoc) ? pDoc->GetUnoCallBack() : 0)
74cdf0e10cSrcweir         , m_rThis(rThis)
75cdf0e10cSrcweir         , m_bIsEndnote(bIsEndnote)
76cdf0e10cSrcweir         , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
77cdf0e10cSrcweir // #i111177#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this
78cdf0e10cSrcweir //        , m_bIsDescriptor(0 == pFootnote)
79cdf0e10cSrcweir         , m_bIsDescriptor((0 == pFootnote) ? true : false)
80cdf0e10cSrcweir         , m_pFmtFtn(pFootnote)
81cdf0e10cSrcweir     {
82cdf0e10cSrcweir     }
83cdf0e10cSrcweir 
GetFootnoteFormat() const84cdf0e10cSrcweir     const SwFmtFtn* GetFootnoteFormat() const {
85cdf0e10cSrcweir         return m_rThis.GetDoc() ? m_pFmtFtn : 0;
86cdf0e10cSrcweir     }
87cdf0e10cSrcweir 
GetFootnoteFormatOrThrow()88cdf0e10cSrcweir     SwFmtFtn const& GetFootnoteFormatOrThrow() {
89cdf0e10cSrcweir         SwFmtFtn const*const pFootnote( GetFootnoteFormat() );
90cdf0e10cSrcweir         if (!pFootnote) {
91cdf0e10cSrcweir             throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM(
92cdf0e10cSrcweir                         "SwXFootnote: disposed or invalid")), 0);
93cdf0e10cSrcweir         }
94cdf0e10cSrcweir         return *pFootnote;
95cdf0e10cSrcweir     }
96cdf0e10cSrcweir 
97cdf0e10cSrcweir     void    Invalidate();
98cdf0e10cSrcweir protected:
99cdf0e10cSrcweir     // SwClient
100cdf0e10cSrcweir     virtual void Modify( const SfxPoolItem *pOld, const SfxPoolItem *pNew);
101cdf0e10cSrcweir 
102cdf0e10cSrcweir };
103cdf0e10cSrcweir 
104cdf0e10cSrcweir /* -----------------------------07.01.00 12:39--------------------------------
105cdf0e10cSrcweir 
106cdf0e10cSrcweir  ---------------------------------------------------------------------------*/
Invalidate()107cdf0e10cSrcweir void SwXFootnote::Impl::Invalidate()
108cdf0e10cSrcweir {
109cdf0e10cSrcweir     if (GetRegisteredIn())
110cdf0e10cSrcweir     {
111cdf0e10cSrcweir         const_cast<SwModify*>(GetRegisteredIn())->Remove(this);
112cdf0e10cSrcweir     }
113cdf0e10cSrcweir     m_ListenerContainer.Disposing();
114cdf0e10cSrcweir     m_pFmtFtn = 0;
115cdf0e10cSrcweir     m_rThis.SetDoc(0);
116cdf0e10cSrcweir }
117cdf0e10cSrcweir 
118cdf0e10cSrcweir /* -----------------18.01.99 09:12-------------------
119cdf0e10cSrcweir  *
120cdf0e10cSrcweir  * --------------------------------------------------*/
Modify(const SfxPoolItem * pOld,const SfxPoolItem * pNew)121cdf0e10cSrcweir void SwXFootnote::Impl::Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew)
122cdf0e10cSrcweir {
123cdf0e10cSrcweir     ClientModify(this, pOld, pNew);
124cdf0e10cSrcweir 
125cdf0e10cSrcweir     if (!GetRegisteredIn()) // removed => dispose
126cdf0e10cSrcweir     {
127cdf0e10cSrcweir         Invalidate();
128cdf0e10cSrcweir     }
129cdf0e10cSrcweir     else if (pOld)
130cdf0e10cSrcweir     {
131cdf0e10cSrcweir         switch (pOld->Which())
132cdf0e10cSrcweir         {
133cdf0e10cSrcweir             case RES_FOOTNOTE_DELETED:
134cdf0e10cSrcweir                 if (static_cast<const void*>(m_pFmtFtn) ==
135cdf0e10cSrcweir                         static_cast<const SwPtrMsgPoolItem *>(pOld)->pObject)
136cdf0e10cSrcweir                 {
137cdf0e10cSrcweir                     Invalidate();
138cdf0e10cSrcweir                 }
139cdf0e10cSrcweir                 break;
140cdf0e10cSrcweir         }
141cdf0e10cSrcweir     }
142cdf0e10cSrcweir }
143cdf0e10cSrcweir 
144cdf0e10cSrcweir /*-- 10.12.98 15:31:44---------------------------------------------------
145cdf0e10cSrcweir 
146cdf0e10cSrcweir   -----------------------------------------------------------------------*/
SwXFootnote(const bool bEndnote)147cdf0e10cSrcweir SwXFootnote::SwXFootnote(const bool bEndnote)
148cdf0e10cSrcweir     : SwXText(0, CURSOR_FOOTNOTE)
149cdf0e10cSrcweir     , m_pImpl( new SwXFootnote::Impl(*this, 0, 0, bEndnote) )
150cdf0e10cSrcweir {
151cdf0e10cSrcweir }
152cdf0e10cSrcweir /*-- 10.12.98 15:31:45---------------------------------------------------
153cdf0e10cSrcweir 
154cdf0e10cSrcweir   -----------------------------------------------------------------------*/
SwXFootnote(SwDoc & rDoc,const SwFmtFtn & rFmt)155cdf0e10cSrcweir SwXFootnote::SwXFootnote(SwDoc & rDoc, const SwFmtFtn& rFmt)
156cdf0e10cSrcweir     : SwXText(& rDoc, CURSOR_FOOTNOTE)
157cdf0e10cSrcweir     , m_pImpl( new SwXFootnote::Impl(*this, &rDoc, &rFmt, rFmt.IsEndNote()) )
158cdf0e10cSrcweir {
159cdf0e10cSrcweir }
160cdf0e10cSrcweir /*-- 10.12.98 15:31:45---------------------------------------------------
161cdf0e10cSrcweir 
162cdf0e10cSrcweir   -----------------------------------------------------------------------*/
~SwXFootnote()163cdf0e10cSrcweir SwXFootnote::~SwXFootnote()
164cdf0e10cSrcweir {
165cdf0e10cSrcweir }
166cdf0e10cSrcweir 
167cdf0e10cSrcweir SwXFootnote *
GetXFootnote(SwModify const &,SwFmtFtn const &)168cdf0e10cSrcweir SwXFootnote::GetXFootnote(
169cdf0e10cSrcweir         SwModify const& /*rUnoCB*/, SwFmtFtn const& /*rFootnoteFmt*/)
170cdf0e10cSrcweir {
171cdf0e10cSrcweir     // re-use existing SwXFootnote
172cdf0e10cSrcweir     // #i105557#: do not iterate over the registered clients: race condition
173cdf0e10cSrcweir     // to do this properly requires the SwXFootnote to register at the
174cdf0e10cSrcweir     // SwFmtFtn directly, not at the unocallback
175cdf0e10cSrcweir     // also this function must return a uno Reference!
176cdf0e10cSrcweir     return 0;
177cdf0e10cSrcweir }
178cdf0e10cSrcweir 
179cdf0e10cSrcweir SwXFootnote *
CreateXFootnote(SwDoc & rDoc,SwFmtFtn const & rFootnoteFmt)180cdf0e10cSrcweir SwXFootnote::CreateXFootnote(SwDoc & rDoc, SwFmtFtn const& rFootnoteFmt)
181cdf0e10cSrcweir {
182cdf0e10cSrcweir     SwXFootnote *const pXFootnote(
183cdf0e10cSrcweir         GetXFootnote(*rDoc.GetUnoCallBack(), rFootnoteFmt));
184cdf0e10cSrcweir     return (pXFootnote)
185cdf0e10cSrcweir         ?   pXFootnote
186cdf0e10cSrcweir         :   new SwXFootnote(rDoc, rFootnoteFmt);
187cdf0e10cSrcweir }
188cdf0e10cSrcweir 
189cdf0e10cSrcweir /* -----------------------------13.03.00 12:15--------------------------------
190cdf0e10cSrcweir 
191cdf0e10cSrcweir  ---------------------------------------------------------------------------*/
getUnoTunnelId()192cdf0e10cSrcweir const uno::Sequence< sal_Int8 > & SwXFootnote::getUnoTunnelId()
193cdf0e10cSrcweir {
194cdf0e10cSrcweir     static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
195cdf0e10cSrcweir 	return aSeq;
196cdf0e10cSrcweir }
197cdf0e10cSrcweir /* -----------------------------10.03.00 18:04--------------------------------
198cdf0e10cSrcweir 
199cdf0e10cSrcweir  ---------------------------------------------------------------------------*/
200cdf0e10cSrcweir sal_Int64 SAL_CALL
getSomething(const uno::Sequence<sal_Int8> & rId)201cdf0e10cSrcweir SwXFootnote::getSomething(const uno::Sequence< sal_Int8 >& rId)
202cdf0e10cSrcweir throw (uno::RuntimeException)
203cdf0e10cSrcweir {
204cdf0e10cSrcweir     const sal_Int64 nRet( ::sw::UnoTunnelImpl<SwXFootnote>(rId, this) );
205cdf0e10cSrcweir     return (nRet) ? nRet : SwXText::getSomething(rId);
206cdf0e10cSrcweir }
207cdf0e10cSrcweir 
208cdf0e10cSrcweir /* -----------------------------06.04.00 16:36--------------------------------
209cdf0e10cSrcweir 
210cdf0e10cSrcweir  ---------------------------------------------------------------------------*/
211cdf0e10cSrcweir OUString SAL_CALL
getImplementationName()212cdf0e10cSrcweir SwXFootnote::getImplementationName() throw (uno::RuntimeException)
213cdf0e10cSrcweir {
214cdf0e10cSrcweir 	return C2U("SwXFootnote");
215cdf0e10cSrcweir }
216cdf0e10cSrcweir 
217cdf0e10cSrcweir /* -----------------------------06.04.00 16:36--------------------------------
218cdf0e10cSrcweir 
219cdf0e10cSrcweir  ---------------------------------------------------------------------------*/
220cdf0e10cSrcweir static char const*const g_ServicesFootnote[] =
221cdf0e10cSrcweir {
222cdf0e10cSrcweir     "com.sun.star.text.TextContent",
223cdf0e10cSrcweir     "com.sun.star.text.Footnote",
224cdf0e10cSrcweir     "com.sun.star.text.Text",
225cdf0e10cSrcweir     "com.sun.star.text.Endnote", // NB: only supported for endnotes!
226cdf0e10cSrcweir };
227cdf0e10cSrcweir static const size_t g_nServicesEndnote(
228cdf0e10cSrcweir     sizeof(g_ServicesFootnote)/sizeof(g_ServicesFootnote[0]));
229cdf0e10cSrcweir static const size_t g_nServicesFootnote( g_nServicesEndnote - 1 ); // NB: omit!
230cdf0e10cSrcweir 
supportsService(const OUString & rServiceName)231cdf0e10cSrcweir sal_Bool SAL_CALL SwXFootnote::supportsService(const OUString& rServiceName)
232cdf0e10cSrcweir throw (uno::RuntimeException)
233cdf0e10cSrcweir {
234cdf0e10cSrcweir     vos::OGuard g(Application::GetSolarMutex());
235cdf0e10cSrcweir     return ::sw::SupportsServiceImpl(
236cdf0e10cSrcweir             (m_pImpl->m_bIsEndnote) ? g_nServicesEndnote : g_nServicesFootnote,
237cdf0e10cSrcweir             g_ServicesFootnote, rServiceName);
238cdf0e10cSrcweir }
239cdf0e10cSrcweir 
240cdf0e10cSrcweir uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames()241cdf0e10cSrcweir SwXFootnote::getSupportedServiceNames() throw (uno::RuntimeException)
242cdf0e10cSrcweir {
243cdf0e10cSrcweir     vos::OGuard g(Application::GetSolarMutex());
244cdf0e10cSrcweir     return ::sw::GetSupportedServiceNamesImpl(
245cdf0e10cSrcweir             (m_pImpl->m_bIsEndnote) ? g_nServicesEndnote : g_nServicesFootnote,
246cdf0e10cSrcweir             g_ServicesFootnote);
247cdf0e10cSrcweir }
248cdf0e10cSrcweir 
249cdf0e10cSrcweir /* -----------------------------21.03.00 15:39--------------------------------
250cdf0e10cSrcweir 
251cdf0e10cSrcweir  ---------------------------------------------------------------------------*/
252cdf0e10cSrcweir uno::Sequence< uno::Type > SAL_CALL
getTypes()253cdf0e10cSrcweir SwXFootnote::getTypes() throw (uno::RuntimeException)
254cdf0e10cSrcweir {
255cdf0e10cSrcweir     const uno::Sequence< uno::Type > aTypes = SwXFootnote_Base::getTypes();
256cdf0e10cSrcweir     const uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes();
257cdf0e10cSrcweir     return ::comphelper::concatSequences(aTypes, aTextTypes);
258cdf0e10cSrcweir }
259cdf0e10cSrcweir 
260cdf0e10cSrcweir /* -----------------------------21.03.00 15:39--------------------------------
261cdf0e10cSrcweir 
262cdf0e10cSrcweir  ---------------------------------------------------------------------------*/
263cdf0e10cSrcweir uno::Sequence< sal_Int8 > SAL_CALL
getImplementationId()264cdf0e10cSrcweir SwXFootnote::getImplementationId() throw (uno::RuntimeException)
265cdf0e10cSrcweir {
266cdf0e10cSrcweir     vos::OGuard aGuard(Application::GetSolarMutex());
267cdf0e10cSrcweir     static uno::Sequence< sal_Int8 > aId( 16 );
268cdf0e10cSrcweir     static sal_Bool bInit = sal_False;
269cdf0e10cSrcweir     if(!bInit)
270cdf0e10cSrcweir     {
271cdf0e10cSrcweir         rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
272cdf0e10cSrcweir         bInit = sal_True;
273cdf0e10cSrcweir     }
274cdf0e10cSrcweir     return aId;
275cdf0e10cSrcweir }
276cdf0e10cSrcweir /* -----------------------------21.03.00 15:46--------------------------------
277cdf0e10cSrcweir 
278cdf0e10cSrcweir  ---------------------------------------------------------------------------*/
279cdf0e10cSrcweir uno::Any SAL_CALL
queryInterface(const uno::Type & rType)280cdf0e10cSrcweir SwXFootnote::queryInterface(const uno::Type& rType)
281cdf0e10cSrcweir throw (uno::RuntimeException)
282cdf0e10cSrcweir {
283cdf0e10cSrcweir     const uno::Any ret = SwXFootnote_Base::queryInterface(rType);
284cdf0e10cSrcweir     return (ret.getValueType() == ::getCppuVoidType())
285cdf0e10cSrcweir         ?   SwXText::queryInterface(rType)
286cdf0e10cSrcweir         :   ret;
287cdf0e10cSrcweir }
288cdf0e10cSrcweir 
289cdf0e10cSrcweir /*-- 10.12.98 15:31:47---------------------------------------------------
290cdf0e10cSrcweir 
291cdf0e10cSrcweir   -----------------------------------------------------------------------*/
getLabel()292cdf0e10cSrcweir OUString SAL_CALL SwXFootnote::getLabel() throw (uno::RuntimeException)
293cdf0e10cSrcweir {
294cdf0e10cSrcweir 	vos::OGuard aGuard(Application::GetSolarMutex());
295cdf0e10cSrcweir 
296cdf0e10cSrcweir     ::rtl::OUString sRet;
297cdf0e10cSrcweir     SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
298cdf0e10cSrcweir 	if(pFmt)
299cdf0e10cSrcweir     {
300cdf0e10cSrcweir 		sRet = pFmt->GetNumStr();
301cdf0e10cSrcweir     }
302cdf0e10cSrcweir     else if (m_pImpl->m_bIsDescriptor)
303cdf0e10cSrcweir     {
304cdf0e10cSrcweir         sRet = m_pImpl->m_sLabel;
305cdf0e10cSrcweir     }
306cdf0e10cSrcweir 	else
307cdf0e10cSrcweir     {
308cdf0e10cSrcweir 		throw uno::RuntimeException();
309cdf0e10cSrcweir     }
310cdf0e10cSrcweir 	return sRet;
311cdf0e10cSrcweir }
312cdf0e10cSrcweir 
313cdf0e10cSrcweir /*-- 10.12.98 15:31:48---------------------------------------------------
314cdf0e10cSrcweir 
315cdf0e10cSrcweir   -----------------------------------------------------------------------*/
316cdf0e10cSrcweir void SAL_CALL
setLabel(const OUString & aLabel)317cdf0e10cSrcweir SwXFootnote::setLabel(const OUString& aLabel) throw (uno::RuntimeException)
318cdf0e10cSrcweir {
319cdf0e10cSrcweir 	vos::OGuard aGuard(Application::GetSolarMutex());
320cdf0e10cSrcweir 
321cdf0e10cSrcweir     SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
322cdf0e10cSrcweir 	if(pFmt)
323cdf0e10cSrcweir 	{
324cdf0e10cSrcweir 		const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn();
325cdf0e10cSrcweir 		DBG_ASSERT(pTxtFtn, "kein TextNode?");
326cdf0e10cSrcweir 		SwTxtNode& rTxtNode = (SwTxtNode&)pTxtFtn->GetTxtNode();
327cdf0e10cSrcweir 
328cdf0e10cSrcweir 		SwPaM aPam(rTxtNode, *pTxtFtn->GetStart());
329cdf0e10cSrcweir 		GetDoc()->SetCurFtn(aPam, aLabel, pFmt->GetNumber(), pFmt->IsEndNote());
330cdf0e10cSrcweir 	}
331cdf0e10cSrcweir     else if (m_pImpl->m_bIsDescriptor)
332cdf0e10cSrcweir     {
333cdf0e10cSrcweir         m_pImpl->m_sLabel = String(aLabel);
334cdf0e10cSrcweir     }
335cdf0e10cSrcweir 	else
336cdf0e10cSrcweir     {
337cdf0e10cSrcweir 		throw uno::RuntimeException();
338cdf0e10cSrcweir     }
339cdf0e10cSrcweir }
340cdf0e10cSrcweir 
341cdf0e10cSrcweir /* -----------------18.02.99 13:32-------------------
342cdf0e10cSrcweir  *
343cdf0e10cSrcweir  * --------------------------------------------------*/
344cdf0e10cSrcweir void SAL_CALL
attach(const uno::Reference<text::XTextRange> & xTextRange)345cdf0e10cSrcweir SwXFootnote::attach(const uno::Reference< text::XTextRange > & xTextRange)
346cdf0e10cSrcweir throw (lang::IllegalArgumentException, uno::RuntimeException)
347cdf0e10cSrcweir {
348cdf0e10cSrcweir     vos::OGuard aGuard(Application::GetSolarMutex());
349cdf0e10cSrcweir 
350cdf0e10cSrcweir     if (!m_pImpl->m_bIsDescriptor)
351cdf0e10cSrcweir     {
352cdf0e10cSrcweir 		throw uno::RuntimeException();
353cdf0e10cSrcweir     }
354cdf0e10cSrcweir     const uno::Reference<lang::XUnoTunnel> xRangeTunnel(
355cdf0e10cSrcweir             xTextRange, uno::UNO_QUERY);
356cdf0e10cSrcweir     SwXTextRange *const pRange =
357cdf0e10cSrcweir         ::sw::UnoTunnelGetImplementation<SwXTextRange>(xRangeTunnel);
358cdf0e10cSrcweir     OTextCursorHelper *const pCursor =
359cdf0e10cSrcweir         ::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xRangeTunnel);
360cdf0e10cSrcweir     SwDoc *const pNewDoc =
361cdf0e10cSrcweir         (pRange) ? pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0);
362cdf0e10cSrcweir     if (!pNewDoc)
363cdf0e10cSrcweir     {
364cdf0e10cSrcweir         throw lang::IllegalArgumentException();
365cdf0e10cSrcweir     }
366cdf0e10cSrcweir 
367cdf0e10cSrcweir     SwUnoInternalPaM aPam(*pNewDoc);
368cdf0e10cSrcweir     //das muss jetzt sal_True liefern
369cdf0e10cSrcweir     ::sw::XTextRangeToSwPaM(aPam, xTextRange);
370cdf0e10cSrcweir 
371cdf0e10cSrcweir     UnoActionContext aCont(pNewDoc);
372cdf0e10cSrcweir     pNewDoc->DeleteAndJoin(aPam);
373cdf0e10cSrcweir     aPam.DeleteMark();
374cdf0e10cSrcweir     SwFmtFtn aFootNote(m_pImpl->m_bIsEndnote);
375cdf0e10cSrcweir     if (m_pImpl->m_sLabel.getLength())
376cdf0e10cSrcweir     {
377cdf0e10cSrcweir         aFootNote.SetNumStr(m_pImpl->m_sLabel);
378cdf0e10cSrcweir     }
379cdf0e10cSrcweir 
380cdf0e10cSrcweir     SwXTextCursor const*const pTextCursor(
381cdf0e10cSrcweir             dynamic_cast<SwXTextCursor*>(pCursor));
382cdf0e10cSrcweir     const bool bForceExpandHints( (pTextCursor)
383cdf0e10cSrcweir             ? pTextCursor->IsAtEndOfMeta() : false );
384cdf0e10cSrcweir     const SetAttrMode nInsertFlags = (bForceExpandHints)
385cdf0e10cSrcweir         ? nsSetAttrMode::SETATTR_FORCEHINTEXPAND
386cdf0e10cSrcweir         : nsSetAttrMode::SETATTR_DEFAULT;
387cdf0e10cSrcweir 
388cdf0e10cSrcweir     pNewDoc->InsertPoolItem(aPam, aFootNote, nInsertFlags);
389cdf0e10cSrcweir 
390cdf0e10cSrcweir     SwTxtFtn *const pTxtAttr = static_cast<SwTxtFtn*>(
391cdf0e10cSrcweir         aPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
392cdf0e10cSrcweir                 aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_FTN ));
393cdf0e10cSrcweir 
394cdf0e10cSrcweir     if (pTxtAttr)
395cdf0e10cSrcweir     {
396cdf0e10cSrcweir         const SwFmtFtn& rFtn = pTxtAttr->GetFtn();
397cdf0e10cSrcweir         m_pImpl->m_pFmtFtn = &rFtn;
398cdf0e10cSrcweir         pNewDoc->GetUnoCallBack()->Add(m_pImpl.get());
399cdf0e10cSrcweir         // force creation of sequence id - is used for references
400cdf0e10cSrcweir         if (pNewDoc->IsInReading())
401cdf0e10cSrcweir         {
402cdf0e10cSrcweir             pTxtAttr->SetSeqNo(pNewDoc->GetFtnIdxs().Count());
403cdf0e10cSrcweir         }
404cdf0e10cSrcweir         else
405cdf0e10cSrcweir         {
406cdf0e10cSrcweir             pTxtAttr->SetSeqRefNo();
407cdf0e10cSrcweir         }
408cdf0e10cSrcweir     }
409cdf0e10cSrcweir     m_pImpl->m_bIsDescriptor = sal_False;
410cdf0e10cSrcweir     SetDoc(pNewDoc);
411cdf0e10cSrcweir }
412cdf0e10cSrcweir 
413cdf0e10cSrcweir /*-- 10.12.98 15:31:48---------------------------------------------------
414cdf0e10cSrcweir 
415cdf0e10cSrcweir   -----------------------------------------------------------------------*/
416cdf0e10cSrcweir uno::Reference< text::XTextRange > SAL_CALL
getAnchor()417cdf0e10cSrcweir SwXFootnote::getAnchor() throw (uno::RuntimeException)
418cdf0e10cSrcweir {
419cdf0e10cSrcweir 	vos::OGuard aGuard(Application::GetSolarMutex());
420cdf0e10cSrcweir 
421cdf0e10cSrcweir     SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
422cdf0e10cSrcweir 
423cdf0e10cSrcweir     SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
424cdf0e10cSrcweir     SwPaM aPam( pTxtFtn->GetTxtNode(), *pTxtFtn->GetStart() );
425cdf0e10cSrcweir     SwPosition aMark( *aPam.Start() );
426cdf0e10cSrcweir     aPam.SetMark();
427cdf0e10cSrcweir     aPam.GetMark()->nContent++;
428cdf0e10cSrcweir     const uno::Reference< text::XTextRange > xRet =
429cdf0e10cSrcweir         SwXTextRange::CreateXTextRange(*GetDoc(), *aPam.Start(), aPam.End());
430cdf0e10cSrcweir     return xRet;
431cdf0e10cSrcweir }
432cdf0e10cSrcweir /*-- 10.12.98 15:31:49---------------------------------------------------
433cdf0e10cSrcweir 
434cdf0e10cSrcweir   -----------------------------------------------------------------------*/
dispose()435cdf0e10cSrcweir void SAL_CALL SwXFootnote::dispose() throw (uno::RuntimeException)
436cdf0e10cSrcweir {
437cdf0e10cSrcweir 	vos::OGuard aGuard(Application::GetSolarMutex());
438cdf0e10cSrcweir 
439cdf0e10cSrcweir     SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
440cdf0e10cSrcweir 
441cdf0e10cSrcweir     SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
442cdf0e10cSrcweir     DBG_ASSERT(pTxtFtn, "no TextNode?");
443cdf0e10cSrcweir     SwTxtNode& rTxtNode = const_cast<SwTxtNode&>(pTxtFtn->GetTxtNode());
444cdf0e10cSrcweir     const xub_StrLen nPos = *pTxtFtn->GetStart();
445cdf0e10cSrcweir     SwPaM aPam(rTxtNode, nPos, rTxtNode, nPos+1);
446cdf0e10cSrcweir     GetDoc()->DeleteAndJoin( aPam );
447cdf0e10cSrcweir }
448cdf0e10cSrcweir 
449cdf0e10cSrcweir /*-- 10.12.98 15:31:49---------------------------------------------------
450cdf0e10cSrcweir 
451cdf0e10cSrcweir   -----------------------------------------------------------------------*/
452cdf0e10cSrcweir void SAL_CALL
addEventListener(const uno::Reference<lang::XEventListener> & xListener)453cdf0e10cSrcweir SwXFootnote::addEventListener(
454cdf0e10cSrcweir     const uno::Reference< lang::XEventListener > & xListener)
455cdf0e10cSrcweir throw (uno::RuntimeException)
456cdf0e10cSrcweir {
457cdf0e10cSrcweir     vos::OGuard g(Application::GetSolarMutex());
458cdf0e10cSrcweir 
459cdf0e10cSrcweir     if (!m_pImpl->GetFootnoteFormat())
460cdf0e10cSrcweir     {
461cdf0e10cSrcweir 		throw uno::RuntimeException();
462cdf0e10cSrcweir     }
463cdf0e10cSrcweir     m_pImpl->m_ListenerContainer.AddListener(xListener);
464cdf0e10cSrcweir }
465cdf0e10cSrcweir /*-- 10.12.98 15:31:50---------------------------------------------------
466cdf0e10cSrcweir 
467cdf0e10cSrcweir   -----------------------------------------------------------------------*/
468cdf0e10cSrcweir void SAL_CALL
removeEventListener(const uno::Reference<lang::XEventListener> & xListener)469cdf0e10cSrcweir SwXFootnote::removeEventListener(
470cdf0e10cSrcweir     const uno::Reference< lang::XEventListener > & xListener)
471cdf0e10cSrcweir throw (uno::RuntimeException)
472cdf0e10cSrcweir {
473cdf0e10cSrcweir     vos::OGuard g(Application::GetSolarMutex());
474cdf0e10cSrcweir 
475cdf0e10cSrcweir     if (!m_pImpl->GetFootnoteFormat() ||
476cdf0e10cSrcweir         !m_pImpl->m_ListenerContainer.RemoveListener(xListener))
477cdf0e10cSrcweir     {
478cdf0e10cSrcweir 		throw uno::RuntimeException();
479cdf0e10cSrcweir     }
480cdf0e10cSrcweir }
481cdf0e10cSrcweir 
482cdf0e10cSrcweir /* -----------------06.05.99 15:31-------------------
483cdf0e10cSrcweir  *
484cdf0e10cSrcweir  * --------------------------------------------------*/
GetStartNode() const485cdf0e10cSrcweir const SwStartNode *SwXFootnote::GetStartNode() const
486cdf0e10cSrcweir {
487cdf0e10cSrcweir     SwFmtFtn const*const   pFmt = m_pImpl->GetFootnoteFormat();
488cdf0e10cSrcweir 	if(pFmt)
489cdf0e10cSrcweir 	{
490cdf0e10cSrcweir 		const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn();
491cdf0e10cSrcweir 		if( pTxtFtn )
492cdf0e10cSrcweir         {
493cdf0e10cSrcweir             return pTxtFtn->GetStartNode()->GetNode().GetStartNode();
494cdf0e10cSrcweir         }
495cdf0e10cSrcweir 	}
496cdf0e10cSrcweir     return 0;
497cdf0e10cSrcweir }
498cdf0e10cSrcweir 
499cdf0e10cSrcweir uno::Reference< text::XTextCursor >
CreateCursor()500cdf0e10cSrcweir SwXFootnote::CreateCursor() throw (uno::RuntimeException)
501cdf0e10cSrcweir {
502cdf0e10cSrcweir 	return createTextCursor();
503cdf0e10cSrcweir }
504cdf0e10cSrcweir 
505cdf0e10cSrcweir /*-- 10.12.98 15:31:50---------------------------------------------------
506cdf0e10cSrcweir 
507cdf0e10cSrcweir   -----------------------------------------------------------------------*/
508cdf0e10cSrcweir uno::Reference< text::XTextCursor > SAL_CALL
createTextCursor()509cdf0e10cSrcweir SwXFootnote::createTextCursor() throw (uno::RuntimeException)
510cdf0e10cSrcweir {
511cdf0e10cSrcweir 	vos::OGuard aGuard(Application::GetSolarMutex());
512cdf0e10cSrcweir 
513cdf0e10cSrcweir     SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
514cdf0e10cSrcweir 
515cdf0e10cSrcweir     SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
516cdf0e10cSrcweir     SwPosition aPos( *pTxtFtn->GetStartNode() );
517cdf0e10cSrcweir     SwXTextCursor *const pXCursor =
518cdf0e10cSrcweir         new SwXTextCursor(*GetDoc(), this, CURSOR_FOOTNOTE, aPos);
519cdf0e10cSrcweir     SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor();
520cdf0e10cSrcweir     pUnoCrsr->Move(fnMoveForward, fnGoNode);
521cdf0e10cSrcweir     const uno::Reference< text::XTextCursor > xRet =
522cdf0e10cSrcweir         static_cast<text::XWordCursor*>(pXCursor);
523cdf0e10cSrcweir     return xRet;
524cdf0e10cSrcweir }
525cdf0e10cSrcweir 
526cdf0e10cSrcweir /*-- 10.12.98 15:31:51---------------------------------------------------
527cdf0e10cSrcweir 
528cdf0e10cSrcweir   -----------------------------------------------------------------------*/
529cdf0e10cSrcweir uno::Reference< text::XTextCursor > SAL_CALL
createTextCursorByRange(const uno::Reference<text::XTextRange> & xTextPosition)530cdf0e10cSrcweir SwXFootnote::createTextCursorByRange(
531cdf0e10cSrcweir     const uno::Reference< text::XTextRange > & xTextPosition)
532cdf0e10cSrcweir throw (uno::RuntimeException)
533cdf0e10cSrcweir {
534cdf0e10cSrcweir 	vos::OGuard aGuard(Application::GetSolarMutex());
535cdf0e10cSrcweir 
536cdf0e10cSrcweir     SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
537cdf0e10cSrcweir 
538cdf0e10cSrcweir     SwUnoInternalPaM aPam(*GetDoc());
539cdf0e10cSrcweir     if (!::sw::XTextRangeToSwPaM(aPam, xTextPosition))
540cdf0e10cSrcweir     {
541cdf0e10cSrcweir         throw uno::RuntimeException();
542cdf0e10cSrcweir     }
543cdf0e10cSrcweir 
544cdf0e10cSrcweir     SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
545cdf0e10cSrcweir     SwNode const*const pFtnStartNode = &pTxtFtn->GetStartNode()->GetNode();
546cdf0e10cSrcweir 
547cdf0e10cSrcweir     const SwNode* pStart = aPam.GetNode()->FindFootnoteStartNode();
548cdf0e10cSrcweir     if (pStart != pFtnStartNode)
549cdf0e10cSrcweir     {
550cdf0e10cSrcweir         throw uno::RuntimeException();
551cdf0e10cSrcweir     }
552cdf0e10cSrcweir 
553cdf0e10cSrcweir     const uno::Reference< text::XTextCursor > xRet =
554cdf0e10cSrcweir         static_cast<text::XWordCursor*>(
555cdf0e10cSrcweir                 new SwXTextCursor(*GetDoc(), this, CURSOR_FOOTNOTE,
556cdf0e10cSrcweir                     *aPam.GetPoint(), aPam.GetMark()));
557cdf0e10cSrcweir     return xRet;
558cdf0e10cSrcweir }
559cdf0e10cSrcweir 
560cdf0e10cSrcweir /*-- 13.06.00 14:28:23---------------------------------------------------
561cdf0e10cSrcweir 
562cdf0e10cSrcweir   -----------------------------------------------------------------------*/
563cdf0e10cSrcweir uno::Reference< container::XEnumeration > SAL_CALL
createEnumeration()564cdf0e10cSrcweir SwXFootnote::createEnumeration() throw (uno::RuntimeException)
565cdf0e10cSrcweir {
566cdf0e10cSrcweir 	vos::OGuard aGuard(Application::GetSolarMutex());
567cdf0e10cSrcweir 
568cdf0e10cSrcweir     SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
569cdf0e10cSrcweir 
570cdf0e10cSrcweir     SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn();
571cdf0e10cSrcweir     SwPosition aPos( *pTxtFtn->GetStartNode() );
572cdf0e10cSrcweir     ::std::auto_ptr<SwUnoCrsr> pUnoCursor(
573cdf0e10cSrcweir         GetDoc()->CreateUnoCrsr(aPos, sal_False));
574cdf0e10cSrcweir     pUnoCursor->Move(fnMoveForward, fnGoNode);
575cdf0e10cSrcweir     const uno::Reference< container::XEnumeration >  xRet =
576cdf0e10cSrcweir         new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_FOOTNOTE);
577cdf0e10cSrcweir     return xRet;
578cdf0e10cSrcweir }
579cdf0e10cSrcweir 
580cdf0e10cSrcweir /*-- 13.06.00 14:28:24---------------------------------------------------
581cdf0e10cSrcweir 
582cdf0e10cSrcweir   -----------------------------------------------------------------------*/
getElementType()583cdf0e10cSrcweir uno::Type SAL_CALL SwXFootnote::getElementType() throw (uno::RuntimeException)
584cdf0e10cSrcweir {
585cdf0e10cSrcweir     return text::XTextRange::static_type();
586cdf0e10cSrcweir }
587cdf0e10cSrcweir /*-- 13.06.00 14:28:24---------------------------------------------------
588cdf0e10cSrcweir 
589cdf0e10cSrcweir   -----------------------------------------------------------------------*/
hasElements()590cdf0e10cSrcweir sal_Bool SAL_CALL SwXFootnote::hasElements() throw (uno::RuntimeException)
591cdf0e10cSrcweir {
592cdf0e10cSrcweir 	return sal_True;
593cdf0e10cSrcweir }
594cdf0e10cSrcweir 
595cdf0e10cSrcweir /*-- 11.09.00 13:12:03---------------------------------------------------
596cdf0e10cSrcweir 
597cdf0e10cSrcweir   -----------------------------------------------------------------------*/
598cdf0e10cSrcweir uno::Reference< beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo()599cdf0e10cSrcweir SwXFootnote::getPropertySetInfo()
600cdf0e10cSrcweir throw (uno::RuntimeException)
601cdf0e10cSrcweir {
602cdf0e10cSrcweir     vos::OGuard g(Application::GetSolarMutex());
603cdf0e10cSrcweir     static uno::Reference< beans::XPropertySetInfo > xRet =
604cdf0e10cSrcweir         aSwMapProvider.GetPropertySet(PROPERTY_MAP_FOOTNOTE)
605cdf0e10cSrcweir             ->getPropertySetInfo();
606cdf0e10cSrcweir     return xRet;
607cdf0e10cSrcweir }
608cdf0e10cSrcweir 
609cdf0e10cSrcweir /*-- 11.09.00 13:12:04---------------------------------------------------
610cdf0e10cSrcweir 
611cdf0e10cSrcweir   -----------------------------------------------------------------------*/
612cdf0e10cSrcweir void SAL_CALL
setPropertyValue(const::rtl::OUString &,const uno::Any &)613cdf0e10cSrcweir SwXFootnote::setPropertyValue(const ::rtl::OUString&, const uno::Any&)
614cdf0e10cSrcweir throw (beans::UnknownPropertyException, beans::PropertyVetoException,
615cdf0e10cSrcweir         lang::IllegalArgumentException, lang::WrappedTargetException,
616cdf0e10cSrcweir         uno::RuntimeException)
617cdf0e10cSrcweir {
618cdf0e10cSrcweir 	//no values to be set
619cdf0e10cSrcweir 	throw lang::IllegalArgumentException();
620cdf0e10cSrcweir }
621cdf0e10cSrcweir /*-- 11.09.00 13:12:04---------------------------------------------------
622cdf0e10cSrcweir 
623cdf0e10cSrcweir   -----------------------------------------------------------------------*/
624cdf0e10cSrcweir uno::Any SAL_CALL
getPropertyValue(const OUString & rPropertyName)625cdf0e10cSrcweir SwXFootnote::getPropertyValue(const OUString& rPropertyName)
626cdf0e10cSrcweir throw (beans::UnknownPropertyException, lang::WrappedTargetException,
627cdf0e10cSrcweir         uno::RuntimeException)
628cdf0e10cSrcweir {
629cdf0e10cSrcweir 	vos::OGuard aGuard(Application::GetSolarMutex());
630cdf0e10cSrcweir 
631cdf0e10cSrcweir 	uno::Any aRet;
632cdf0e10cSrcweir     if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName))
633cdf0e10cSrcweir 	{
634cdf0e10cSrcweir         if (rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_START_REDLINE)) ||
635cdf0e10cSrcweir             rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_END_REDLINE)))
636cdf0e10cSrcweir         {
637cdf0e10cSrcweir             //redline can only be returned if it's a living object
638cdf0e10cSrcweir             if (!m_pImpl->m_bIsDescriptor)
639cdf0e10cSrcweir             {
640cdf0e10cSrcweir                 aRet = SwXText::getPropertyValue(rPropertyName);
641cdf0e10cSrcweir             }
642cdf0e10cSrcweir         }
643cdf0e10cSrcweir         else if (rPropertyName.equalsAsciiL(
644cdf0e10cSrcweir                     SW_PROP_NAME(UNO_NAME_REFERENCE_ID)))
645cdf0e10cSrcweir         {
646cdf0e10cSrcweir             SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
647cdf0e10cSrcweir             if (pFmt)
648cdf0e10cSrcweir             {
649cdf0e10cSrcweir                 SwTxtFtn const*const pTxtFtn = pFmt->GetTxtFtn();
650cdf0e10cSrcweir                 DBG_ASSERT(pTxtFtn, "no TextNode?");
651cdf0e10cSrcweir                 aRet <<= static_cast<sal_Int16>(pTxtFtn->GetSeqRefNo());
652cdf0e10cSrcweir             }
653cdf0e10cSrcweir         }
654cdf0e10cSrcweir         else
655cdf0e10cSrcweir         {
656cdf0e10cSrcweir             beans::UnknownPropertyException aExcept;
657cdf0e10cSrcweir             aExcept.Message = rPropertyName;
658cdf0e10cSrcweir             throw aExcept;
659cdf0e10cSrcweir         }
660cdf0e10cSrcweir 	}
661cdf0e10cSrcweir 	return aRet;
662cdf0e10cSrcweir }
663cdf0e10cSrcweir 
664cdf0e10cSrcweir /*-- 11.09.00 13:12:04---------------------------------------------------
665cdf0e10cSrcweir 
666cdf0e10cSrcweir   -----------------------------------------------------------------------*/
667cdf0e10cSrcweir void SAL_CALL
addPropertyChangeListener(const::rtl::OUString &,const uno::Reference<beans::XPropertyChangeListener> &)668cdf0e10cSrcweir SwXFootnote::addPropertyChangeListener(
669cdf0e10cSrcweir         const ::rtl::OUString& /*rPropertyName*/,
670cdf0e10cSrcweir         const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
671cdf0e10cSrcweir throw (beans::UnknownPropertyException, lang::WrappedTargetException,
672cdf0e10cSrcweir     uno::RuntimeException)
673cdf0e10cSrcweir {
674cdf0e10cSrcweir     OSL_ENSURE(false,
675cdf0e10cSrcweir         "SwXFootnote::addPropertyChangeListener(): not implemented");
676cdf0e10cSrcweir }
677cdf0e10cSrcweir 
678cdf0e10cSrcweir void SAL_CALL
removePropertyChangeListener(const::rtl::OUString &,const uno::Reference<beans::XPropertyChangeListener> &)679cdf0e10cSrcweir SwXFootnote::removePropertyChangeListener(
680cdf0e10cSrcweir         const ::rtl::OUString& /*rPropertyName*/,
681cdf0e10cSrcweir         const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
682cdf0e10cSrcweir throw (beans::UnknownPropertyException, lang::WrappedTargetException,
683cdf0e10cSrcweir     uno::RuntimeException)
684cdf0e10cSrcweir {
685cdf0e10cSrcweir     OSL_ENSURE(false,
686cdf0e10cSrcweir         "SwXFootnote::removePropertyChangeListener(): not implemented");
687cdf0e10cSrcweir }
688cdf0e10cSrcweir 
689cdf0e10cSrcweir void SAL_CALL
addVetoableChangeListener(const::rtl::OUString &,const uno::Reference<beans::XVetoableChangeListener> &)690cdf0e10cSrcweir SwXFootnote::addVetoableChangeListener(
691cdf0e10cSrcweir         const ::rtl::OUString& /*rPropertyName*/,
692cdf0e10cSrcweir         const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
693cdf0e10cSrcweir throw (beans::UnknownPropertyException, lang::WrappedTargetException,
694cdf0e10cSrcweir     uno::RuntimeException)
695cdf0e10cSrcweir {
696cdf0e10cSrcweir     OSL_ENSURE(false,
697cdf0e10cSrcweir         "SwXFootnote::addVetoableChangeListener(): not implemented");
698cdf0e10cSrcweir }
699cdf0e10cSrcweir 
700cdf0e10cSrcweir void SAL_CALL
removeVetoableChangeListener(const::rtl::OUString &,const uno::Reference<beans::XVetoableChangeListener> &)701cdf0e10cSrcweir SwXFootnote::removeVetoableChangeListener(
702cdf0e10cSrcweir         const ::rtl::OUString& /*rPropertyName*/,
703cdf0e10cSrcweir         const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
704cdf0e10cSrcweir throw (beans::UnknownPropertyException, lang::WrappedTargetException,
705cdf0e10cSrcweir         uno::RuntimeException)
706cdf0e10cSrcweir {
707cdf0e10cSrcweir     OSL_ENSURE(false,
708cdf0e10cSrcweir         "SwXFootnote::removeVetoableChangeListener(): not implemented");
709cdf0e10cSrcweir }
710cdf0e10cSrcweir 
711