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
166const uno::Sequence< sal_Int8 > & SwXFootnote::getUnoTunnelId()
167{
168 static const comphelper::UnoIdInit theSwXFootnoteUnoTunnelId;
169 return theSwXFootnoteUnoTunnelId.getSeq();
170}
171
172sal_Int64 SAL_CALL
173SwXFootnote::getSomething(const uno::Sequence< sal_Int8 >& rId)
174{
175 const sal_Int64 nRet( comphelper::getSomethingImpl<SwXFootnote>(rId, this) );
176 return nRet ? nRet : SwXText::getSomething(rId);
177}
178
179OUString SAL_CALL
181{
182 return "SwXFootnote";
183}
184
185char const*const g_ServicesFootnote[] =
186{
187 "com.sun.star.text.TextContent",
188 "com.sun.star.text.Footnote",
189 "com.sun.star.text.Text",
190 "com.sun.star.text.Endnote", // NB: only supported for endnotes!
191};
192
194
195const size_t g_nServicesFootnote( g_nServicesEndnote - 1 ); // NB: omit!
196
197sal_Bool SAL_CALL SwXFootnote::supportsService(const OUString& rServiceName)
198{
199 return cppu::supportsService(this, rServiceName);
200}
201
202uno::Sequence< OUString > SAL_CALL
204{
206 return GetSupportedServiceNamesImpl(
209}
210
211uno::Sequence< uno::Type > SAL_CALL
213{
214 const uno::Sequence< uno::Type > aTypes = SwXFootnote_Base::getTypes();
215 const uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes();
216 return ::comphelper::concatSequences(aTypes, aTextTypes);
217}
218
219uno::Sequence< sal_Int8 > SAL_CALL
221{
222 return css::uno::Sequence<sal_Int8>();
223}
224
225uno::Any SAL_CALL
227{
228 const uno::Any ret = SwXFootnote_Base::queryInterface(rType);
229 return (ret.getValueType() == cppu::UnoType<void>::get())
231 : ret;
232}
233
234OUString SAL_CALL SwXFootnote::getLabel()
235{
236 SolarMutexGuard aGuard;
237
238 OUString sRet;
239 SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
240 if(pFormat)
241 {
242 sRet = pFormat->GetNumStr();
243 }
244 else if (m_pImpl->m_bIsDescriptor)
245 {
246 sRet = m_pImpl->m_sLabel;
247 }
248 else
249 {
250 throw uno::RuntimeException();
251 }
252 return sRet;
253}
254
255void SAL_CALL
256SwXFootnote::setLabel(const OUString& aLabel)
257{
258 SolarMutexGuard aGuard;
259 OUString newLabel(aLabel);
260 //new line must not occur as footnote label
261 if(newLabel.indexOf('\n') >=0 )
262 {
263 newLabel = newLabel.replace('\n', ' ');
264 }
265 SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
266 if(pFormat)
267 {
268 const SwTextFootnote* pTextFootnote = pFormat->GetTextFootnote();
269 OSL_ENSURE(pTextFootnote, "No TextNode?");
270 SwTextNode& rTextNode = const_cast<SwTextNode&>(pTextFootnote->GetTextNode());
271
272 SwPaM aPam(rTextNode, pTextFootnote->GetStart());
273 GetDoc()->SetCurFootnote(aPam, newLabel, pFormat->IsEndNote());
274 }
275 else if (m_pImpl->m_bIsDescriptor)
276 {
277 m_pImpl->m_sLabel = newLabel;
278 }
279 else
280 {
281 throw uno::RuntimeException();
282 }
283}
284
285void SAL_CALL
286SwXFootnote::attach(const uno::Reference< text::XTextRange > & xTextRange)
287{
288 SolarMutexGuard aGuard;
289
290 if (!m_pImpl->m_bIsDescriptor)
291 {
292 throw uno::RuntimeException();
293 }
294 const uno::Reference<lang::XUnoTunnel> xRangeTunnel(
295 xTextRange, uno::UNO_QUERY);
296 SwXTextRange *const pRange =
297 comphelper::getFromUnoTunnel<SwXTextRange>(xRangeTunnel);
298 OTextCursorHelper *const pCursor =
299 comphelper::getFromUnoTunnel<OTextCursorHelper>(xRangeTunnel);
300 SwDoc *const pNewDoc =
301 pRange ? &pRange->GetDoc() : (pCursor ? pCursor->GetDoc() : nullptr);
302 if (!pNewDoc)
303 {
304 throw lang::IllegalArgumentException();
305 }
306
307 SwUnoInternalPaM aPam(*pNewDoc);
308 // this now needs to return TRUE
309 ::sw::XTextRangeToSwPaM(aPam, xTextRange);
310
311 UnoActionContext aCont(pNewDoc);
313 aPam.DeleteMark();
314 SwFormatFootnote aFootNote(m_pImpl->m_bIsEndnote);
315 if (!m_pImpl->m_sLabel.isEmpty())
316 {
317 aFootNote.SetNumStr(m_pImpl->m_sLabel);
318 }
319
320 SwXTextCursor const*const pTextCursor(
321 dynamic_cast<SwXTextCursor*>(pCursor));
322 const bool bForceExpandHints( pTextCursor && pTextCursor->IsAtEndOfMeta() );
323 const SetAttrMode nInsertFlags = bForceExpandHints
326
327 pNewDoc->getIDocumentContentOperations().InsertPoolItem(aPam, aFootNote, nInsertFlags);
328
329 SwTextFootnote *const pTextAttr = static_cast<SwTextFootnote*>(
332
333 if (pTextAttr)
334 {
335 m_pImpl->EndListeningAll();
336 SwFormatFootnote* pFootnote = const_cast<SwFormatFootnote*>(&pTextAttr->GetFootnote());
337 m_pImpl->m_pFormatFootnote = pFootnote;
338 m_pImpl->StartListening(pFootnote->GetNotifier());
339 // force creation of sequence id - is used for references
340 if (pNewDoc->IsInReading())
341 {
342 pTextAttr->SetSeqNo(pNewDoc->GetFootnoteIdxs().size());
343 }
344 else
345 {
346 pTextAttr->SetSeqRefNo();
347 }
348 }
349 m_pImpl->m_bIsDescriptor = false;
350 SetDoc(pNewDoc);
351}
352
353uno::Reference< text::XTextRange > SAL_CALL
355{
356 SolarMutexGuard aGuard;
357 return m_pImpl->GetFootnoteFormatOrThrow().getAnchor(*GetDoc());
358}
359
360void SAL_CALL SwXFootnote::dispose()
361{
362 SolarMutexGuard aGuard;
363
364 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
365
366 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
367 OSL_ENSURE(pTextFootnote, "no TextNode?");
368 SwTextNode& rTextNode = const_cast<SwTextNode&>(pTextFootnote->GetTextNode());
369 const sal_Int32 nPos = pTextFootnote->GetStart();
370 SwPaM aPam(rTextNode, nPos, rTextNode, nPos+1);
372}
373
374void SAL_CALL
376 const uno::Reference< lang::XEventListener > & xListener)
377{
378 // no need to lock here as m_pImpl is const and container threadsafe
379 std::unique_lock aGuard(m_pImpl->m_Mutex);
380 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
381}
382
383void SAL_CALL
385 const uno::Reference< lang::XEventListener > & xListener)
386{
387 // no need to lock here as m_pImpl is const and container threadsafe
388 std::unique_lock aGuard(m_pImpl->m_Mutex);
389 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
390}
391
393{
394 SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
395 if(pFormat)
396 {
397 const SwTextFootnote* pTextFootnote = pFormat->GetTextFootnote();
398 if( pTextFootnote )
399 {
400 return pTextFootnote->GetStartNode()->GetNode().GetStartNode();
401 }
402 }
403 return nullptr;
404}
405
406uno::Reference< text::XTextCursor >
408{
409 return createTextCursor();
410}
411
412uno::Reference< text::XTextCursor > SAL_CALL
414{
415 SolarMutexGuard aGuard;
416
417 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
418
419 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
420 SwPosition aPos( *pTextFootnote->GetStartNode() );
422 new SwXTextCursor(*GetDoc(), this, CursorType::Footnote, aPos);
423 auto& rUnoCursor(pXCursor->GetCursor());
424 rUnoCursor.Move(fnMoveForward, GoInNode);
425 return static_cast<text::XWordCursor*>(pXCursor.get());
426}
427
428uno::Reference< text::XTextCursor > SAL_CALL
430 const uno::Reference< text::XTextRange > & xTextPosition)
431{
432 SolarMutexGuard aGuard;
433
434 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
435
436 SwUnoInternalPaM aPam(*GetDoc());
437 if (!::sw::XTextRangeToSwPaM(aPam, xTextPosition))
438 {
439 throw uno::RuntimeException();
440 }
441
442 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
443 SwNode const*const pFootnoteStartNode = &pTextFootnote->GetStartNode()->GetNode();
444
445 const SwNode* pStart = aPam.GetPointNode().FindFootnoteStartNode();
446 if (pStart != pFootnoteStartNode)
447 {
448 throw uno::RuntimeException();
449 }
450
451 const uno::Reference< text::XTextCursor > xRet =
452 static_cast<text::XWordCursor*>(
454 *aPam.GetPoint(), aPam.GetMark()));
455 return xRet;
456}
457
458uno::Reference< container::XEnumeration > SAL_CALL
460{
461 SolarMutexGuard aGuard;
462
463 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
464
465 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
466 SwPosition aPos( *pTextFootnote->GetStartNode() );
467 auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos));
468 pUnoCursor->Move(fnMoveForward, GoInNode);
470}
471
473{
475}
476
478{
479 return true;
480}
481
482uno::Reference< beans::XPropertySetInfo > SAL_CALL
484{
486 static uno::Reference< beans::XPropertySetInfo > xRet =
489 return xRet;
490}
491
492void SAL_CALL
494{
495 //no values to be set
496 throw lang::IllegalArgumentException();
497}
498
499uno::Any SAL_CALL
500SwXFootnote::getPropertyValue(const OUString& rPropertyName)
501{
502 SolarMutexGuard aGuard;
503
504 uno::Any aRet;
505 if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName))
506 {
507 if (rPropertyName == UNO_NAME_START_REDLINE ||
508 rPropertyName == UNO_NAME_END_REDLINE)
509 {
510 //redline can only be returned if it's a living object
511 if (!m_pImpl->m_bIsDescriptor)
512 {
513 aRet = SwXText::getPropertyValue(rPropertyName);
514 }
515 }
516 else if (rPropertyName == UNO_NAME_REFERENCE_ID)
517 {
518 SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
519 if (pFormat)
520 {
521 SwTextFootnote const*const pTextFootnote = pFormat->GetTextFootnote();
522 OSL_ENSURE(pTextFootnote, "no TextNode?");
523 aRet <<= static_cast<sal_Int16>(pTextFootnote->GetSeqRefNo());
524 }
525 }
526 else
527 {
528 beans::UnknownPropertyException aExcept;
529 aExcept.Message = rPropertyName;
530 throw aExcept;
531 }
532 }
533 return aRet;
534}
535
536void SAL_CALL
538 const OUString& /*rPropertyName*/,
539 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
540{
541 OSL_FAIL("SwXFootnote::addPropertyChangeListener(): not implemented");
542}
543
544void SAL_CALL
546 const OUString& /*rPropertyName*/,
547 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
548{
549 OSL_FAIL("SwXFootnote::removePropertyChangeListener(): not implemented");
550}
551
552void SAL_CALL
554 const OUString& /*rPropertyName*/,
555 const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
556{
557 OSL_FAIL("SwXFootnote::addVetoableChangeListener(): not implemented");
558}
559
560void SAL_CALL
562 const OUString& /*rPropertyName*/,
563 const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
564{
565 OSL_FAIL("SwXFootnote::removeVetoableChangeListener(): not implemented");
566}
567
568/* 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.
virtual const SwDoc * GetDoc() const =0
SfxHintId GetId() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
void EndListeningAll()
bool StartListening(SvtBroadcaster &rBroadcaster)
Definition: doc.hxx:194
bool IsInReading() const
Definition: doc.hxx:962
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:321
bool SetCurFootnote(const SwPaM &rPam, const OUString &rNumStr, bool bIsEndNote)
change footnotes in range
Definition: docftn.cxx:432
SwFootnoteIdxs & GetFootnoteIdxs()
Definition: doc.hxx:642
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:136
Base class of the Writer document model elements.
Definition: node.hxx:98
SwStartNode * GetStartNode()
Definition: node.hxx:640
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:897
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
void SetSeqRefNo()
Set the sequence number for the current footnote.
Definition: atrftn.cxx:532
void SetSeqNo(sal_uInt16 n)
Definition: txtftn.hxx:63
const SwNodeIndex * GetStartNode() const
Definition: txtftn.hxx:41
const SwTextNode & GetTextNode() const
Definition: txtftn.hxx:70
sal_uInt16 GetSeqRefNo() const
Definition: txtftn.hxx:64
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:111
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:3141
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
Definition: unomap1.cxx:1071
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:354
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unoftn.cxx:197
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unoftn.cxx:212
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unoftn.cxx:500
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoftn.cxx:561
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unofootnote.hxx:50
virtual ~SwXFootnote() override
Definition: unoftn.cxx:137
virtual void SAL_CALL setLabel(const OUString &rLabel) override
Definition: unoftn.cxx:256
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unoftn.cxx:166
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:537
virtual OUString SAL_CALL getImplementationName() override
Definition: unoftn.cxx:180
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoftn.cxx:553
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unoftn.cxx:493
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoftn.cxx:220
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unoftn.cxx:375
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoftn.cxx:545
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rIdentifier) override
Definition: unoftn.cxx:173
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoftn.cxx:477
virtual OUString SAL_CALL getLabel() override
Definition: unoftn.cxx:234
virtual void SAL_CALL dispose() override
Definition: unoftn.cxx:360
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoftn.cxx:472
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &xTextPosition) override
Definition: unoftn.cxx:429
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoftn.cxx:483
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:407
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoftn.cxx:203
virtual const SwStartNode * GetStartNode() const override
Definition: unoftn.cxx:392
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unoftn.cxx:384
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unoftn.cxx:286
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoftn.cxx:413
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unoftn.cxx:226
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unoftn.cxx:459
bool IsAtEndOfMeta() const
Definition: unoobj.cxx:857
const SwDoc & GetDoc() const
Definition: unoobj2.cxx:764
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rIdentifier) override
Definition: unotext.cxx:1226
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:1131
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:265
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
const css::uno::Sequence< sal_Int8 > & getSeq() const
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:1103
bool GetDefaultTextContentValue(css::uno::Any &rAny, std::u16string_view rPropertyName, sal_uInt16 nWID=0)
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:1170
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:185
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:590
constexpr OUStringLiteral UNO_NAME_REFERENCE_ID
Definition: unoprnms.hxx:503
constexpr OUStringLiteral UNO_NAME_END_REDLINE
Definition: unoprnms.hxx:591
const SvXMLTokenMapEntry aTypes[]