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
93uno::Reference<text::XTextCursor> SwXRedlineText::CreateCursor()
94{
95 return createTextCursor();
96}
97
98uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor()
99{
100 SolarMutexGuard aGuard;
101
104 new SwXTextCursor(*GetDoc(), this, CursorType::Redline, aPos);
105 auto& rUnoCursor(pXCursor->GetCursor());
106 rUnoCursor.Move(fnMoveForward, GoInNode);
107
108 // #101929# prevent a newly created text cursor from running inside a table
109 // because table cells have their own XText.
110 // Patterned after SwXTextFrame::createTextCursor().
111
112 // skip all tables at the beginning
113 SwTableNode* pTableNode = rUnoCursor.GetPointNode().FindTableNode();
114 bool bTable = pTableNode != nullptr;
115 while( pTableNode != nullptr )
116 {
117 rUnoCursor.GetPoint()->Assign( *pTableNode->EndOfSectionNode() );
118 SwContentNode* pContentNode = GetDoc()->GetNodes().GoNext(rUnoCursor.GetPoint());
119 pTableNode = pContentNode->FindTableNode();
120 }
121 if( bTable && rUnoCursor.GetPointNode().FindSttNodeByType( SwNormalStartNode )
122 != GetStartNode() )
123 {
124 // We have gone too far and have left our own redline. This means that
125 // no content node outside of a table could be found, and therefore we
126 // except.
127 uno::RuntimeException aExcept;
128 aExcept.Message =
129 "No content node found that is inside this change section "
130 "but outside of a table";
131 throw aExcept;
132 }
133
134 return static_cast<text::XWordCursor*>(pXCursor.get());
135}
136
137uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursorByRange(
138 const uno::Reference<text::XTextRange> & aTextRange)
139{
140 uno::Reference<text::XTextCursor> xCursor = createTextCursor();
141 xCursor->gotoRange(aTextRange->getStart(), false);
142 xCursor->gotoRange(aTextRange->getEnd(), true);
143 return xCursor;
144}
145
146uno::Reference<container::XEnumeration> SwXRedlineText::createEnumeration()
147{
148 SolarMutexGuard aGuard;
149 SwPaM aPam(m_aNodeIndex);
151 auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start()));
153}
154
156{
158}
159
161{
162 return true; // we always have a content index
163}
164
166 SwUnoCursor const*const pPortionCursor,
167 uno::Reference< text::XText > const& xParent, bool const bStart)
168 : SwXTextPortion(pPortionCursor, xParent,
170 , m_rRedline(rRedline)
171{
173}
174
176{
177}
178
179static uno::Sequence<beans::PropertyValue> lcl_GetSuccessorProperties(const SwRangeRedline& rRedline)
180{
181 const SwRedlineData* pNext = rRedline.GetRedlineData().Next();
182 if(pNext)
183 {
184 return
185 {
186 // GetAuthorString(n) walks the SwRedlineData* chain;
187 // here we always need element 1
192 };
193 }
194 return uno::Sequence<beans::PropertyValue>(4);
195}
196
197uno::Any SwXRedlinePortion::getPropertyValue( const OUString& rPropertyName )
198{
199 SolarMutexGuard aGuard;
200 if (!Validate())
201 {
202 return uno::Any();
203 }
204 uno::Any aRet;
205 if(rPropertyName == UNO_NAME_REDLINE_TEXT)
206 {
207 const SwNodeIndex* pNodeIdx = m_rRedline.GetContentIdx();
208 if(pNodeIdx )
209 {
210 if ( SwNodeOffset(1) < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
211 {
212 SwUnoCursor& rUnoCursor = GetCursor();
213 uno::Reference<text::XText> xRet = new SwXRedlineText(&rUnoCursor.GetDoc(), *pNodeIdx);
214 aRet <<= xRet;
215 }
216 else {
217 OSL_FAIL("Empty section in redline portion! (end node immediately follows start node)");
218 }
219 }
220 }
221 else
222 {
223 aRet = GetPropertyValue(rPropertyName, m_rRedline);
224 if(!aRet.hasValue() &&
225 rPropertyName != UNO_NAME_REDLINE_SUCCESSOR_DATA)
226 aRet = SwXTextPortion::getPropertyValue(rPropertyName);
227 }
228 return aRet;
229}
230
232{
233 SwUnoCursor& rUnoCursor = GetCursor();
234 //search for the redline
235 SwDoc& rDoc = rUnoCursor.GetDoc();
236 const SwRedlineTable& rRedTable = rDoc.getIDocumentRedlineAccess().GetRedlineTable();
237 bool bFound = false;
238 for(size_t nRed = 0; nRed < rRedTable.size() && !bFound; nRed++)
239 {
240 bFound = &m_rRedline == rRedTable[nRed];
241 }
242 return bFound;
243 // don't throw; the only caller can return void instead
244}
245
246uno::Sequence< sal_Int8 > SAL_CALL SwXRedlinePortion::getImplementationId( )
247{
248 return css::uno::Sequence<sal_Int8>();
249}
250
251uno::Any SwXRedlinePortion::GetPropertyValue( std::u16string_view rPropertyName, const SwRangeRedline& rRedline )
252{
253 uno::Any aRet;
254 if(rPropertyName == UNO_NAME_REDLINE_AUTHOR)
255 aRet <<= rRedline.GetAuthorString();
256 else if(rPropertyName == UNO_NAME_REDLINE_DATE_TIME)
257 {
258 aRet <<= rRedline.GetTimeStamp().GetUNODateTime();
259 }
260 else if(rPropertyName == UNO_NAME_REDLINE_COMMENT)
261 aRet <<= rRedline.GetComment();
262 else if(rPropertyName == UNO_NAME_REDLINE_DESCRIPTION)
263 aRet <<= const_cast<SwRangeRedline&>(rRedline).GetDescr();
264 else if(rPropertyName == UNO_NAME_REDLINE_TYPE)
265 {
266 aRet <<= SwRedlineTypeToOUString(rRedline.GetType());
267 }
268 else if(rPropertyName == UNO_NAME_REDLINE_SUCCESSOR_DATA)
269 {
270 if(rRedline.GetRedlineData().Next())
271 aRet <<= lcl_GetSuccessorProperties(rRedline);
272 }
273 else if (rPropertyName == UNO_NAME_REDLINE_IDENTIFIER)
274 {
275 aRet <<= OUString::number(
276 sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(&rRedline) ) );
277 }
278 else if (rPropertyName == UNO_NAME_IS_IN_HEADER_FOOTER)
279 {
280 aRet <<= rRedline.GetDoc().IsInHeaderFooter( rRedline.GetPoint()->GetNode() );
281 }
282 else if (rPropertyName == UNO_NAME_MERGE_LAST_PARA)
283 {
284 aRet <<= !rRedline.IsDelLastPara();
285 }
286 return aRet;
287}
288
289uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties(
290 const SwRangeRedline& rRedline, bool bIsStart )
291{
292 uno::Sequence< beans::PropertyValue > aRet(12);
293 const SwRedlineData* pNext = rRedline.GetRedlineData().Next();
294 beans::PropertyValue* pRet = aRet.getArray();
295
296 sal_Int32 nPropIdx = 0;
297 pRet[nPropIdx].Name = UNO_NAME_REDLINE_AUTHOR;
298 pRet[nPropIdx++].Value <<= rRedline.GetAuthorString();
299 pRet[nPropIdx].Name = UNO_NAME_REDLINE_DATE_TIME;
300 pRet[nPropIdx++].Value <<= rRedline.GetTimeStamp().GetUNODateTime();
301 pRet[nPropIdx].Name = UNO_NAME_REDLINE_COMMENT;
302 pRet[nPropIdx++].Value <<= rRedline.GetComment();
303 pRet[nPropIdx].Name = UNO_NAME_REDLINE_DESCRIPTION;
304 pRet[nPropIdx++].Value <<= const_cast<SwRangeRedline&>(rRedline).GetDescr();
305 pRet[nPropIdx].Name = UNO_NAME_REDLINE_TYPE;
306 pRet[nPropIdx++].Value <<= SwRedlineTypeToOUString(rRedline.GetType());
307 pRet[nPropIdx].Name = UNO_NAME_REDLINE_IDENTIFIER;
308 pRet[nPropIdx++].Value <<= OUString::number(
309 sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(&rRedline) ) );
310 pRet[nPropIdx].Name = UNO_NAME_IS_COLLAPSED;
311 pRet[nPropIdx++].Value <<= !rRedline.HasMark();
312
313 pRet[nPropIdx].Name = UNO_NAME_IS_START;
314 pRet[nPropIdx++].Value <<= bIsStart;
315
316 pRet[nPropIdx].Name = UNO_NAME_MERGE_LAST_PARA;
317 pRet[nPropIdx++].Value <<= !rRedline.IsDelLastPara();
318
319 const SwNodeIndex* pNodeIdx = rRedline.GetContentIdx();
320 if(pNodeIdx )
321 {
322 if ( SwNodeOffset(1) < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
323 {
324 uno::Reference<text::XText> xRet = new SwXRedlineText(&rRedline.GetDoc(), *pNodeIdx);
325 pRet[nPropIdx].Name = UNO_NAME_REDLINE_TEXT;
326 pRet[nPropIdx++].Value <<= xRet;
327 }
328 else {
329 OSL_FAIL("Empty section in redline portion! (end node immediately follows start node)");
330 }
331 }
332 if(pNext)
333 {
334 pRet[nPropIdx].Name = UNO_NAME_REDLINE_SUCCESSOR_DATA;
335 pRet[nPropIdx++].Value <<= lcl_GetSuccessorProperties(rRedline);
336 }
337 aRet.realloc(nPropIdx);
338 return aRet;
339}
340
342 SwXText(&rDoc, CursorType::Redline),
343 m_pDoc(&rDoc),
344 m_pRedline(&rRedline)
345{
347}
348
350{
351}
352
353uno::Reference< beans::XPropertySetInfo > SwXRedline::getPropertySetInfo( )
354{
355 static uno::Reference< beans::XPropertySetInfo > xRef =
357 return xRef;
358}
359
360void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any& aValue )
361{
362 SolarMutexGuard aGuard;
363 if(!m_pDoc)
364 throw uno::RuntimeException();
365 if(rPropertyName == UNO_NAME_REDLINE_AUTHOR)
366 {
367 OSL_FAIL("currently not available");
368 }
369 else if(rPropertyName == UNO_NAME_REDLINE_DATE_TIME)
370 {
371 OSL_FAIL("currently not available");
372 }
373 else if(rPropertyName == UNO_NAME_REDLINE_COMMENT)
374 {
375 OUString sTmp; aValue >>= sTmp;
376 m_pRedline->SetComment(sTmp);
377 }
378 else if(rPropertyName == UNO_NAME_REDLINE_DESCRIPTION)
379 {
380 SAL_WARN("sw.uno", "SwXRedline::setPropertyValue: can't set Description");
381 }
382 else if(rPropertyName == UNO_NAME_REDLINE_TYPE)
383 {
384 OSL_FAIL("currently not available");
385 OUString sTmp; aValue >>= sTmp;
386 if(sTmp.isEmpty())
387 throw lang::IllegalArgumentException();
388 }
389 else if(rPropertyName == UNO_NAME_REDLINE_SUCCESSOR_DATA)
390 {
391 OSL_FAIL("currently not available");
392 }
393 else
394 {
395 throw lang::IllegalArgumentException();
396 }
397}
398
399uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
400{
401 SolarMutexGuard aGuard;
402 if(!m_pDoc)
403 throw uno::RuntimeException();
404 uno::Any aRet;
405 bool bStart = rPropertyName == UNO_NAME_REDLINE_START;
406 if(bStart ||
407 rPropertyName == UNO_NAME_REDLINE_END)
408 {
409 uno::Reference<XInterface> xRet;
410 SwNode* pNode = &m_pRedline->GetPointNode();
411 if(!bStart && m_pRedline->HasMark())
412 pNode = &m_pRedline->GetMarkNode();
413 switch(pNode->GetNodeType())
414 {
416 {
417 SwSectionNode* pSectNode = pNode->GetSectionNode();
418 OSL_ENSURE(pSectNode, "No section node!");
419 xRet = SwXTextSections::GetObject( *pSectNode->GetSection().GetFormat() );
420 }
421 break;
422 case SwNodeType::Table :
423 {
424 SwTableNode* pTableNode = pNode->GetTableNode();
425 OSL_ENSURE(pTableNode, "No table node!");
426 SwTable& rTable = pTableNode->GetTable();
427 SwFrameFormat* pTableFormat = rTable.GetFrameFormat();
428 xRet = SwXTextTables::GetObject( *pTableFormat );
429 }
430 break;
431 case SwNodeType::Text :
432 {
433 SwPosition* pPoint = nullptr;
434 if(bStart || !m_pRedline->HasMark())
435 pPoint = m_pRedline->GetPoint();
436 else
437 pPoint = m_pRedline->GetMark();
438 const rtl::Reference<SwXTextRange> xRange =
439 SwXTextRange::CreateXTextRange(*m_pDoc, *pPoint, nullptr);
440 xRet = uno::Reference<text::XTextRange>(xRange);
441 }
442 break;
443 default:
444 OSL_FAIL("illegal node type");
445 }
446 aRet <<= xRet;
447 }
448 else if(rPropertyName == UNO_NAME_REDLINE_TEXT)
449 {
450 const SwNodeIndex* pNodeIdx = m_pRedline->GetContentIdx();
451 if( pNodeIdx )
452 {
453 if ( SwNodeOffset(1) < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
454 {
455 uno::Reference<text::XText> xRet = new SwXRedlineText(m_pDoc, *pNodeIdx);
456 aRet <<= xRet;
457 }
458 else {
459 OSL_FAIL("Empty section in redline portion! (end node immediately follows start node)");
460 }
461 }
462 }
463 else
464 aRet = SwXRedlinePortion::GetPropertyValue(rPropertyName, *m_pRedline);
465 return aRet;
466}
467
469 const OUString& /*aPropertyName*/,
470 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ )
471{
472}
473
475 const OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ )
476{
477}
478
480 const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
481{
482}
483
485 const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
486{
487}
488
489void SwXRedline::Notify( const SfxHint& rHint )
490{
491 if(rHint.GetId() == SfxHintId::Dying)
492 {
493 m_pDoc = nullptr;
494 m_pRedline = nullptr;
495 } else if(auto pHint = dynamic_cast<const sw::FindRedlineHint*>(&rHint)) {
496 if(!*pHint->m_ppXRedline && &pHint->m_rRedline == GetRedline())
497 *pHint->m_ppXRedline = this;
498 }
499}
500
501uno::Reference< container::XEnumeration > SwXRedline::createEnumeration()
502{
503 SolarMutexGuard aGuard;
504 if(!m_pDoc)
505 throw uno::RuntimeException();
506
507 const SwNodeIndex* pNodeIndex = m_pRedline->GetContentIdx();
508 if(!pNodeIndex)
509 return nullptr;
510 SwPaM aPam(*pNodeIndex);
512 auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start()));
514}
515
517{
519}
520
522{
523 if(!m_pDoc)
524 throw uno::RuntimeException();
525 return nullptr != m_pRedline->GetContentIdx();
526}
527
528uno::Reference< text::XTextCursor > SwXRedline::createTextCursor()
529{
530 SolarMutexGuard aGuard;
531 if(!m_pDoc)
532 throw uno::RuntimeException();
533
534 const SwNodeIndex* pNodeIndex = m_pRedline->GetContentIdx();
535 if(!pNodeIndex)
536 {
537 throw uno::RuntimeException();
538 }
539
540 SwPosition aPos(*pNodeIndex);
542 new SwXTextCursor(*m_pDoc, this, CursorType::Redline, aPos);
543 auto& rUnoCursor(pXCursor->GetCursor());
544 rUnoCursor.Move(fnMoveForward, GoInNode);
545
546 // is here a table?
547 SwTableNode* pTableNode = rUnoCursor.GetPointNode().FindTableNode();
548 while( pTableNode )
549 {
550 rUnoCursor.GetPoint()->Assign( *pTableNode->EndOfSectionNode() );
551 SwContentNode* pCont = GetDoc()->GetNodes().GoNext(rUnoCursor.GetPoint());
552 pTableNode = pCont->FindTableNode();
553 }
554
555 return static_cast<text::XWordCursor*>(pXCursor.get());
556}
557
558uno::Reference< text::XTextCursor > SwXRedline::createTextCursorByRange(
559 const uno::Reference< text::XTextRange > & /*aTextPosition*/)
560{
561 throw uno::RuntimeException();
562}
563
565{
566 uno::Any aRet = SwXText::queryInterface(rType);
567 if(!aRet.hasValue())
568 {
569 aRet = SwXRedlineBaseClass::queryInterface(rType);
570 }
571 return aRet;
572}
573
574uno::Sequence<uno::Type> SwXRedline::getTypes()
575{
578 SwXRedlineBaseClass::getTypes()
579 );
580}
581
582uno::Sequence<sal_Int8> SwXRedline::getImplementationId()
583{
584 return css::uno::Sequence<sal_Int8>();
585}
586
587/* 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:195
SwNodes & GetNodes()
Definition: doc.hxx:418
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:343
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:434
bool IsInHeaderFooter(const SwNode &) const
Definition: doclay.cxx:1566
Style of a layout element.
Definition: frmfmt.hxx:62
Marks a node in the document model.
Definition: ndindex.hxx:31
SwNode & GetNode() const
Definition: ndindex.hxx:136
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:728
SwTableNode * GetTableNode()
Definition: node.hxx:650
SwNodeType GetNodeType() const
Definition: node.hxx:166
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:733
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1299
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
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
Definition: pam.cxx:668
SwDoc & GetDoc() const
Definition: pam.hxx:299
SwNode & GetMarkNode() const
Definition: pam.hxx:284
const SwPosition * GetPoint() const
Definition: pam.hxx:261
const SwPosition * Start() const
Definition: pam.hxx:266
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Definition: pam.hxx:259
const OUString & GetComment(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1950
const SwNodeIndex * GetContentIdx() const
Definition: redline.hxx:189
OUString const & GetAuthorString(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1930
const DateTime & GetTimeStamp(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1935
void SetComment(const OUString &rS)
Definition: redline.hxx:219
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1940
bool IsDelLastPara() const
Definition: redline.hxx:195
const SwRedlineData & GetRedlineData(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1963
const SwRedlineData * Next() const
Definition: redline.hxx:131
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:267
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:339
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:207
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
Definition: unomap1.cxx:1081
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unoredline.cxx:197
SwXRedlinePortion(SwRangeRedline const &rRedline, SwUnoCursor const *pPortionCursor, css::uno::Reference< css::text::XText > const &xParent, bool const bIsStart)
Definition: unoredline.cxx:165
static css::uno::Any GetPropertyValue(std::u16string_view PropertyName, SwRangeRedline const &rRedline)
Definition: unoredline.cxx:251
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:246
static css::uno::Sequence< css::beans::PropertyValue > CreateRedlineProperties(SwRangeRedline const &rRedline, bool const bIsStart)
Definition: unoredline.cxx:289
virtual ~SwXRedlinePortion() override
Definition: unoredline.cxx:175
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 css::uno::Reference< css::text::XTextCursor > CreateCursor() override
Definition: unoredline.cxx:93
SwXRedlineText(SwDoc *pDoc, const SwNodeIndex &aNodeIndex)
Definition: unoredline.cxx:47
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoredline.cxx:98
virtual const SwStartNode * GetStartNode() const override
Definition: unoredline.cxx:53
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &aTextPosition) override
Definition: unoredline.cxx:137
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:146
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoredline.cxx:160
SwNodeIndex m_aNodeIndex
Definition: unoredline.hxx:39
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoredline.cxx:155
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoredline.cxx:521
virtual ~SwXRedline() override
Definition: unoredline.cxx:349
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unoredline.cxx:474
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: unoredline.cxx:564
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &aTextPosition) override
Definition: unoredline.cxx:558
SwXRedline(SwRangeRedline &rRedline, SwDoc &rDoc)
Definition: unoredline.cxx:341
SwRangeRedline * m_pRedline
Definition: unoredline.hxx:75
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoredline.cxx:528
const SwRangeRedline * GetRedline() const
Definition: unoredline.hxx:108
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unoredline.cxx:574
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:582
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unoredline.cxx:360
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unoredline.cxx:484
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unoredline.cxx:501
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoredline.cxx:468
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoredline.cxx:353
virtual void Notify(const SfxHint &) override
Definition: unoredline.cxx:489
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoredline.cxx:516
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unoredline.cxx:399
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unoredline.cxx:479
SwDoc * m_pDoc
Definition: unoredline.hxx:74
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:1199
static css::uno::Reference< css::text::XTextSection > GetObject(SwSectionFormat &rFormat)
Definition: unocoll.cxx:1532
static css::uno::Reference< css::text::XTextTable > GetObject(SwFrameFormat &rFormat)
Definition: unocoll.cxx:989
const SwDoc * GetDoc() const
Definition: unotext.cxx:134
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext.cxx:194
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:261
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:1171
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:37
SwNode & GetNode() const
Definition: pam.hxx:80
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
bool hasValue()
unsigned char sal_Bool
CursorType
SwUnoPropertyMapProvider aSwMapProvider
Definition: unomap1.cxx:87
#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:590
constexpr OUStringLiteral UNO_NAME_REDLINE_IDENTIFIER
Definition: unoprnms.hxx:591
constexpr OUStringLiteral UNO_NAME_MERGE_LAST_PARA
Definition: unoprnms.hxx:718
constexpr OUStringLiteral UNO_NAME_REDLINE_TYPE
Definition: unoprnms.hxx:589
constexpr OUStringLiteral UNO_NAME_IS_START
Definition: unoprnms.hxx:503
constexpr OUStringLiteral UNO_NAME_REDLINE_TEXT
Definition: unoprnms.hxx:597
constexpr OUStringLiteral UNO_NAME_IS_COLLAPSED
Definition: unoprnms.hxx:502
constexpr OUStringLiteral UNO_NAME_REDLINE_START
Definition: unoprnms.hxx:595
constexpr OUStringLiteral UNO_NAME_REDLINE_COMMENT
Definition: unoprnms.hxx:587
constexpr OUStringLiteral UNO_NAME_REDLINE_AUTHOR
Definition: unoprnms.hxx:585
constexpr OUStringLiteral UNO_NAME_REDLINE_DESCRIPTION
Definition: unoprnms.hxx:588
constexpr OUStringLiteral UNO_NAME_REDLINE_DATE_TIME
Definition: unoprnms.hxx:586
constexpr OUStringLiteral UNO_NAME_IS_IN_HEADER_FOOTER
Definition: unoprnms.hxx:592
constexpr OUStringLiteral UNO_NAME_REDLINE_END
Definition: unoprnms.hxx:596
static uno::Sequence< beans::PropertyValue > lcl_GetSuccessorProperties(const SwRangeRedline &rRedline)
Definition: unoredline.cxx:179