LibreOffice Module sw (master) 1
unoredline.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#include <sal/log.hxx>
22#include <com/sun/star/text/XTextSection.hpp>
25#include <vcl/svapp.hxx>
26
27#include <pagedesc.hxx>
28#include <poolfmt.hxx>
29#include <redline.hxx>
30#include <section.hxx>
31#include <unoprnms.hxx>
32#include <unotextrange.hxx>
33#include <unotextcursor.hxx>
34#include <unoparagraph.hxx>
35#include <unocoll.hxx>
36#include <unomap.hxx>
37#include <unocrsr.hxx>
38#include <unoport.hxx>
39#include <unoredline.hxx>
40#include <doc.hxx>
43#include <docary.hxx>
44
45using namespace ::com::sun::star;
46
48 SwXText(_pDoc, CursorType::Redline),
49 m_aNodeIndex(aIndex)
50{
51}
52
54{
56}
57
59{
60 uno::Any aRet;
61
63 {
64 uno::Reference<container::XEnumerationAccess> aAccess = this;
65 aRet <<= aAccess;
66 }
67 else
68 {
69 // delegate to SwXText and OWeakObject
70 aRet = SwXText::queryInterface(rType);
71 if(!aRet.hasValue())
72 {
73 aRet = OWeakObject::queryInterface(rType);
74 }
75 }
76
77 return aRet;
78}
79
80uno::Sequence<uno::Type> SwXRedlineText::getTypes()
81{
85 ).getTypes();
86}
87
88uno::Sequence<sal_Int8> SwXRedlineText::getImplementationId()
89{
90 return css::uno::Sequence<sal_Int8>();
91}
92
94{
95 SolarMutexGuard aGuard;
96
99 new SwXTextCursor(*GetDoc(), this, CursorType::Redline, aPos);
100 auto& rUnoCursor(pXCursor->GetCursor());
101 rUnoCursor.Move(fnMoveForward, GoInNode);
102
103 // #101929# prevent a newly created text cursor from running inside a table
104 // because table cells have their own XText.
105 // Patterned after SwXTextFrame::createTextCursor().
106
107 // skip all tables at the beginning
108 SwTableNode* pTableNode = rUnoCursor.GetPointNode().FindTableNode();
109 bool bTable = pTableNode != nullptr;
110 while( pTableNode != nullptr )
111 {
112 rUnoCursor.GetPoint()->Assign( *pTableNode->EndOfSectionNode() );
113 SwContentNode* pContentNode = GetDoc()->GetNodes().GoNext(rUnoCursor.GetPoint());
114 pTableNode = pContentNode->FindTableNode();
115 }
116 if( bTable && rUnoCursor.GetPointNode().FindSttNodeByType( SwNormalStartNode )
117 != GetStartNode() )
118 {
119 // We have gone too far and have left our own redline. This means that
120 // no content node outside of a table could be found, and therefore we
121 // except.
122 uno::RuntimeException aExcept;
123 aExcept.Message =
124 "No content node found that is inside this change section "
125 "but outside of a table";
126 throw aExcept;
127 }
128
129 return pXCursor;
130}
131
133 const uno::Reference<text::XTextRange> & aTextRange)
134{
136 xCursor->gotoRange(aTextRange->getStart(), false);
137 xCursor->gotoRange(aTextRange->getEnd(), true);
138 return xCursor;
139}
140
141uno::Reference<container::XEnumeration> SwXRedlineText::createEnumeration()
142{
143 SolarMutexGuard aGuard;
144 SwPaM aPam(m_aNodeIndex);
146 auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start()));
148}
149
151{
153}
154
156{
157 return true; // we always have a content index
158}
159
161 SwUnoCursor const*const pPortionCursor,
162 uno::Reference< text::XText > const& xParent, bool const bStart)
163 : SwXTextPortion(pPortionCursor, xParent,
165 , m_rRedline(rRedline)
166{
168}
169
171{
172}
173
174static uno::Sequence<beans::PropertyValue> lcl_GetSuccessorProperties(const SwRangeRedline& rRedline)
175{
176 const SwRedlineData* pNext = rRedline.GetRedlineData().Next();
177 if(pNext)
178 {
179 return
180 {
181 // GetAuthorString(n) walks the SwRedlineData* chain;
182 // here we always need element 1
187 };
188 }
189 return uno::Sequence<beans::PropertyValue>(4);
190}
191
192uno::Any SwXRedlinePortion::getPropertyValue( const OUString& rPropertyName )
193{
194 SolarMutexGuard aGuard;
195 if (!Validate())
196 {
197 return uno::Any();
198 }
199 uno::Any aRet;
200 if(rPropertyName == UNO_NAME_REDLINE_TEXT)
201 {
202 const SwNodeIndex* pNodeIdx = m_rRedline.GetContentIdx();
203 if(pNodeIdx )
204 {
205 if ( SwNodeOffset(1) < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
206 {
207 SwUnoCursor& rUnoCursor = GetCursor();
208 uno::Reference<text::XText> xRet = new SwXRedlineText(&rUnoCursor.GetDoc(), *pNodeIdx);
209 aRet <<= xRet;
210 }
211 else {
212 OSL_FAIL("Empty section in redline portion! (end node immediately follows start node)");
213 }
214 }
215 }
216 else
217 {
218 aRet = GetPropertyValue(rPropertyName, m_rRedline);
219 if(!aRet.hasValue() &&
220 rPropertyName != UNO_NAME_REDLINE_SUCCESSOR_DATA)
221 aRet = SwXTextPortion::getPropertyValue(rPropertyName);
222 }
223 return aRet;
224}
225
227{
228 SwUnoCursor& rUnoCursor = GetCursor();
229 //search for the redline
230 SwDoc& rDoc = rUnoCursor.GetDoc();
231 const SwRedlineTable& rRedTable = rDoc.getIDocumentRedlineAccess().GetRedlineTable();
232 bool bFound = false;
233 for(size_t nRed = 0; nRed < rRedTable.size() && !bFound; nRed++)
234 {
235 bFound = &m_rRedline == rRedTable[nRed];
236 }
237 return bFound;
238 // don't throw; the only caller can return void instead
239}
240
241uno::Sequence< sal_Int8 > SAL_CALL SwXRedlinePortion::getImplementationId( )
242{
243 return css::uno::Sequence<sal_Int8>();
244}
245
246uno::Any SwXRedlinePortion::GetPropertyValue( std::u16string_view rPropertyName, const SwRangeRedline& rRedline )
247{
248 uno::Any aRet;
249 if(rPropertyName == UNO_NAME_REDLINE_AUTHOR)
250 aRet <<= rRedline.GetAuthorString();
251 else if(rPropertyName == UNO_NAME_REDLINE_DATE_TIME)
252 {
253 aRet <<= rRedline.GetTimeStamp().GetUNODateTime();
254 }
255 else if(rPropertyName == UNO_NAME_REDLINE_COMMENT)
256 aRet <<= rRedline.GetComment();
257 else if(rPropertyName == UNO_NAME_REDLINE_DESCRIPTION)
258 aRet <<= const_cast<SwRangeRedline&>(rRedline).GetDescr();
259 else if(rPropertyName == UNO_NAME_REDLINE_TYPE)
260 {
261 aRet <<= SwRedlineTypeToOUString(rRedline.GetType());
262 }
263 else if(rPropertyName == UNO_NAME_REDLINE_SUCCESSOR_DATA)
264 {
265 if(rRedline.GetRedlineData().Next())
266 aRet <<= lcl_GetSuccessorProperties(rRedline);
267 }
268 else if (rPropertyName == UNO_NAME_REDLINE_IDENTIFIER)
269 {
270 aRet <<= OUString::number(
271 sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(&rRedline) ) );
272 }
273 else if (rPropertyName == UNO_NAME_IS_IN_HEADER_FOOTER)
274 {
275 aRet <<= rRedline.GetDoc().IsInHeaderFooter( rRedline.GetPoint()->GetNode() );
276 }
277 else if (rPropertyName == UNO_NAME_MERGE_LAST_PARA)
278 {
279 aRet <<= !rRedline.IsDelLastPara();
280 }
281 return aRet;
282}
283
284uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties(
285 const SwRangeRedline& rRedline, bool bIsStart )
286{
287 uno::Sequence< beans::PropertyValue > aRet(12);
288 const SwRedlineData* pNext = rRedline.GetRedlineData().Next();
289 beans::PropertyValue* pRet = aRet.getArray();
290
291 sal_Int32 nPropIdx = 0;
292 pRet[nPropIdx].Name = UNO_NAME_REDLINE_AUTHOR;
293 pRet[nPropIdx++].Value <<= rRedline.GetAuthorString();
294 pRet[nPropIdx].Name = UNO_NAME_REDLINE_DATE_TIME;
295 pRet[nPropIdx++].Value <<= rRedline.GetTimeStamp().GetUNODateTime();
296 pRet[nPropIdx].Name = UNO_NAME_REDLINE_COMMENT;
297 pRet[nPropIdx++].Value <<= rRedline.GetComment();
298 pRet[nPropIdx].Name = UNO_NAME_REDLINE_DESCRIPTION;
299 pRet[nPropIdx++].Value <<= const_cast<SwRangeRedline&>(rRedline).GetDescr();
300 pRet[nPropIdx].Name = UNO_NAME_REDLINE_TYPE;
301 pRet[nPropIdx++].Value <<= SwRedlineTypeToOUString(rRedline.GetType());
302 pRet[nPropIdx].Name = UNO_NAME_REDLINE_IDENTIFIER;
303 pRet[nPropIdx++].Value <<= OUString::number(
304 sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(&rRedline) ) );
305 pRet[nPropIdx].Name = UNO_NAME_IS_COLLAPSED;
306 pRet[nPropIdx++].Value <<= !rRedline.HasMark();
307
308 pRet[nPropIdx].Name = UNO_NAME_IS_START;
309 pRet[nPropIdx++].Value <<= bIsStart;
310
311 pRet[nPropIdx].Name = UNO_NAME_MERGE_LAST_PARA;
312 pRet[nPropIdx++].Value <<= !rRedline.IsDelLastPara();
313
314 const SwNodeIndex* pNodeIdx = rRedline.GetContentIdx();
315 if(pNodeIdx )
316 {
317 if ( SwNodeOffset(1) < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
318 {
319 uno::Reference<text::XText> xRet = new SwXRedlineText(&rRedline.GetDoc(), *pNodeIdx);
320 pRet[nPropIdx].Name = UNO_NAME_REDLINE_TEXT;
321 pRet[nPropIdx++].Value <<= xRet;
322 }
323 else {
324 OSL_FAIL("Empty section in redline portion! (end node immediately follows start node)");
325 }
326 }
327 if(pNext)
328 {
329 pRet[nPropIdx].Name = UNO_NAME_REDLINE_SUCCESSOR_DATA;
330 pRet[nPropIdx++].Value <<= lcl_GetSuccessorProperties(rRedline);
331 }
332 aRet.realloc(nPropIdx);
333 return aRet;
334}
335
337 SwXText(&rDoc, CursorType::Redline),
338 m_pDoc(&rDoc),
339 m_pRedline(&rRedline)
340{
342}
343
345{
346}
347
348uno::Reference< beans::XPropertySetInfo > SwXRedline::getPropertySetInfo( )
349{
350 static uno::Reference< beans::XPropertySetInfo > xRef =
352 return xRef;
353}
354
355void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any& aValue )
356{
357 SolarMutexGuard aGuard;
358 if(!m_pDoc)
359 throw uno::RuntimeException();
360 if(rPropertyName == UNO_NAME_REDLINE_AUTHOR)
361 {
362 OSL_FAIL("currently not available");
363 }
364 else if(rPropertyName == UNO_NAME_REDLINE_DATE_TIME)
365 {
366 OSL_FAIL("currently not available");
367 }
368 else if(rPropertyName == UNO_NAME_REDLINE_COMMENT)
369 {
370 OUString sTmp; aValue >>= sTmp;
371 m_pRedline->SetComment(sTmp);
372 }
373 else if(rPropertyName == UNO_NAME_REDLINE_DESCRIPTION)
374 {
375 SAL_WARN("sw.uno", "SwXRedline::setPropertyValue: can't set Description");
376 }
377 else if(rPropertyName == UNO_NAME_REDLINE_TYPE)
378 {
379 OSL_FAIL("currently not available");
380 OUString sTmp; aValue >>= sTmp;
381 if(sTmp.isEmpty())
382 throw lang::IllegalArgumentException();
383 }
384 else if(rPropertyName == UNO_NAME_REDLINE_SUCCESSOR_DATA)
385 {
386 OSL_FAIL("currently not available");
387 }
388 else
389 {
390 throw lang::IllegalArgumentException();
391 }
392}
393
394uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
395{
396 SolarMutexGuard aGuard;
397 if(!m_pDoc)
398 throw uno::RuntimeException();
399 uno::Any aRet;
400 bool bStart = rPropertyName == UNO_NAME_REDLINE_START;
401 if(bStart ||
402 rPropertyName == UNO_NAME_REDLINE_END)
403 {
404 uno::Reference<XInterface> xRet;
405 SwNode* pNode = &m_pRedline->GetPointNode();
406 if(!bStart && m_pRedline->HasMark())
407 pNode = &m_pRedline->GetMarkNode();
408 switch(pNode->GetNodeType())
409 {
411 {
412 SwSectionNode* pSectNode = pNode->GetSectionNode();
413 OSL_ENSURE(pSectNode, "No section node!");
414 xRet = SwXTextSections::GetObject( *pSectNode->GetSection().GetFormat() );
415 }
416 break;
417 case SwNodeType::Table :
418 {
419 SwTableNode* pTableNode = pNode->GetTableNode();
420 OSL_ENSURE(pTableNode, "No table node!");
421 SwTable& rTable = pTableNode->GetTable();
422 SwFrameFormat* pTableFormat = rTable.GetFrameFormat();
423 xRet = SwXTextTables::GetObject( *pTableFormat );
424 }
425 break;
426 case SwNodeType::Text :
427 {
428 SwPosition* pPoint = nullptr;
429 if(bStart || !m_pRedline->HasMark())
430 pPoint = m_pRedline->GetPoint();
431 else
432 pPoint = m_pRedline->GetMark();
433 const rtl::Reference<SwXTextRange> xRange =
434 SwXTextRange::CreateXTextRange(*m_pDoc, *pPoint, nullptr);
435 xRet = uno::Reference<text::XTextRange>(xRange);
436 }
437 break;
438 default:
439 OSL_FAIL("illegal node type");
440 }
441 aRet <<= xRet;
442 }
443 else if(rPropertyName == UNO_NAME_REDLINE_TEXT)
444 {
445 const SwNodeIndex* pNodeIdx = m_pRedline->GetContentIdx();
446 if( pNodeIdx )
447 {
448 if ( SwNodeOffset(1) < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
449 {
450 uno::Reference<text::XText> xRet = new SwXRedlineText(m_pDoc, *pNodeIdx);
451 aRet <<= xRet;
452 }
453 else {
454 OSL_FAIL("Empty section in redline portion! (end node immediately follows start node)");
455 }
456 }
457 }
458 else
459 aRet = SwXRedlinePortion::GetPropertyValue(rPropertyName, *m_pRedline);
460 return aRet;
461}
462
464 const OUString& /*aPropertyName*/,
465 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ )
466{
467}
468
470 const OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ )
471{
472}
473
475 const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
476{
477}
478
480 const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
481{
482}
483
484void SwXRedline::Notify( const SfxHint& rHint )
485{
486 if(rHint.GetId() == SfxHintId::Dying)
487 {
488 m_pDoc = nullptr;
489 m_pRedline = nullptr;
490 } else if(auto pHint = dynamic_cast<const sw::FindRedlineHint*>(&rHint)) {
491 if(!*pHint->m_ppXRedline && &pHint->m_rRedline == GetRedline())
492 *pHint->m_ppXRedline = this;
493 }
494}
495
496uno::Reference< container::XEnumeration > SwXRedline::createEnumeration()
497{
498 SolarMutexGuard aGuard;
499 if(!m_pDoc)
500 throw uno::RuntimeException();
501
502 const SwNodeIndex* pNodeIndex = m_pRedline->GetContentIdx();
503 if(!pNodeIndex)
504 return nullptr;
505 SwPaM aPam(*pNodeIndex);
507 auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start()));
509}
510
512{
514}
515
517{
518 if(!m_pDoc)
519 throw uno::RuntimeException();
520 return nullptr != m_pRedline->GetContentIdx();
521}
522
524{
525 if(!m_pDoc)
526 throw uno::RuntimeException();
527
528 const SwNodeIndex* pNodeIndex = m_pRedline->GetContentIdx();
529 if(!pNodeIndex)
530 {
531 throw uno::RuntimeException();
532 }
533
534 SwPosition aPos(*pNodeIndex);
536 new SwXTextCursor(*m_pDoc, this, CursorType::Redline, aPos);
537 auto& rUnoCursor(pXCursor->GetCursor());
538 rUnoCursor.Move(fnMoveForward, GoInNode);
539
540 // is here a table?
541 SwTableNode* pTableNode = rUnoCursor.GetPointNode().FindTableNode();
542 while( pTableNode )
543 {
544 rUnoCursor.GetPoint()->Assign( *pTableNode->EndOfSectionNode() );
545 SwContentNode* pCont = GetDoc()->GetNodes().GoNext(rUnoCursor.GetPoint());
546 pTableNode = pCont->FindTableNode();
547 }
548
549 return pXCursor;
550}
551
553 const uno::Reference< text::XTextRange > & /*aTextPosition*/)
554{
555 throw uno::RuntimeException();
556}
557
559{
560 uno::Any aRet = SwXText::queryInterface(rType);
561 if(!aRet.hasValue())
562 {
563 aRet = SwXRedlineBaseClass::queryInterface(rType);
564 }
565 return aRet;
566}
567
568uno::Sequence<uno::Type> SwXRedline::getTypes()
569{
572 SwXRedlineBaseClass::getTypes()
573 );
574}
575
576uno::Sequence<sal_Int8> SwXRedline::getImplementationId()
577{
578 return css::uno::Sequence<sal_Int8>();
579}
580
581/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString SwRedlineTypeToOUString(RedlineType eType)
css::util::DateTime GetUNODateTime() const
virtual const SwRedlineTable & GetRedlineTable() const =0
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
SfxHintId GetId() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
bool StartListening(SvtBroadcaster &rBroadcaster)
Definition: doc.hxx:197
SwNodes & GetNodes()
Definition: doc.hxx:422
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:349
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:440
bool IsInHeaderFooter(const SwNode &) const
Definition: doclay.cxx:1582
Style of a layout element.
Definition: frmfmt.hxx:72
Marks a node in the document model.
Definition: ndindex.hxx:31
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
SwSectionNode * GetSectionNode()
Definition: node.hxx:658
SwNodeOffset GetIndex() const
Definition: node.hxx:312
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:380
SwNodeOffset EndOfSectionIndex() const
Definition: node.hxx:691
SwTableNode * GetTableNode()
Definition: node.hxx:650
SwNodeType GetNodeType() const
Definition: node.hxx:166
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:695
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1299
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
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
Definition: pam.cxx:657
SwDoc & GetDoc() const
Definition: pam.hxx:291
SwNode & GetMarkNode() const
Definition: pam.hxx:276
const SwPosition * GetPoint() const
Definition: pam.hxx:253
const SwPosition * Start() const
Definition: pam.hxx:258
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Definition: pam.hxx:251
const OUString & GetComment(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1985
const SwNodeIndex * GetContentIdx() const
Definition: redline.hxx:195
OUString const & GetAuthorString(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1965
const DateTime & GetTimeStamp(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1970
void SetComment(const OUString &rS)
Definition: redline.hxx:225
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1975
bool IsDelLastPara() const
Definition: redline.hxx:201
const SwRedlineData & GetRedlineData(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1998
const SwRedlineData * Next() const
Definition: redline.hxx:137
const OUString & GetComment() const
Definition: redline.hxx:129
const DateTime & GetTimeStamp() const
Definition: redline.hxx:130
RedlineType GetType() const
Definition: redline.hxx:126
size_type size() const
Definition: docary.hxx:268
A section node represents the start of a section on the UI, i.e.
Definition: node.hxx:575
const SwSection & GetSection() const
Definition: node.hxx:590
SwSectionFormat * GetFormat()
Definition: section.hxx:341
Starts a section of nodes in the document model.
Definition: node.hxx:348
const SwTable & GetTable() const
Definition: node.hxx:542
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:113
SwTableFormat * GetFrameFormat()
Definition: swtable.hxx:209
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
Definition: unomap1.cxx:1111
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unoredline.cxx:192
SwXRedlinePortion(SwRangeRedline const &rRedline, SwUnoCursor const *pPortionCursor, css::uno::Reference< css::text::XText > const &xParent, bool const bIsStart)
Definition: unoredline.cxx:160
static css::uno::Any GetPropertyValue(std::u16string_view PropertyName, SwRangeRedline const &rRedline)
Definition: unoredline.cxx:246
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:241
static css::uno::Sequence< css::beans::PropertyValue > CreateRedlineProperties(SwRangeRedline const &rRedline, bool const bIsStart)
Definition: unoredline.cxx:284
virtual ~SwXRedlinePortion() override
Definition: unoredline.cxx:170
SwRangeRedline const & m_rRedline
Definition: unoport.hxx:280
SwXRedlineText provides an XText which may be used to write directly into a redline node.
Definition: unoredline.hxx:38
virtual rtl::Reference< SwXTextCursor > createXTextCursorByRange(const ::css::uno::Reference< ::css::text::XTextRange > &aTextPosition) override
Definition: unoredline.cxx:132
SwXRedlineText(SwDoc *pDoc, const SwNodeIndex &aNodeIndex)
Definition: unoredline.cxx:47
virtual const SwStartNode * GetStartNode() const override
Definition: unoredline.cxx:53
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:88
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unoredline.cxx:80
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: unoredline.cxx:58
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unoredline.cxx:141
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoredline.cxx:155
SwNodeIndex m_aNodeIndex
Definition: unoredline.hxx:39
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoredline.cxx:150
virtual rtl::Reference< SwXTextCursor > createXTextCursor() override
Definition: unoredline.cxx:93
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoredline.cxx:516
virtual ~SwXRedline() override
Definition: unoredline.cxx:344
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unoredline.cxx:469
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: unoredline.cxx:558
SwXRedline(SwRangeRedline &rRedline, SwDoc &rDoc)
Definition: unoredline.cxx:336
virtual rtl::Reference< SwXTextCursor > createXTextCursorByRange(const ::css::uno::Reference< ::css::text::XTextRange > &aTextPosition) override
Definition: unoredline.cxx:552
SwRangeRedline * m_pRedline
Definition: unoredline.hxx:73
const SwRangeRedline * GetRedline() const
Definition: unoredline.hxx:107
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unoredline.cxx:568
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:576
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unoredline.cxx:355
virtual rtl::Reference< SwXTextCursor > createXTextCursor() override
Definition: unoredline.cxx:523
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unoredline.cxx:479
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unoredline.cxx:496
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoredline.cxx:463
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoredline.cxx:348
virtual void Notify(const SfxHint &) override
Definition: unoredline.cxx:484
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoredline.cxx:511
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unoredline.cxx:394
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unoredline.cxx:474
SwDoc * m_pDoc
Definition: unoredline.hxx:72
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unoport.cxx:437
SwUnoCursor & GetCursor() const
Definition: unoport.hxx:242
void SetCollapsed(bool bSet)
Definition: unoport.hxx:238
static rtl::Reference< SwXTextRange > CreateXTextRange(SwDoc &rDoc, const SwPosition &rPos, const SwPosition *const pMark)
Definition: unoobj2.cxx:1221
static css::uno::Reference< css::text::XTextSection > GetObject(SwSectionFormat &rFormat)
Definition: unocoll.cxx:1523
static css::uno::Reference< css::text::XTextTable > GetObject(SwFrameFormat &rFormat)
Definition: unocoll.cxx:988
const SwDoc * GetDoc() const
Definition: unotext.cxx:134
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext.cxx:214
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:281
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
css::uno::Type const & get()
std::deque< AttacherIndex_Impl > aIndex
#define SAL_WARN(area, stream)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
@ SwNormalStartNode
Definition: ndtyp.hxx:52
@ Table
SwTableNode is derived from SwStartNode.
@ Section
SwSectionNode is derived from SwStartNode.
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
Definition: nodeoffset.hxx:16
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:1194
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Definition: paminit.cxx:61
@ RES_POOLPAGE_STANDARD
Standard page.
Definition: poolfmt.hxx:170
Marks a position in the document model.
Definition: pam.hxx:38
SwNode & GetNode() const
Definition: pam.hxx:81
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
bool hasValue()
unsigned char sal_Bool
CursorType
SwUnoPropertyMapProvider aSwMapProvider
Definition: unomap1.cxx:88
#define PROPERTY_MAP_REDLINE
Definition: unomap.hxx:64
@ PORTION_REDLINE_END
Definition: unoport.hxx:66
@ PORTION_REDLINE_START
Definition: unoport.hxx:65
constexpr OUStringLiteral UNO_NAME_REDLINE_SUCCESSOR_DATA
Definition: unoprnms.hxx:597
constexpr OUStringLiteral UNO_NAME_REDLINE_IDENTIFIER
Definition: unoprnms.hxx:598
constexpr OUStringLiteral UNO_NAME_MERGE_LAST_PARA
Definition: unoprnms.hxx:725
constexpr OUStringLiteral UNO_NAME_REDLINE_TYPE
Definition: unoprnms.hxx:596
constexpr OUStringLiteral UNO_NAME_IS_START
Definition: unoprnms.hxx:512
constexpr OUStringLiteral UNO_NAME_REDLINE_TEXT
Definition: unoprnms.hxx:604
constexpr OUStringLiteral UNO_NAME_IS_COLLAPSED
Definition: unoprnms.hxx:511
constexpr OUStringLiteral UNO_NAME_REDLINE_START
Definition: unoprnms.hxx:602
constexpr OUStringLiteral UNO_NAME_REDLINE_COMMENT
Definition: unoprnms.hxx:594
constexpr OUStringLiteral UNO_NAME_REDLINE_AUTHOR
Definition: unoprnms.hxx:592
constexpr OUStringLiteral UNO_NAME_REDLINE_DESCRIPTION
Definition: unoprnms.hxx:595
constexpr OUStringLiteral UNO_NAME_REDLINE_DATE_TIME
Definition: unoprnms.hxx:593
constexpr OUStringLiteral UNO_NAME_IS_IN_HEADER_FOOTER
Definition: unoprnms.hxx:599
constexpr OUStringLiteral UNO_NAME_REDLINE_END
Definition: unoprnms.hxx:603
static uno::Sequence< beans::PropertyValue > lcl_GetSuccessorProperties(const SwRangeRedline &rRedline)
Definition: unoredline.cxx:174