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 
24 #include <vcl/svapp.hxx>
25 
26 #include <pagedesc.hxx>
27 #include <poolfmt.hxx>
28 #include <redline.hxx>
29 #include <section.hxx>
30 #include <unoprnms.hxx>
31 #include <unotextrange.hxx>
32 #include <unotextcursor.hxx>
33 #include <unoparagraph.hxx>
34 #include <unocoll.hxx>
35 #include <unomap.hxx>
36 #include <unocrsr.hxx>
37 #include <unoport.hxx>
38 #include <unoredline.hxx>
39 #include <doc.hxx>
41 #include <docary.hxx>
42 
43 using namespace ::com::sun::star;
44 
46  SwXText(_pDoc, CursorType::Redline),
47  aNodeIndex(aIndex)
48 {
49 }
50 
52 {
53  return aNodeIndex.GetNode().GetStartNode();
54 }
55 
57 {
58  uno::Any aRet;
59 
61  {
62  uno::Reference<container::XEnumerationAccess> aAccess = this;
63  aRet <<= aAccess;
64  }
65  else
66  {
67  // delegate to SwXText and OWeakObject
68  aRet = SwXText::queryInterface(rType);
69  if(!aRet.hasValue())
70  {
71  aRet = OWeakObject::queryInterface(rType);
72  }
73  }
74 
75  return aRet;
76 }
77 
78 uno::Sequence<uno::Type> SwXRedlineText::getTypes()
79 {
80  return cppu::OTypeCollection(
83  ).getTypes();
84 }
85 
86 uno::Sequence<sal_Int8> SwXRedlineText::getImplementationId()
87 {
88  return css::uno::Sequence<sal_Int8>();
89 }
90 
91 uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor()
92 {
93  SolarMutexGuard aGuard;
94 
95  SwPosition aPos(aNodeIndex);
96  SwXTextCursor *const pXCursor =
97  new SwXTextCursor(*GetDoc(), this, CursorType::Redline, aPos);
98  auto& rUnoCursor(pXCursor->GetCursor());
99  rUnoCursor.Move(fnMoveForward, GoInNode);
100 
101  // #101929# prevent a newly created text cursor from running inside a table
102  // because table cells have their own XText.
103  // Patterned after SwXTextFrame::createTextCursor().
104 
105  // skip all tables at the beginning
106  SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode();
107  SwContentNode* pContentNode = nullptr;
108  bool bTable = pTableNode != nullptr;
109  while( pTableNode != nullptr )
110  {
111  rUnoCursor.GetPoint()->nNode = *(pTableNode->EndOfSectionNode());
112  pContentNode = GetDoc()->GetNodes().GoNext(&rUnoCursor.GetPoint()->nNode);
113  pTableNode = pContentNode->FindTableNode();
114  }
115  if( pContentNode != nullptr )
116  rUnoCursor.GetPoint()->nContent.Assign( pContentNode, 0 );
117  if( bTable && rUnoCursor.GetNode().FindSttNodeByType( SwNormalStartNode )
118  != GetStartNode() )
119  {
120  // We have gone too far and have left our own redline. This means that
121  // no content node outside of a table could be found, and therefore we
122  // except.
123  uno::RuntimeException aExcept;
124  aExcept.Message =
125  "No content node found that is inside this change section "
126  "but outside of a table";
127  throw aExcept;
128  }
129 
130  return static_cast<text::XWordCursor*>(pXCursor);
131 }
132 
133 uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursorByRange(
134  const uno::Reference<text::XTextRange> & aTextRange)
135 {
136  uno::Reference<text::XTextCursor> xCursor = createTextCursor();
137  xCursor->gotoRange(aTextRange->getStart(), false);
138  xCursor->gotoRange(aTextRange->getEnd(), true);
139  return xCursor;
140 }
141 
142 uno::Reference<container::XEnumeration> SwXRedlineText::createEnumeration()
143 {
144  SolarMutexGuard aGuard;
145  SwPaM aPam(aNodeIndex);
146  aPam.Move(fnMoveForward, GoInNode);
147  auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start()));
148  return SwXParagraphEnumeration::Create(this, pUnoCursor, CursorType::Redline);
149 }
150 
152 {
154 }
155 
157 {
158  return true; // we always have a content index
159 }
160 
162  SwUnoCursor const*const pPortionCursor,
163  uno::Reference< text::XText > const& xParent, bool const bStart)
164  : SwXTextPortion(pPortionCursor, xParent,
166  , m_rRedline(rRedline)
167 {
169 }
170 
172 {
173 }
174 
175 static uno::Sequence<beans::PropertyValue> lcl_GetSuccessorProperties(const SwRangeRedline& rRedline)
176 {
177  uno::Sequence<beans::PropertyValue> aValues(4);
178 
179  const SwRedlineData* pNext = rRedline.GetRedlineData().Next();
180  if(pNext)
181  {
182  beans::PropertyValue* pValues = aValues.getArray();
183  pValues[0].Name = UNO_NAME_REDLINE_AUTHOR;
184  // GetAuthorString(n) walks the SwRedlineData* chain;
185  // here we always need element 1
186  pValues[0].Value <<= rRedline.GetAuthorString(1);
187  pValues[1].Name = UNO_NAME_REDLINE_DATE_TIME;
188  pValues[1].Value <<= pNext->GetTimeStamp().GetUNODateTime();
189  pValues[2].Name = UNO_NAME_REDLINE_COMMENT;
190  pValues[2].Value <<= pNext->GetComment();
191  pValues[3].Name = UNO_NAME_REDLINE_TYPE;
192  pValues[3].Value <<= SwRedlineTypeToOUString(pNext->GetType());
193  }
194  return aValues;
195 }
196 
197 uno::Any SwXRedlinePortion::getPropertyValue( const OUString& rPropertyName )
198 {
199  SolarMutexGuard aGuard;
200  Validate();
201  uno::Any aRet;
202  if(rPropertyName == UNO_NAME_REDLINE_TEXT)
203  {
204  SwNodeIndex* pNodeIdx = m_rRedline.GetContentIdx();
205  if(pNodeIdx )
206  {
207  if ( 1 < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
208  {
209  SwUnoCursor& rUnoCursor = GetCursor();
210  uno::Reference<text::XText> xRet = new SwXRedlineText(rUnoCursor.GetDoc(), *pNodeIdx);
211  aRet <<= xRet;
212  }
213  else {
214  OSL_FAIL("Empty section in redline portion! (end node immediately follows start node)");
215  }
216  }
217  }
218  else
219  {
220  aRet = GetPropertyValue(rPropertyName, m_rRedline);
221  if(!aRet.hasValue() &&
222  rPropertyName != UNO_NAME_REDLINE_SUCCESSOR_DATA)
223  aRet = SwXTextPortion::getPropertyValue(rPropertyName);
224  }
225  return aRet;
226 }
227 
229 {
230  SwUnoCursor& rUnoCursor = GetCursor();
231  //search for the redline
232  SwDoc* pDoc = rUnoCursor.GetDoc();
233  const SwRedlineTable& rRedTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
234  bool bFound = false;
235  for(size_t nRed = 0; nRed < rRedTable.size() && !bFound; nRed++)
236  bFound = &m_rRedline == rRedTable[nRed];
237  if(!bFound)
238  throw uno::RuntimeException();
239 }
240 
241 uno::Sequence< sal_Int8 > SAL_CALL SwXRedlinePortion::getImplementationId( )
242 {
243  return css::uno::Sequence<sal_Int8>();
244 }
245 
246 uno::Any SwXRedlinePortion::GetPropertyValue( const OUString& 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()->nNode );
276  }
277  else if (rPropertyName == UNO_NAME_MERGE_LAST_PARA)
278  {
279  aRet <<= !rRedline.IsDelLastPara();
280  }
281  return aRet;
282 }
283 
284 uno::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  SwNodeIndex* pNodeIdx = rRedline.GetContentIdx();
315  if(pNodeIdx )
316  {
317  if ( 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  pDoc(&rDoc),
339  pRedline(&rRedline)
340 {
342 }
343 
345 {
346 }
347 
348 uno::Reference< beans::XPropertySetInfo > SwXRedline::getPropertySetInfo( )
349 {
350  static uno::Reference< beans::XPropertySetInfo > xRef =
352  return xRef;
353 }
354 
355 void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any& aValue )
356 {
357  SolarMutexGuard aGuard;
358  if(!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  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 
394 uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
395 {
396  SolarMutexGuard aGuard;
397  if(!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 = &pRedline->GetNode();
406  if(!bStart && pRedline->HasMark())
407  pNode = &pRedline->GetNode(false);
408  switch(pNode->GetNodeType())
409  {
410  case SwNodeType::Section:
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 || !pRedline->HasMark())
430  pPoint = pRedline->GetPoint();
431  else
432  pPoint = pRedline->GetMark();
433  const uno::Reference<text::XTextRange> xRange =
434  SwXTextRange::CreateXTextRange(*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  SwNodeIndex* pNodeIdx = pRedline->GetContentIdx();
446  if( pNodeIdx )
447  {
448  if ( 1 < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
449  {
450  uno::Reference<text::XText> xRet = new SwXRedlineText(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, *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 
484 void SwXRedline::Notify( const SfxHint& rHint )
485 {
486  if(rHint.GetId() == SfxHintId::Dying)
487  {
488  pDoc = nullptr;
489  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 
496 uno::Reference< container::XEnumeration > SwXRedline::createEnumeration()
497 {
498  SolarMutexGuard aGuard;
499  if(!pDoc)
500  throw uno::RuntimeException();
501 
502  SwNodeIndex* pNodeIndex = pRedline->GetContentIdx();
503  if(!pNodeIndex)
504  return nullptr;
505  SwPaM aPam(*pNodeIndex);
506  aPam.Move(fnMoveForward, GoInNode);
507  auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start()));
508  return SwXParagraphEnumeration::Create(this, pUnoCursor, CursorType::Redline);
509 }
510 
512 {
514 }
515 
517 {
518  if(!pDoc)
519  throw uno::RuntimeException();
520  return nullptr != pRedline->GetContentIdx();
521 }
522 
523 uno::Reference< text::XTextCursor > SwXRedline::createTextCursor()
524 {
525  SolarMutexGuard aGuard;
526  if(!pDoc)
527  throw uno::RuntimeException();
528 
529  uno::Reference< text::XTextCursor > xRet;
530  SwNodeIndex* pNodeIndex = pRedline->GetContentIdx();
531  if(!pNodeIndex)
532  {
533  throw uno::RuntimeException();
534  }
535 
536  SwPosition aPos(*pNodeIndex);
537  SwXTextCursor *const pXCursor =
538  new SwXTextCursor(*pDoc, this, CursorType::Redline, aPos);
539  auto& rUnoCursor(pXCursor->GetCursor());
540  rUnoCursor.Move(fnMoveForward, GoInNode);
541 
542  // is here a table?
543  SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode();
544  SwContentNode* pCont = nullptr;
545  while( pTableNode )
546  {
547  rUnoCursor.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
548  pCont = GetDoc()->GetNodes().GoNext(&rUnoCursor.GetPoint()->nNode);
549  pTableNode = pCont->FindTableNode();
550  }
551  if(pCont)
552  rUnoCursor.GetPoint()->nContent.Assign(pCont, 0);
553  xRet = static_cast<text::XWordCursor*>(pXCursor);
554 
555  return xRet;
556 }
557 
558 uno::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 
574 uno::Sequence<uno::Type> SwXRedline::getTypes()
575 {
578  SwXRedlineBaseClass::getTypes()
579  );
580 }
581 
582 uno::Sequence<sal_Int8> SwXRedline::getImplementationId()
583 {
584  return css::uno::Sequence<sal_Int8>();
585 }
586 
587 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoredline.cxx:151
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:682
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unoredline.cxx:78
Starts a section of nodes in the document model.
Definition: node.hxx:303
sal_uLong GetIndex() const
Definition: node.hxx:282
SwNode & GetNode(bool bPoint=true) const
Definition: pam.hxx:223
bool hasValue()
Marks a position in the document model.
Definition: pam.hxx:35
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoredline.cxx:348
#define PROPERTY_MAP_REDLINE
Definition: unomap.hxx:64
OUString const & GetAuthorString(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1718
virtual const SwStartNode * GetStartNode() const override
Definition: unoredline.cxx:51
CursorType
#define UNO_NAME_MERGE_LAST_PARA
Definition: unoprnms.hxx:688
const SwRedlineData * Next() const
Definition: redline.hxx:130
SwNodeIndex nNode
Definition: pam.hxx:37
#define UNO_NAME_IS_START
Definition: unoprnms.hxx:475
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unoredline.cxx:355
const SwPosition * GetMark() const
Definition: pam.hxx:209
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
Definition: unomap1.cxx:1059
Definition: doc.hxx:185
SwSectionNode is derived from SwStartNode.
SwNode & GetNode() const
Definition: ndindex.hxx:119
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:86
SwSectionFormat * GetFormat()
Definition: section.hxx:337
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unoredline.cxx:197
SwXRedline(SwRangeRedline &rRedline, SwDoc &rDoc)
Definition: unoredline.cxx:336
SwTableFormat * GetFrameFormat()
Definition: swtable.hxx:201
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoredline.cxx:511
SfxHintId GetId() const
bool IsInHeaderFooter(const SwNodeIndex &rIdx) const
Definition: doclay.cxx:1542
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:259
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:241
size_type size() const
Definition: docary.hxx:368
const SwSection & GetSection() const
Definition: node.hxx:541
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unoredline.cxx:474
RedlineType GetType() const
Definition: redline.hxx:125
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoredline.cxx:523
SwTableNode * GetTableNode()
Definition: node.hxx:599
SwNodeType GetNodeType() const
Definition: node.hxx:144
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:425
SwDoc * pDoc
Definition: unoredline.hxx:71
SwXRedlinePortion(SwRangeRedline const &rRedline, SwUnoCursor const *pPortionCursor, css::uno::Reference< css::text::XText > const &xParent, bool const bIsStart)
Definition: unoredline.cxx:161
const DateTime & GetTimeStamp(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1723
static uno::Sequence< beans::PropertyValue > lcl_GetSuccessorProperties(const SwRangeRedline &rRedline)
Definition: unoredline.cxx:175
#define UNO_NAME_IS_COLLAPSED
Definition: unoprnms.hxx:474
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: unoredline.cxx:564
const SwTable & GetTable() const
Definition: node.hxx:497
#define UNO_NAME_REDLINE_END
Definition: unoprnms.hxx:554
virtual ~SwXRedline() override
Definition: unoredline.cxx:344
SwRangeRedline const & m_rRedline
Definition: unoport.hxx:274
const SwRedlineData & GetRedlineData(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1746
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unoredline.cxx:574
css::util::DateTime GetUNODateTime() const
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
Definition: pam.cxx:495
Style of a layout element.
Definition: frmfmt.hxx:57
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: unoredline.cxx:56
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:906
SwXRedlineText provides an XText which may be used to write directly into a redline node...
Definition: unoredline.hxx:34
const SwPosition * GetPoint() const
Definition: pam.hxx:207
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:582
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &aTextPosition) override
Definition: unoredline.cxx:558
OUString SwRedlineTypeToOUString(RedlineType eType)
#define UNO_NAME_REDLINE_SUCCESSOR_DATA
Definition: unoprnms.hxx:548
static SwXParagraphEnumeration * Create(css::uno::Reference< css::text::XText > const &xParent, const std::shared_ptr< SwUnoCursor > &pCursor, const CursorType eType, SwStartNode const *const pStartNode=nullptr, SwTable const *const pTable=nullptr)
Definition: unoobj2.cxx:449
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Definition: pam.hxx:205
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoredline.cxx:156
SwDoc * GetDoc() const
Definition: pam.hxx:243
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext.cxx:188
unsigned char sal_Bool
const DateTime & GetTimeStamp() const
Definition: redline.hxx:129
#define UNO_NAME_IS_IN_HEADER_FOOTER
Definition: unoprnms.hxx:550
SwNodeIndex aNodeIndex
Definition: unoredline.hxx:39
Marks a node in the document model.
Definition: ndindex.hxx:31
#define UNO_NAME_REDLINE_DESCRIPTION
Definition: unoprnms.hxx:546
css::uno::Type const & get()
void SetCollapsed(bool bSet)
Definition: unoport.hxx:225
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unoredline.cxx:394
static css::uno::Reference< css::text::XTextTable > GetObject(SwFrameFormat &rFormat)
Definition: unocoll.cxx:980
bool StartListening(SvtBroadcaster &rBroadcaster)
SwStartNode * GetStartNode()
Definition: node.hxx:591
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &...rSn)
#define UNO_NAME_REDLINE_COMMENT
Definition: unoprnms.hxx:545
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unoport.cxx:396
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:110
const SwPosition * Start() const
Definition: pam.hxx:212
#define UNO_NAME_REDLINE_AUTHOR
Definition: unoprnms.hxx:543
const OUString & GetComment(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1733
SvtBroadcaster & GetNotifier()
Definition: calbck.hxx:93
static css::uno::Any GetPropertyValue(OUString const &PropertyName, SwRangeRedline const &rRedline)
Definition: unoredline.cxx:246
void SetComment(const OUString &rS)
Definition: redline.hxx:210
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoredline.cxx:91
const OUString & GetComment() const
Definition: redline.hxx:128
sal_uLong EndOfSectionIndex() const
Definition: node.hxx:677
const PropertyValue * pValues
const SwDoc * GetDoc() const
Definition: unotext.cxx:129
static css::uno::Sequence< css::beans::PropertyValue > CreateRedlineProperties(SwRangeRedline const &rRedline, bool const bIsStart)
Definition: unoredline.cxx:284
SwUnoCursor & GetCursor()
Definition: unoobj.cxx:680
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:334
SwXRedlineText(SwDoc *pDoc, const SwNodeIndex &aNodeIndex)
Definition: unoredline.cxx:45
virtual ~SwXRedlinePortion() override
Definition: unoredline.cxx:171
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unoredline.cxx:496
const SwRangeRedline * GetRedline() const
Definition: unoredline.hxx:105
#define UNO_NAME_REDLINE_START
Definition: unoprnms.hxx:553
#define UNO_NAME_REDLINE_IDENTIFIER
Definition: unoprnms.hxx:549
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Definition: paminit.cxx:59
SwNodes & GetNodes()
Definition: doc.hxx:403
SwUnoCursor & GetCursor() const
Definition: unoport.hxx:229
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoredline.cxx:516
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1728
SwTableNode is derived from SwStartNode.
SwUnoPropertyMapProvider aSwMapProvider
Definition: unomap1.cxx:89
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::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &aTextPosition) override
Definition: unoredline.cxx:133
#define UNO_NAME_REDLINE_TEXT
Definition: unoprnms.hxx:555
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:349
#define UNO_NAME_REDLINE_DATE_TIME
Definition: unoprnms.hxx:544
#define SAL_WARN(area, stream)
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unoredline.cxx:479
#define UNO_NAME_REDLINE_TYPE
Definition: unoprnms.hxx:547
SwSectionNode * GetSectionNode()
Definition: node.hxx:607
static css::uno::Reference< css::text::XTextRange > CreateXTextRange(SwDoc &rDoc, const SwPosition &rPos, const SwPosition *const pMark)
Definition: unoobj2.cxx:1052
static css::uno::Reference< css::text::XTextSection > GetObject(SwSectionFormat &rFormat)
Definition: unocoll.cxx:1524
virtual const SwRedlineTable & GetRedlineTable() const =0
SwRangeRedline * pRedline
Definition: unoredline.hxx:72
bool IsDelLastPara() const
Definition: redline.hxx:189
Standard page.
Definition: poolfmt.hxx:171
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unoredline.cxx:469
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1277
SwNodeIndex * GetContentIdx() const
Definition: redline.hxx:184
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unoredline.cxx:142
virtual void Notify(const SfxHint &) override
Definition: unoredline.cxx:484
Base class of the Writer document model elements.
Definition: node.hxx:79