LibreOffice Module sw (master) 1
unoftn.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <sal/config.h>
21
26#include <svl/listener.hxx>
27#include <mutex>
28
29#include <unofootnote.hxx>
30#include <unotextrange.hxx>
31#include <unotextcursor.hxx>
32#include <unoparagraph.hxx>
33#include <unomap.hxx>
34#include <unoprnms.hxx>
35#include <doc.hxx>
36#include <ftnidx.hxx>
37#include <fmtftn.hxx>
38#include <txtftn.hxx>
39#include <ndtxt.hxx>
40#include <unocrsr.hxx>
41#include <svl/itemprop.hxx>
42
43using namespace ::com::sun::star;
44
45namespace {
46
47uno::Sequence< OUString >
48GetSupportedServiceNamesImpl(
49 size_t const nServices, char const*const pServices[])
50{
51 uno::Sequence< OUString > ret(static_cast<sal_Int32>(nServices));
52
53 std::transform(pServices, pServices + nServices, ret.getArray(),
54 [](const char* pService) -> OUString { return OUString::createFromAscii(pService); });
55
56 return ret;
57}
58
59}
60
62 : public SvtListener
63{
64public:
65
68 const bool m_bIsEndnote;
69 std::mutex m_Mutex; // just for OInterfaceContainerHelper4
73 OUString m_sLabel;
74
76 SwFormatFootnote* const pFootnote,
77 const bool bIsEndnote)
78 : m_rThis(rThis)
79 , m_bIsEndnote(bIsEndnote)
80 , m_bIsDescriptor(nullptr == pFootnote)
81 , m_pFormatFootnote(pFootnote)
82 {
84 }
85
87 return m_rThis.GetDoc() ? m_pFormatFootnote : nullptr;
88 }
89
91 SwFormatFootnote const*const pFootnote( GetFootnoteFormat() );
92 if (!pFootnote) {
93 throw uno::RuntimeException("SwXFootnote: disposed or invalid", nullptr);
94 }
95 return *pFootnote;
96 }
97
98 void Invalidate();
99protected:
100 void Notify(const SfxHint& rHint) override;
101
102};
103
105{
107 m_pFormatFootnote = nullptr;
108 m_rThis.SetDoc(nullptr);
109 uno::Reference<uno::XInterface> const xThis(m_wThis);
110 if (!xThis.is())
111 { // fdo#72695: if UNO object is already dead, don't revive it with event
112 return;
113 }
114 lang::EventObject const ev(xThis);
115 std::unique_lock aGuard(m_Mutex);
117}
118
120{
121 if(rHint.GetId() == SfxHintId::Dying)
122 Invalidate();
123}
124
125SwXFootnote::SwXFootnote(const bool bEndnote)
126 : SwXText(nullptr, CursorType::Footnote)
127 , m_pImpl( new SwXFootnote::Impl(*this, nullptr, bEndnote) )
128{
129}
130
132 : SwXText(& rDoc, CursorType::Footnote)
133 , m_pImpl( new SwXFootnote::Impl(*this, &rFormat, rFormat.IsEndNote()) )
134{
135}
136
138{
139}
140
143 bool const isEndnote)
144{
145 // i#105557: do not iterate over the registered clients: race condition
147 if (pFootnoteFormat)
148 {
149 xNote = pFootnoteFormat->GetXFootnote();
150 }
151 if (!xNote.is())
152 {
153 xNote = pFootnoteFormat
154 ? new SwXFootnote(rDoc, *pFootnoteFormat)
155 : new SwXFootnote(isEndnote);
156 if (pFootnoteFormat)
157 {
158 pFootnoteFormat->SetXFootnote(xNote);
159 }
160 // need a permanent Reference to initialize m_wThis
161 xNote->m_pImpl->m_wThis = xNote.get();
162 }
163 return xNote;
164}
165
166OUString SAL_CALL
168{
169 return "SwXFootnote";
170}
171
172char const*const g_ServicesFootnote[] =
173{
174 "com.sun.star.text.TextContent",
175 "com.sun.star.text.Footnote",
176 "com.sun.star.text.Text",
177 "com.sun.star.text.Endnote", // NB: only supported for endnotes!
178};
179
181
182const size_t g_nServicesFootnote( g_nServicesEndnote - 1 ); // NB: omit!
183
184sal_Bool SAL_CALL SwXFootnote::supportsService(const OUString& rServiceName)
185{
186 return cppu::supportsService(this, rServiceName);
187}
188
189uno::Sequence< OUString > SAL_CALL
191{
193 return GetSupportedServiceNamesImpl(
196}
197
198uno::Sequence< uno::Type > SAL_CALL
200{
201 const uno::Sequence< uno::Type > aTypes = SwXFootnote_Base::getTypes();
202 const uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes();
203 return ::comphelper::concatSequences(aTypes, aTextTypes);
204}
205
206uno::Sequence< sal_Int8 > SAL_CALL
208{
209 return css::uno::Sequence<sal_Int8>();
210}
211
212uno::Any SAL_CALL
214{
215 const uno::Any ret = SwXFootnote_Base::queryInterface(rType);
216 return (ret.getValueType() == cppu::UnoType<void>::get())
218 : ret;
219}
220
221OUString SAL_CALL SwXFootnote::getLabel()
222{
223 SolarMutexGuard aGuard;
224
225 OUString sRet;
226 SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
227 if(pFormat)
228 {
229 sRet = pFormat->GetNumStr();
230 }
231 else if (m_pImpl->m_bIsDescriptor)
232 {
233 sRet = m_pImpl->m_sLabel;
234 }
235 else
236 {
237 throw uno::RuntimeException();
238 }
239 return sRet;
240}
241
242void SAL_CALL
243SwXFootnote::setLabel(const OUString& aLabel)
244{
245 SolarMutexGuard aGuard;
246 OUString newLabel(aLabel);
247 //new line must not occur as footnote label
248 if(newLabel.indexOf('\n') >=0 )
249 {
250 newLabel = newLabel.replace('\n', ' ');
251 }
252 SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
253 if(pFormat)
254 {
255 const SwTextFootnote* pTextFootnote = pFormat->GetTextFootnote();
256 OSL_ENSURE(pTextFootnote, "No TextNode?");
257 SwTextNode& rTextNode = const_cast<SwTextNode&>(pTextFootnote->GetTextNode());
258
259 SwPaM aPam(rTextNode, pTextFootnote->GetStart());
260 GetDoc()->SetCurFootnote(aPam, newLabel, pFormat->IsEndNote());
261 }
262 else if (m_pImpl->m_bIsDescriptor)
263 {
264 m_pImpl->m_sLabel = newLabel;
265 }
266 else
267 {
268 throw uno::RuntimeException();
269 }
270}
271
272void SAL_CALL
273SwXFootnote::attach(const uno::Reference< text::XTextRange > & xTextRange)
274{
275 SolarMutexGuard aGuard;
276
277 if (!m_pImpl->m_bIsDescriptor)
278 {
279 throw uno::RuntimeException();
280 }
281 SwXTextRange *const pRange = dynamic_cast<SwXTextRange*>(xTextRange.get());
282 OTextCursorHelper *const pCursor = dynamic_cast<OTextCursorHelper*>(xTextRange.get());
283 SwDoc *const pNewDoc =
284 pRange ? &pRange->GetDoc() : (pCursor ? pCursor->GetDoc() : nullptr);
285 if (!pNewDoc)
286 {
287 throw lang::IllegalArgumentException();
288 }
289
290 SwUnoInternalPaM aPam(*pNewDoc);
291 // this now needs to return TRUE
292 ::sw::XTextRangeToSwPaM(aPam, xTextRange);
293
294 UnoActionContext aCont(pNewDoc);
296 aPam.DeleteMark();
297 SwFormatFootnote aFootNote(m_pImpl->m_bIsEndnote);
298 if (!m_pImpl->m_sLabel.isEmpty())
299 {
300 aFootNote.SetNumStr(m_pImpl->m_sLabel);
301 }
302
303 SwXTextCursor const*const pTextCursor(
304 dynamic_cast<SwXTextCursor*>(pCursor));
305 const bool bForceExpandHints( pTextCursor && pTextCursor->IsAtEndOfMeta() );
306 const SetAttrMode nInsertFlags = bForceExpandHints
309
310 pNewDoc->getIDocumentContentOperations().InsertPoolItem(aPam, aFootNote, nInsertFlags);
311
312 SwTextFootnote *const pTextAttr = static_cast<SwTextFootnote*>(
315
316 if (pTextAttr)
317 {
318 m_pImpl->EndListeningAll();
319 SwFormatFootnote* pFootnote = const_cast<SwFormatFootnote*>(&pTextAttr->GetFootnote());
320 m_pImpl->m_pFormatFootnote = pFootnote;
321 m_pImpl->StartListening(pFootnote->GetNotifier());
322 // force creation of sequence id - is used for references
323 if (pNewDoc->IsInReading())
324 {
325 pTextAttr->SetSeqNo(pNewDoc->GetFootnoteIdxs().size());
326 }
327 else
328 {
329 pTextAttr->SetSeqRefNo();
330 }
331 }
332 m_pImpl->m_bIsDescriptor = false;
333 SetDoc(pNewDoc);
334}
335
336uno::Reference< text::XTextRange > SAL_CALL
338{
339 SolarMutexGuard aGuard;
340 return m_pImpl->GetFootnoteFormatOrThrow().getAnchor(*GetDoc());
341}
342
343void SAL_CALL SwXFootnote::dispose()
344{
345 SolarMutexGuard aGuard;
346
347 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
348
349 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
350 OSL_ENSURE(pTextFootnote, "no TextNode?");
351 SwTextNode& rTextNode = const_cast<SwTextNode&>(pTextFootnote->GetTextNode());
352 const sal_Int32 nPos = pTextFootnote->GetStart();
353 SwPaM aPam(rTextNode, nPos, rTextNode, nPos+1);
355}
356
357void SAL_CALL
359 const uno::Reference< lang::XEventListener > & xListener)
360{
361 // no need to lock here as m_pImpl is const and container threadsafe
362 std::unique_lock aGuard(m_pImpl->m_Mutex);
363 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
364}
365
366void SAL_CALL
368 const uno::Reference< lang::XEventListener > & xListener)
369{
370 // no need to lock here as m_pImpl is const and container threadsafe
371 std::unique_lock aGuard(m_pImpl->m_Mutex);
372 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
373}
374
376{
377 SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
378 if(pFormat)
379 {
380 const SwTextFootnote* pTextFootnote = pFormat->GetTextFootnote();
381 if( pTextFootnote )
382 {
383 return pTextFootnote->GetStartNode()->GetNode().GetStartNode();
384 }
385 }
386 return nullptr;
387}
388
389uno::Reference< text::XTextCursor >
391{
392 return createTextCursor();
393}
394
395uno::Reference< text::XTextCursor > SAL_CALL
397{
398 SolarMutexGuard aGuard;
399
400 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
401
402 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
403 SwPosition aPos( *pTextFootnote->GetStartNode() );
405 new SwXTextCursor(*GetDoc(), this, CursorType::Footnote, aPos);
406 auto& rUnoCursor(pXCursor->GetCursor());
407 rUnoCursor.Move(fnMoveForward, GoInNode);
408 return static_cast<text::XWordCursor*>(pXCursor.get());
409}
410
411uno::Reference< text::XTextCursor > SAL_CALL
413 const uno::Reference< text::XTextRange > & xTextPosition)
414{
415 SolarMutexGuard aGuard;
416
417 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
418
419 SwUnoInternalPaM aPam(*GetDoc());
420 if (!::sw::XTextRangeToSwPaM(aPam, xTextPosition))
421 {
422 throw uno::RuntimeException();
423 }
424
425 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
426 SwNode const*const pFootnoteStartNode = &pTextFootnote->GetStartNode()->GetNode();
427
428 const SwNode* pStart = aPam.GetPointNode().FindFootnoteStartNode();
429 if (pStart != pFootnoteStartNode)
430 {
431 throw uno::RuntimeException();
432 }
433
434 const uno::Reference< text::XTextCursor > xRet =
435 static_cast<text::XWordCursor*>(
437 *aPam.GetPoint(), aPam.GetMark()));
438 return xRet;
439}
440
441uno::Reference< container::XEnumeration > SAL_CALL
443{
444 SolarMutexGuard aGuard;
445
446 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
447
448 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
449 SwPosition aPos( *pTextFootnote->GetStartNode() );
450 auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos));
451 pUnoCursor->Move(fnMoveForward, GoInNode);
453}
454
456{
458}
459
461{
462 return true;
463}
464
465uno::Reference< beans::XPropertySetInfo > SAL_CALL
467{
469 static uno::Reference< beans::XPropertySetInfo > xRet =
472 return xRet;
473}
474
475void SAL_CALL
477{
478 //no values to be set
479 throw lang::IllegalArgumentException();
480}
481
482uno::Any SAL_CALL
483SwXFootnote::getPropertyValue(const OUString& rPropertyName)
484{
485 SolarMutexGuard aGuard;
486
487 uno::Any aRet;
488 if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName))
489 {
490 if (rPropertyName == UNO_NAME_START_REDLINE ||
491 rPropertyName == UNO_NAME_END_REDLINE)
492 {
493 //redline can only be returned if it's a living object
494 if (!m_pImpl->m_bIsDescriptor)
495 {
496 aRet = SwXText::getPropertyValue(rPropertyName);
497 }
498 }
499 else if (rPropertyName == UNO_NAME_REFERENCE_ID)
500 {
501 SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
502 if (pFormat)
503 {
504 SwTextFootnote const*const pTextFootnote = pFormat->GetTextFootnote();
505 OSL_ENSURE(pTextFootnote, "no TextNode?");
506 aRet <<= static_cast<sal_Int16>(pTextFootnote->GetSeqRefNo());
507 }
508 }
509 else
510 {
511 beans::UnknownPropertyException aExcept;
512 aExcept.Message = rPropertyName;
513 throw aExcept;
514 }
515 }
516 return aRet;
517}
518
519void SAL_CALL
521 const OUString& /*rPropertyName*/,
522 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
523{
524 OSL_FAIL("SwXFootnote::addPropertyChangeListener(): not implemented");
525}
526
527void SAL_CALL
529 const OUString& /*rPropertyName*/,
530 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
531{
532 OSL_FAIL("SwXFootnote::removePropertyChangeListener(): not implemented");
533}
534
535void SAL_CALL
537 const OUString& /*rPropertyName*/,
538 const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
539{
540 OSL_FAIL("SwXFootnote::addVetoableChangeListener(): not implemented");
541}
542
543void SAL_CALL
545 const OUString& /*rPropertyName*/,
546 const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
547{
548 OSL_FAIL("SwXFootnote::removeVetoableChangeListener(): not implemented");
549}
550
551/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
virtual bool DeleteAndJoin(SwPaM &, SwDeleteFlags flags=SwDeleteFlags::Default)=0
complete delete of a given PaM
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, SwTextAttr **ppNewTextAttr=nullptr)=0
Insert an attribute.
SfxHintId GetId() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
void EndListeningAll()
bool StartListening(SvtBroadcaster &rBroadcaster)
Definition: doc.hxx:195
bool IsInReading() const
Definition: doc.hxx:965
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:323
bool SetCurFootnote(const SwPaM &rPam, const OUString &rNumStr, bool bIsEndNote)
change footnotes in range
Definition: docftn.cxx:432
SwFootnoteIdxs & GetFootnoteIdxs()
Definition: doc.hxx:645
const OUString & GetNumStr() const
Definition: fmtftn.hxx:70
void SetXFootnote(rtl::Reference< SwXFootnote > const &xNote)
Definition: atrftn.cxx:136
bool IsEndNote() const
Definition: fmtftn.hxx:73
unotools::WeakReference< SwXFootnote > const & GetXFootnote() const
Definition: fmtftn.hxx:96
void SetNumStr(const OUString &rStr)
Definition: fmtftn.hxx:75
const SwTextFootnote * GetTextFootnote() const
Definition: fmtftn.hxx:85
SwNode & GetNode() const
Definition: ndindex.hxx:123
Base class of the Writer document model elements.
Definition: node.hxx:98
SwStartNode * GetStartNode()
Definition: node.hxx:642
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:903
const SwStartNode * FindFootnoteStartNode() const
Definition: node.hxx:222
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:187
const SwPosition * GetMark() const
Definition: pam.hxx:263
SwNode & GetPointNode() const
Definition: pam.hxx:283
void DeleteMark()
Definition: pam.hxx:231
const SwPosition * GetPoint() const
Definition: pam.hxx:261
Starts a section of nodes in the document model.
Definition: node.hxx:348
const SwFormatFootnote & GetFootnote() const
Definition: txatbase.hxx:208
sal_Int32 GetStart() const
Definition: txatbase.hxx:88
SwTextAttr subclass for footnotes and endnotes.
Definition: txtftn.hxx:34
void SetSeqRefNo()
Set the sequence number for the current footnote.
Definition: atrftn.cxx:545
void SetSeqNo(sal_uInt16 n)
Definition: txtftn.hxx:65
const SwNodeIndex * GetStartNode() const
Definition: txtftn.hxx:43
const SwTextNode & GetTextNode() const
Definition: txtftn.hxx:72
sal_uInt16 GetSeqRefNo() const
Definition: txtftn.hxx:66
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
Definition: ndtxt.cxx:3153
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
Definition: unomap1.cxx:1082
const SwFormatFootnote * GetFootnoteFormat() const
Definition: unoftn.cxx:86
SwFormatFootnote const & GetFootnoteFormatOrThrow() const
Definition: unoftn.cxx:90
unotools::WeakReference< SwXFootnote > m_wThis
Definition: unoftn.cxx:67
OUString m_sLabel
Definition: unoftn.cxx:73
bool m_bIsDescriptor
Definition: unoftn.cxx:71
Impl(SwXFootnote &rThis, SwFormatFootnote *const pFootnote, const bool bIsEndnote)
Definition: unoftn.cxx:75
std::mutex m_Mutex
Definition: unoftn.cxx:69
SwFormatFootnote * m_pFormatFootnote
Definition: unoftn.cxx:72
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_EventListeners
Definition: unoftn.cxx:70
SwXFootnote & m_rThis
Definition: unoftn.cxx:66
void Invalidate()
Definition: unoftn.cxx:104
void Notify(const SfxHint &rHint) override
Definition: unoftn.cxx:119
const bool m_bIsEndnote
Definition: unoftn.cxx:68
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
Definition: unoftn.cxx:337
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unoftn.cxx:184
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unoftn.cxx:199
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unoftn.cxx:483
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoftn.cxx:544
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unofootnote.hxx:48
virtual ~SwXFootnote() override
Definition: unoftn.cxx:137
virtual void SAL_CALL setLabel(const OUString &rLabel) override
Definition: unoftn.cxx:243
SwXFootnote(SwDoc &rDoc, SwFormatFootnote &rFormat)
Definition: unoftn.cxx:131
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoftn.cxx:520
virtual OUString SAL_CALL getImplementationName() override
Definition: unoftn.cxx:167
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoftn.cxx:536
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unoftn.cxx:476
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoftn.cxx:207
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unoftn.cxx:358
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoftn.cxx:528
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoftn.cxx:460
virtual OUString SAL_CALL getLabel() override
Definition: unoftn.cxx:221
virtual void SAL_CALL dispose() override
Definition: unoftn.cxx:343
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoftn.cxx:455
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &xTextPosition) override
Definition: unoftn.cxx:412
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoftn.cxx:466
static rtl::Reference< SwXFootnote > CreateXFootnote(SwDoc &rDoc, SwFormatFootnote *pFootnoteFormat, bool isEndnote=false)
Definition: unoftn.cxx:142
virtual css::uno::Reference< css::text::XTextCursor > CreateCursor() override
Definition: unoftn.cxx:390
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoftn.cxx:190
virtual const SwStartNode * GetStartNode() const override
Definition: unoftn.cxx:375
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unoftn.cxx:367
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unoftn.cxx:273
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoftn.cxx:396
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unoftn.cxx:213
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unoftn.cxx:442
bool IsAtEndOfMeta() const
Definition: unoobj.cxx:916
const SwDoc & GetDoc() const
Definition: unoobj2.cxx:764
const SwDoc * GetDoc() const
Definition: unotext.cxx:134
void SetDoc(SwDoc *const pDoc)
Definition: unotext.cxx:154
void Invalidate()
Definition: unotext.cxx:149
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext.cxx:194
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unotext.cxx:1089
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:261
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
css::uno::Type const & get()
size_type size() const
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
sal_uInt16 nPos
#define SAL_N_ELEMENTS(arr)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange, ::sw::TextRangeMode const eMode)
Definition: unoobj2.cxx:1090
bool GetDefaultTextContentValue(css::uno::Any &rAny, std::u16string_view rPropertyName, sal_uInt16 nWID=0)
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:1171
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Definition: paminit.cxx:61
Marks a position in the document model.
Definition: pam.hxx:37
sal_Int32 GetContentIndex() const
Definition: pam.hxx:84
static rtl::Reference< SwXParagraphEnumeration > Create(css::uno::Reference< css::text::XText > const &xParent, const std::shared_ptr< SwUnoCursor > &pCursor, const CursorType eType, SwTableBox const *const pTableBox=nullptr)
Definition: unoobj2.cxx:447
SetAttrMode
Definition: swtypes.hxx:133
@ FORCEHINTEXPAND
Force hint expand (only matters for hints with CH_TXTATR).
unsigned char sal_Bool
OUString aLabel
CursorType
char const *const g_ServicesFootnote[]
Definition: unoftn.cxx:172
const size_t g_nServicesEndnote(SAL_N_ELEMENTS(g_ServicesFootnote))
const size_t g_nServicesFootnote(g_nServicesEndnote - 1)
SwUnoPropertyMapProvider aSwMapProvider
Definition: unomap1.cxx:87
#define PROPERTY_MAP_FOOTNOTE
Definition: unomap.hxx:61
constexpr OUStringLiteral UNO_NAME_START_REDLINE
Definition: unoprnms.hxx:593
constexpr OUStringLiteral UNO_NAME_REFERENCE_ID
Definition: unoprnms.hxx:505
constexpr OUStringLiteral UNO_NAME_END_REDLINE
Definition: unoprnms.hxx:594
const SvXMLTokenMapEntry aTypes[]