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
391{
392 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
393
394 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
395 SwPosition aPos( *pTextFootnote->GetStartNode() );
397 new SwXTextCursor(*GetDoc(), this, CursorType::Footnote, aPos);
398 auto& rUnoCursor(pXCursor->GetCursor());
399 rUnoCursor.Move(fnMoveForward, GoInNode);
400 return pXCursor;
401}
402
405 const uno::Reference< text::XTextRange > & xTextPosition)
406{
407 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
408
409 SwUnoInternalPaM aPam(*GetDoc());
410 if (!::sw::XTextRangeToSwPaM(aPam, xTextPosition))
411 {
412 throw uno::RuntimeException();
413 }
414
415 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
416 SwNode const*const pFootnoteStartNode = &pTextFootnote->GetStartNode()->GetNode();
417
418 const SwNode* pStart = aPam.GetPointNode().FindFootnoteStartNode();
419 if (pStart != pFootnoteStartNode)
420 {
421 throw uno::RuntimeException();
422 }
423
426 *aPam.GetPoint(), aPam.GetMark());
427 return xRet;
428}
429
430uno::Reference< container::XEnumeration > SAL_CALL
432{
433 SolarMutexGuard aGuard;
434
435 SwFormatFootnote const& rFormat( m_pImpl->GetFootnoteFormatOrThrow() );
436
437 SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote();
438 SwPosition aPos( *pTextFootnote->GetStartNode() );
439 auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos));
440 pUnoCursor->Move(fnMoveForward, GoInNode);
442}
443
445{
447}
448
450{
451 return true;
452}
453
454uno::Reference< beans::XPropertySetInfo > SAL_CALL
456{
458 static uno::Reference< beans::XPropertySetInfo > xRet =
461 return xRet;
462}
463
464void SAL_CALL
466{
467 //no values to be set
468 throw lang::IllegalArgumentException();
469}
470
471uno::Any SAL_CALL
472SwXFootnote::getPropertyValue(const OUString& rPropertyName)
473{
474 SolarMutexGuard aGuard;
475
476 uno::Any aRet;
477 if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName))
478 {
479 if (rPropertyName == UNO_NAME_START_REDLINE ||
480 rPropertyName == UNO_NAME_END_REDLINE)
481 {
482 //redline can only be returned if it's a living object
483 if (!m_pImpl->m_bIsDescriptor)
484 {
485 aRet = SwXText::getPropertyValue(rPropertyName);
486 }
487 }
488 else if (rPropertyName == UNO_NAME_REFERENCE_ID)
489 {
490 SwFormatFootnote const*const pFormat = m_pImpl->GetFootnoteFormat();
491 if (pFormat)
492 {
493 SwTextFootnote const*const pTextFootnote = pFormat->GetTextFootnote();
494 OSL_ENSURE(pTextFootnote, "no TextNode?");
495 aRet <<= static_cast<sal_Int16>(pTextFootnote->GetSeqRefNo());
496 }
497 }
498 else
499 {
500 beans::UnknownPropertyException aExcept;
501 aExcept.Message = rPropertyName;
502 throw aExcept;
503 }
504 }
505 return aRet;
506}
507
508void SAL_CALL
510 const OUString& /*rPropertyName*/,
511 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
512{
513 OSL_FAIL("SwXFootnote::addPropertyChangeListener(): not implemented");
514}
515
516void SAL_CALL
518 const OUString& /*rPropertyName*/,
519 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
520{
521 OSL_FAIL("SwXFootnote::removePropertyChangeListener(): not implemented");
522}
523
524void SAL_CALL
526 const OUString& /*rPropertyName*/,
527 const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
528{
529 OSL_FAIL("SwXFootnote::addVetoableChangeListener(): not implemented");
530}
531
532void SAL_CALL
534 const OUString& /*rPropertyName*/,
535 const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
536{
537 OSL_FAIL("SwXFootnote::removeVetoableChangeListener(): not implemented");
538}
539
540/* 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:197
bool IsInReading() const
Definition: doc.hxx:969
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:329
bool SetCurFootnote(const SwPaM &rPam, const OUString &rNumStr, bool bIsEndNote)
change footnotes in range
Definition: docftn.cxx:432
SwFootnoteIdxs & GetFootnoteIdxs()
Definition: doc.hxx:649
SfxPoolItem subclass for footnotes and endnotes, stored in the anchor text node.
Definition: fmtftn.hxx:47
const OUString & GetNumStr() const
Definition: fmtftn.hxx:72
void SetXFootnote(rtl::Reference< SwXFootnote > const &xNote)
Definition: atrftn.cxx:136
bool IsEndNote() const
Definition: fmtftn.hxx:75
unotools::WeakReference< SwXFootnote > const & GetXFootnote() const
Definition: fmtftn.hxx:98
void SetNumStr(const OUString &rStr)
Definition: fmtftn.hxx:77
const SwTextFootnote * GetTextFootnote() const
Definition: fmtftn.hxx:87
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:901
const SwStartNode * FindFootnoteStartNode() const
Definition: node.hxx:222
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
const SwPosition * GetMark() const
Definition: pam.hxx:255
SwNode & GetPointNode() const
Definition: pam.hxx:275
void DeleteMark()
Definition: pam.hxx:232
const SwPosition * GetPoint() const
Definition: pam.hxx:253
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:544
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:3155
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
Definition: unomap1.cxx:1111
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:472
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoftn.cxx:533
::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:509
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:525
virtual rtl::Reference< SwXTextCursor > createXTextCursor() override
Definition: unoftn.cxx:390
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unoftn.cxx:465
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:517
virtual rtl::Reference< SwXTextCursor > createXTextCursorByRange(const ::css::uno::Reference< ::css::text::XTextRange > &aTextPosition) override
Definition: unoftn.cxx:404
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoftn.cxx:449
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:444
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoftn.cxx:455
static rtl::Reference< SwXFootnote > CreateXFootnote(SwDoc &rDoc, SwFormatFootnote *pFootnoteFormat, bool isEndnote=false)
Definition: unoftn.cxx:142
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::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:431
bool IsAtEndOfMeta() const
Definition: unoobj.cxx:876
const SwDoc & GetDoc() const
Definition: unoobj2.cxx:762
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:214
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unotext.cxx:1105
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:281
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:1108
bool GetDefaultTextContentValue(css::uno::Any &rAny, std::u16string_view rPropertyName, sal_uInt16 nWID=0)
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:1194
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Definition: paminit.cxx:61
Marks a position in the document model.
Definition: pam.hxx:38
sal_Int32 GetContentIndex() const
Definition: pam.hxx:85
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:445
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:88
#define PROPERTY_MAP_FOOTNOTE
Definition: unomap.hxx:61
constexpr OUStringLiteral UNO_NAME_START_REDLINE
Definition: unoprnms.hxx:600
constexpr OUStringLiteral UNO_NAME_REFERENCE_ID
Definition: unoprnms.hxx:514
constexpr OUStringLiteral UNO_NAME_END_REDLINE
Definition: unoprnms.hxx:601
const SvXMLTokenMapEntry aTypes[]