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