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>
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  if (!Validate())
201  {
202  return uno::Any();
203  }
204  uno::Any aRet;
205  if(rPropertyName == UNO_NAME_REDLINE_TEXT)
206  {
207  SwNodeIndex* pNodeIdx = m_rRedline.GetContentIdx();
208  if(pNodeIdx )
209  {
210  if ( 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* pDoc = rUnoCursor.GetDoc();
236  const SwRedlineTable& rRedTable = pDoc->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 
246 uno::Sequence< sal_Int8 > SAL_CALL SwXRedlinePortion::getImplementationId( )
247 {
248  return css::uno::Sequence<sal_Int8>();
249 }
250 
251 uno::Any SwXRedlinePortion::GetPropertyValue( const OUString& 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()->nNode );
281  }
282  else if (rPropertyName == UNO_NAME_MERGE_LAST_PARA)
283  {
284  aRet <<= !rRedline.IsDelLastPara();
285  }
286  return aRet;
287 }
288 
289 uno::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  SwNodeIndex* pNodeIdx = rRedline.GetContentIdx();
320  if(pNodeIdx )
321  {
322  if ( 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  pDoc(&rDoc),
344  pRedline(&rRedline)
345 {
347 }
348 
350 {
351 }
352 
353 uno::Reference< beans::XPropertySetInfo > SwXRedline::getPropertySetInfo( )
354 {
355  static uno::Reference< beans::XPropertySetInfo > xRef =
357  return xRef;
358 }
359 
360 void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any& aValue )
361 {
362  SolarMutexGuard aGuard;
363  if(!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  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 
399 uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
400 {
401  SolarMutexGuard aGuard;
402  if(!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 = &pRedline->GetNode();
411  if(!bStart && pRedline->HasMark())
412  pNode = &pRedline->GetNode(false);
413  switch(pNode->GetNodeType())
414  {
415  case SwNodeType::Section:
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 || !pRedline->HasMark())
435  pPoint = pRedline->GetPoint();
436  else
437  pPoint = pRedline->GetMark();
438  const uno::Reference<text::XTextRange> xRange =
439  SwXTextRange::CreateXTextRange(*pDoc, *pPoint, nullptr);
440  xRet = xRange.get();
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  SwNodeIndex* pNodeIdx = pRedline->GetContentIdx();
451  if( pNodeIdx )
452  {
453  if ( 1 < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
454  {
455  uno::Reference<text::XText> xRet = new SwXRedlineText(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, *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 
489 void SwXRedline::Notify( const SfxHint& rHint )
490 {
491  if(rHint.GetId() == SfxHintId::Dying)
492  {
493  pDoc = nullptr;
494  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 
501 uno::Reference< container::XEnumeration > SwXRedline::createEnumeration()
502 {
503  SolarMutexGuard aGuard;
504  if(!pDoc)
505  throw uno::RuntimeException();
506 
507  SwNodeIndex* pNodeIndex = pRedline->GetContentIdx();
508  if(!pNodeIndex)
509  return nullptr;
510  SwPaM aPam(*pNodeIndex);
511  aPam.Move(fnMoveForward, GoInNode);
512  auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start()));
513  return SwXParagraphEnumeration::Create(this, pUnoCursor, CursorType::Redline);
514 }
515 
517 {
519 }
520 
522 {
523  if(!pDoc)
524  throw uno::RuntimeException();
525  return nullptr != pRedline->GetContentIdx();
526 }
527 
528 uno::Reference< text::XTextCursor > SwXRedline::createTextCursor()
529 {
530  SolarMutexGuard aGuard;
531  if(!pDoc)
532  throw uno::RuntimeException();
533 
534  uno::Reference< text::XTextCursor > xRet;
535  SwNodeIndex* pNodeIndex = pRedline->GetContentIdx();
536  if(!pNodeIndex)
537  {
538  throw uno::RuntimeException();
539  }
540 
541  SwPosition aPos(*pNodeIndex);
542  SwXTextCursor *const pXCursor =
543  new SwXTextCursor(*pDoc, this, CursorType::Redline, aPos);
544  auto& rUnoCursor(pXCursor->GetCursor());
545  rUnoCursor.Move(fnMoveForward, GoInNode);
546 
547  // is here a table?
548  SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode();
549  SwContentNode* pCont = nullptr;
550  while( pTableNode )
551  {
552  rUnoCursor.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
553  pCont = GetDoc()->GetNodes().GoNext(&rUnoCursor.GetPoint()->nNode);
554  pTableNode = pCont->FindTableNode();
555  }
556  if(pCont)
557  rUnoCursor.GetPoint()->nContent.Assign(pCont, 0);
558  xRet = static_cast<text::XWordCursor*>(pXCursor);
559 
560  return xRet;
561 }
562 
563 uno::Reference< text::XTextCursor > SwXRedline::createTextCursorByRange(
564  const uno::Reference< text::XTextRange > & /*aTextPosition*/)
565 {
566  throw uno::RuntimeException();
567 }
568 
570 {
571  uno::Any aRet = SwXText::queryInterface(rType);
572  if(!aRet.hasValue())
573  {
574  aRet = SwXRedlineBaseClass::queryInterface(rType);
575  }
576  return aRet;
577 }
578 
579 uno::Sequence<uno::Type> SwXRedline::getTypes()
580 {
583  SwXRedlineBaseClass::getTypes()
584  );
585 }
586 
587 uno::Sequence<sal_Int8> SwXRedline::getImplementationId()
588 {
589  return css::uno::Sequence<sal_Int8>();
590 }
591 
592 /* 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:353
#define PROPERTY_MAP_REDLINE
Definition: unomap.hxx:64
OUString const & GetAuthorString(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1724
virtual const SwStartNode * GetStartNode() const override
Definition: unoredline.cxx:51
CursorType
#define UNO_NAME_MERGE_LAST_PARA
Definition: unoprnms.hxx:689
const SwRedlineData * Next() const
Definition: redline.hxx:130
SwNodeIndex nNode
Definition: pam.hxx:37
#define UNO_NAME_IS_START
Definition: unoprnms.hxx:476
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unoredline.cxx:360
const SwPosition * GetMark() const
Definition: pam.hxx:209
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
Definition: unomap1.cxx:1060
Definition: doc.hxx:184
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:336
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unoredline.cxx:197
SwXRedline(SwRangeRedline &rRedline, SwDoc &rDoc)
Definition: unoredline.cxx:341
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:516
SfxHintId GetId() const
bool IsInHeaderFooter(const SwNodeIndex &rIdx) const
Definition: doclay.cxx:1550
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:260
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:246
size_type size() const
Definition: docary.hxx:266
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:479
RedlineType GetType() const
Definition: redline.hxx:125
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoredline.cxx:528
SwTableNode * GetTableNode()
Definition: node.hxx:599
SwNodeType GetNodeType() const
Definition: node.hxx:144
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:426
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:1729
static uno::Sequence< beans::PropertyValue > lcl_GetSuccessorProperties(const SwRangeRedline &rRedline)
Definition: unoredline.cxx:175
#define UNO_NAME_IS_COLLAPSED
Definition: unoprnms.hxx:475
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: unoredline.cxx:569
const SwTable & GetTable() const
Definition: node.hxx:497
#define UNO_NAME_REDLINE_END
Definition: unoprnms.hxx:555
virtual ~SwXRedline() override
Definition: unoredline.cxx:349
SwRangeRedline const & m_rRedline
Definition: unoport.hxx:274
const SwRedlineData & GetRedlineData(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1752
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:579
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:501
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:954
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:587
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &aTextPosition) override
Definition: unoredline.cxx:563
OUString SwRedlineTypeToOUString(RedlineType eType)
#define UNO_NAME_REDLINE_SUCCESSOR_DATA
Definition: unoprnms.hxx:549
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:451
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:189
unsigned char sal_Bool
const DateTime & GetTimeStamp() const
Definition: redline.hxx:129
#define UNO_NAME_IS_IN_HEADER_FOOTER
Definition: unoprnms.hxx:551
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:547
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:399
static css::uno::Reference< css::text::XTextTable > GetObject(SwFrameFormat &rFormat)
Definition: unocoll.cxx:982
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:546
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:544
const OUString & GetComment(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1739
SvtBroadcaster & GetNotifier()
Definition: calbck.hxx:93
static css::uno::Any GetPropertyValue(OUString const &PropertyName, SwRangeRedline const &rRedline)
Definition: unoredline.cxx:251
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:130
static css::uno::Sequence< css::beans::PropertyValue > CreateRedlineProperties(SwRangeRedline const &rRedline, bool const bIsStart)
Definition: unoredline.cxx:289
SwUnoCursor & GetCursor()
Definition: unoobj.cxx:690
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:335
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:501
const SwRangeRedline * GetRedline() const
Definition: unoredline.hxx:105
#define UNO_NAME_REDLINE_START
Definition: unoprnms.hxx:554
#define UNO_NAME_REDLINE_IDENTIFIER
Definition: unoprnms.hxx:550
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:521
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1734
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:468
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:556
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:352
#define UNO_NAME_REDLINE_DATE_TIME
Definition: unoprnms.hxx:545
#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:484
#define UNO_NAME_REDLINE_TYPE
Definition: unoprnms.hxx:548
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:1054
static css::uno::Reference< css::text::XTextSection > GetObject(SwSectionFormat &rFormat)
Definition: unocoll.cxx:1526
virtual const SwRedlineTable & GetRedlineTable() const =0
SwRangeRedline * pRedline
Definition: unoredline.hxx:72
bool IsDelLastPara() const
Definition: redline.hxx:189
Standard page.
Definition: poolfmt.hxx:170
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unoredline.cxx:474
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1288
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:489
Base class of the Writer document model elements.
Definition: node.hxx:79