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::createTextCursor()
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 static_cast<text::XWordCursor*>(pXCursor.get());
130}
131
132uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursorByRange(
133 const uno::Reference<text::XTextRange> & aTextRange)
134{
135 uno::Reference<text::XTextCursor> xCursor = createTextCursor();
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 == u"" UNO_NAME_REDLINE_AUTHOR)
250 aRet <<= rRedline.GetAuthorString();
251 else if(rPropertyName == u"" UNO_NAME_REDLINE_DATE_TIME)
252 {
253 aRet <<= rRedline.GetTimeStamp().GetUNODateTime();
254 }
255 else if(rPropertyName == u"" UNO_NAME_REDLINE_COMMENT)
256 aRet <<= rRedline.GetComment();
257 else if(rPropertyName == u"" UNO_NAME_REDLINE_DESCRIPTION)
258 aRet <<= const_cast<SwRangeRedline&>(rRedline).GetDescr();
259 else if(rPropertyName == u"" UNO_NAME_REDLINE_TYPE)
260 {
261 aRet <<= SwRedlineTypeToOUString(rRedline.GetType());
262 }
263 else if(rPropertyName == u"" UNO_NAME_REDLINE_SUCCESSOR_DATA)
264 {
265 if(rRedline.GetRedlineData().Next())
266 aRet <<= lcl_GetSuccessorProperties(rRedline);
267 }
268 else if (rPropertyName == u"" 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 == u"" UNO_NAME_IS_IN_HEADER_FOOTER)
274 {
275 aRet <<= rRedline.GetDoc().IsInHeaderFooter( rRedline.GetPoint()->GetNode() );
276 }
277 else if (rPropertyName == u"" 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 uno::Reference<text::XTextRange> xRange =
434 SwXTextRange::CreateXTextRange(*m_pDoc, *pPoint, nullptr);
435 xRet = xRange.get();
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
523uno::Reference< text::XTextCursor > SwXRedline::createTextCursor()
524{
525 SolarMutexGuard aGuard;
526 if(!m_pDoc)
527 throw uno::RuntimeException();
528
529 const SwNodeIndex* pNodeIndex = m_pRedline->GetContentIdx();
530 if(!pNodeIndex)
531 {
532 throw uno::RuntimeException();
533 }
534
535 SwPosition aPos(*pNodeIndex);
537 new SwXTextCursor(*m_pDoc, this, CursorType::Redline, aPos);
538 auto& rUnoCursor(pXCursor->GetCursor());
539 rUnoCursor.Move(fnMoveForward, GoInNode);
540
541 // is here a table?
542 SwTableNode* pTableNode = rUnoCursor.GetPointNode().FindTableNode();
543 while( pTableNode )
544 {
545 rUnoCursor.GetPoint()->Assign( *pTableNode->EndOfSectionNode() );
546 SwContentNode* pCont = GetDoc()->GetNodes().GoNext(rUnoCursor.GetPoint());
547 pTableNode = pCont->FindTableNode();
548 }
549
550 return static_cast<text::XWordCursor*>(pXCursor.get());
551}
552
553uno::Reference< text::XTextCursor > SwXRedline::createTextCursorByRange(
554 const uno::Reference< text::XTextRange > & /*aTextPosition*/)
555{
556 throw uno::RuntimeException();
557}
558
560{
561 uno::Any aRet = SwXText::queryInterface(rType);
562 if(!aRet.hasValue())
563 {
564 aRet = SwXRedlineBaseClass::queryInterface(rType);
565 }
566 return aRet;
567}
568
569uno::Sequence<uno::Type> SwXRedline::getTypes()
570{
573 SwXRedlineBaseClass::getTypes()
574 );
575}
576
577uno::Sequence<sal_Int8> SwXRedline::getImplementationId()
578{
579 return css::uno::Sequence<sal_Int8>();
580}
581
582/* 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:192
SwNodes & GetNodes()
Definition: doc.hxx:413
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:336
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:427
bool IsInHeaderFooter(const SwNode &) const
Definition: doclay.cxx:1550
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:84
SwStartNode * GetStartNode()
Definition: node.hxx:619
SwSectionNode * GetSectionNode()
Definition: node.hxx:635
SwNodeOffset GetIndex() const
Definition: node.hxx:296
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:370
SwNodeOffset EndOfSectionIndex() const
Definition: node.hxx:705
SwTableNode * GetTableNode()
Definition: node.hxx:627
SwNodeType GetNodeType() const
Definition: node.hxx:150
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:710
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1300
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:638
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:1944
const SwNodeIndex * GetContentIdx() const
Definition: redline.hxx:189
OUString const & GetAuthorString(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1924
const DateTime & GetTimeStamp(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1929
void SetComment(const OUString &rS)
Definition: redline.hxx:219
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1934
bool IsDelLastPara() const
Definition: redline.hxx:195
const SwRedlineData & GetRedlineData(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1957
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
const SwSection & GetSection() const
Definition: node.hxx:567
SwSectionFormat * GetFormat()
Definition: section.hxx:337
Starts a section of nodes in the document model.
Definition: node.hxx:325
const SwTable & GetTable() const
Definition: node.hxx:521
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:113
SwTableFormat * GetFrameFormat()
Definition: swtable.hxx:204
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
Definition: unomap1.cxx:1066
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:288
SwXRedlineText provides an XText which may be used to write directly into a redline node.
Definition: unoredline.hxx:38
SwXRedlineText(SwDoc *pDoc, const SwNodeIndex &aNodeIndex)
Definition: unoredline.cxx:47
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoredline.cxx:93
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:132
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 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:559
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &aTextPosition) override
Definition: unoredline.cxx:553
SwXRedline(SwRangeRedline &rRedline, SwDoc &rDoc)
Definition: unoredline.cxx:336
SwRangeRedline * m_pRedline
Definition: unoredline.hxx:72
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoredline.cxx:523
const SwRangeRedline * GetRedline() const
Definition: unoredline.hxx:105
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unoredline.cxx:569
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:577
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unoredline.cxx:355
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:71
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unoport.cxx:420
SwUnoCursor & GetCursor() const
Definition: unoport.hxx:243
void SetCollapsed(bool bSet)
Definition: unoport.hxx:239
static css::uno::Reference< css::text::XTextRange > CreateXTextRange(SwDoc &rDoc, const SwPosition &rPos, const SwPosition *const pMark)
Definition: unoobj2.cxx:1210
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:136
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext.cxx:196
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:267
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
css::uno::Type const & get()
SvtBroadcaster & GetNotifier()
Definition: calbck.hxx:101
float u
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:1133
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Definition: paminit.cxx:59
@ 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:448
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:67
@ PORTION_REDLINE_START
Definition: unoport.hxx:66
#define UNO_NAME_IS_START
Definition: unoprnms.hxx:482
#define UNO_NAME_REDLINE_DATE_TIME
Definition: unoprnms.hxx:551
#define UNO_NAME_REDLINE_SUCCESSOR_DATA
Definition: unoprnms.hxx:555
#define UNO_NAME_REDLINE_START
Definition: unoprnms.hxx:560
#define UNO_NAME_REDLINE_DESCRIPTION
Definition: unoprnms.hxx:553
#define UNO_NAME_REDLINE_TYPE
Definition: unoprnms.hxx:554
#define UNO_NAME_REDLINE_COMMENT
Definition: unoprnms.hxx:552
#define UNO_NAME_IS_IN_HEADER_FOOTER
Definition: unoprnms.hxx:557
#define UNO_NAME_REDLINE_IDENTIFIER
Definition: unoprnms.hxx:556
#define UNO_NAME_IS_COLLAPSED
Definition: unoprnms.hxx:481
#define UNO_NAME_MERGE_LAST_PARA
Definition: unoprnms.hxx:695
#define UNO_NAME_REDLINE_AUTHOR
Definition: unoprnms.hxx:550
#define UNO_NAME_REDLINE_END
Definition: unoprnms.hxx:561
#define UNO_NAME_REDLINE_TEXT
Definition: unoprnms.hxx:562
static uno::Sequence< beans::PropertyValue > lcl_GetSuccessorProperties(const SwRangeRedline &rRedline)
Definition: unoredline.cxx:174