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>
42 #include <docary.hxx>
43 
44 using namespace ::com::sun::star;
45 
47  SwXText(_pDoc, CursorType::Redline),
48  aNodeIndex(aIndex)
49 {
50 }
51 
53 {
54  return aNodeIndex.GetNode().GetStartNode();
55 }
56 
58 {
59  uno::Any aRet;
60 
62  {
63  uno::Reference<container::XEnumerationAccess> aAccess = this;
64  aRet <<= aAccess;
65  }
66  else
67  {
68  // delegate to SwXText and OWeakObject
69  aRet = SwXText::queryInterface(rType);
70  if(!aRet.hasValue())
71  {
72  aRet = OWeakObject::queryInterface(rType);
73  }
74  }
75 
76  return aRet;
77 }
78 
79 uno::Sequence<uno::Type> SwXRedlineText::getTypes()
80 {
81  return cppu::OTypeCollection(
84  ).getTypes();
85 }
86 
87 uno::Sequence<sal_Int8> SwXRedlineText::getImplementationId()
88 {
89  return css::uno::Sequence<sal_Int8>();
90 }
91 
92 uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor()
93 {
94  SolarMutexGuard aGuard;
95 
96  SwPosition aPos(aNodeIndex);
97  SwXTextCursor *const pXCursor =
98  new SwXTextCursor(*GetDoc(), this, CursorType::Redline, aPos);
99  auto& rUnoCursor(pXCursor->GetCursor());
100  rUnoCursor.Move(fnMoveForward, GoInNode);
101 
102  // #101929# prevent a newly created text cursor from running inside a table
103  // because table cells have their own XText.
104  // Patterned after SwXTextFrame::createTextCursor().
105 
106  // skip all tables at the beginning
107  SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode();
108  SwContentNode* pContentNode = nullptr;
109  bool bTable = pTableNode != nullptr;
110  while( pTableNode != nullptr )
111  {
112  rUnoCursor.GetPoint()->nNode = *(pTableNode->EndOfSectionNode());
113  pContentNode = GetDoc()->GetNodes().GoNext(&rUnoCursor.GetPoint()->nNode);
114  pTableNode = pContentNode->FindTableNode();
115  }
116  if( pContentNode != nullptr )
117  rUnoCursor.GetPoint()->nContent.Assign( pContentNode, 0 );
118  if( bTable && rUnoCursor.GetNode().FindSttNodeByType( SwNormalStartNode )
119  != GetStartNode() )
120  {
121  // We have gone too far and have left our own redline. This means that
122  // no content node outside of a table could be found, and therefore we
123  // except.
124  uno::RuntimeException aExcept;
125  aExcept.Message =
126  "No content node found that is inside this change section "
127  "but outside of a table";
128  throw aExcept;
129  }
130 
131  return static_cast<text::XWordCursor*>(pXCursor);
132 }
133 
134 uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursorByRange(
135  const uno::Reference<text::XTextRange> & aTextRange)
136 {
137  uno::Reference<text::XTextCursor> xCursor = createTextCursor();
138  xCursor->gotoRange(aTextRange->getStart(), false);
139  xCursor->gotoRange(aTextRange->getEnd(), true);
140  return xCursor;
141 }
142 
143 uno::Reference<container::XEnumeration> SwXRedlineText::createEnumeration()
144 {
145  SolarMutexGuard aGuard;
146  SwPaM aPam(aNodeIndex);
147  aPam.Move(fnMoveForward, GoInNode);
148  auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start()));
149  return SwXParagraphEnumeration::Create(this, pUnoCursor, CursorType::Redline);
150 }
151 
153 {
155 }
156 
158 {
159  return true; // we always have a content index
160 }
161 
163  SwUnoCursor const*const pPortionCursor,
164  uno::Reference< text::XText > const& xParent, bool const bStart)
165  : SwXTextPortion(pPortionCursor, xParent,
167  , m_rRedline(rRedline)
168 {
170 }
171 
173 {
174 }
175 
176 static uno::Sequence<beans::PropertyValue> lcl_GetSuccessorProperties(const SwRangeRedline& rRedline)
177 {
178  uno::Sequence<beans::PropertyValue> aValues(4);
179 
180  const SwRedlineData* pNext = rRedline.GetRedlineData().Next();
181  if(pNext)
182  {
183  beans::PropertyValue* pValues = aValues.getArray();
184  pValues[0].Name = UNO_NAME_REDLINE_AUTHOR;
185  // GetAuthorString(n) walks the SwRedlineData* chain;
186  // here we always need element 1
187  pValues[0].Value <<= rRedline.GetAuthorString(1);
188  pValues[1].Name = UNO_NAME_REDLINE_DATE_TIME;
189  pValues[1].Value <<= pNext->GetTimeStamp().GetUNODateTime();
190  pValues[2].Name = UNO_NAME_REDLINE_COMMENT;
191  pValues[2].Value <<= pNext->GetComment();
192  pValues[3].Name = UNO_NAME_REDLINE_TYPE;
193  pValues[3].Value <<= SwRedlineTypeToOUString(pNext->GetType());
194  }
195  return aValues;
196 }
197 
198 uno::Any SwXRedlinePortion::getPropertyValue( const OUString& rPropertyName )
199 {
200  SolarMutexGuard aGuard;
201  if (!Validate())
202  {
203  return uno::Any();
204  }
205  uno::Any aRet;
206  if(rPropertyName == UNO_NAME_REDLINE_TEXT)
207  {
208  SwNodeIndex* pNodeIdx = m_rRedline.GetContentIdx();
209  if(pNodeIdx )
210  {
211  if ( 1 < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
212  {
213  SwUnoCursor& rUnoCursor = GetCursor();
214  uno::Reference<text::XText> xRet = new SwXRedlineText(&rUnoCursor.GetDoc(), *pNodeIdx);
215  aRet <<= xRet;
216  }
217  else {
218  OSL_FAIL("Empty section in redline portion! (end node immediately follows start node)");
219  }
220  }
221  }
222  else
223  {
224  aRet = GetPropertyValue(rPropertyName, m_rRedline);
225  if(!aRet.hasValue() &&
226  rPropertyName != UNO_NAME_REDLINE_SUCCESSOR_DATA)
227  aRet = SwXTextPortion::getPropertyValue(rPropertyName);
228  }
229  return aRet;
230 }
231 
233 {
234  SwUnoCursor& rUnoCursor = GetCursor();
235  //search for the redline
236  SwDoc& rDoc = rUnoCursor.GetDoc();
237  const SwRedlineTable& rRedTable = rDoc.getIDocumentRedlineAccess().GetRedlineTable();
238  bool bFound = false;
239  for(size_t nRed = 0; nRed < rRedTable.size() && !bFound; nRed++)
240  {
241  bFound = &m_rRedline == rRedTable[nRed];
242  }
243  return bFound;
244  // don't throw; the only caller can return void instead
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( std::u16string_view rPropertyName, const SwRangeRedline& rRedline )
253 {
254  uno::Any aRet;
255  if(rPropertyName == u"" UNO_NAME_REDLINE_AUTHOR)
256  aRet <<= rRedline.GetAuthorString();
257  else if(rPropertyName == u"" UNO_NAME_REDLINE_DATE_TIME)
258  {
259  aRet <<= rRedline.GetTimeStamp().GetUNODateTime();
260  }
261  else if(rPropertyName == u"" UNO_NAME_REDLINE_COMMENT)
262  aRet <<= rRedline.GetComment();
263  else if(rPropertyName == u"" UNO_NAME_REDLINE_DESCRIPTION)
264  aRet <<= const_cast<SwRangeRedline&>(rRedline).GetDescr();
265  else if(rPropertyName == u"" UNO_NAME_REDLINE_TYPE)
266  {
267  aRet <<= SwRedlineTypeToOUString(rRedline.GetType());
268  }
269  else if(rPropertyName == u"" UNO_NAME_REDLINE_SUCCESSOR_DATA)
270  {
271  if(rRedline.GetRedlineData().Next())
272  aRet <<= lcl_GetSuccessorProperties(rRedline);
273  }
274  else if (rPropertyName == u"" 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 == u"" UNO_NAME_IS_IN_HEADER_FOOTER)
280  {
281  aRet <<= rRedline.GetDoc().IsInHeaderFooter( rRedline.GetPoint()->nNode );
282  }
283  else if (rPropertyName == u"" 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:152
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:685
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unoredline.cxx:79
Starts a section of nodes in the document model.
Definition: node.hxx:311
sal_uLong GetIndex() const
Definition: node.hxx:290
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:64
OUString const & GetAuthorString(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1755
virtual const SwStartNode * GetStartNode() const override
Definition: unoredline.cxx:52
CursorType
#define UNO_NAME_MERGE_LAST_PARA
Definition: unoprnms.hxx:689
const SwRedlineData * Next() const
Definition: redline.hxx:129
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:361
const SwPosition * GetMark() const
Definition: pam.hxx:209
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
Definition: unomap1.cxx:1058
Definition: doc.hxx:186
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:87
SwSectionFormat * GetFormat()
Definition: section.hxx:336
static 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:449
static css::uno::Any GetPropertyValue(std::u16string_view PropertyName, SwRangeRedline const &rRedline)
Definition: unoredline.cxx:252
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unoredline.cxx:198
SwXRedline(SwRangeRedline &rRedline, SwDoc &rDoc)
Definition: unoredline.cxx:342
SwTableFormat * GetFrameFormat()
Definition: swtable.hxx:203
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:1551
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:263
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoredline.cxx:247
size_type size() const
Definition: docary.hxx:266
const SwSection & GetSection() const
Definition: node.hxx:544
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:124
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoredline.cxx:529
SwTableNode * GetTableNode()
Definition: node.hxx:602
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:162
const DateTime & GetTimeStamp(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1760
static uno::Sequence< beans::PropertyValue > lcl_GetSuccessorProperties(const SwRangeRedline &rRedline)
Definition: unoredline.cxx:176
#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:570
const SwTable & GetTable() const
Definition: node.hxx:500
#define UNO_NAME_REDLINE_END
Definition: unoprnms.hxx:555
virtual ~SwXRedline() override
Definition: unoredline.cxx:350
SwRangeRedline const & m_rRedline
Definition: unoport.hxx:274
const SwRedlineData & GetRedlineData(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1783
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:502
Style of a layout element.
Definition: frmfmt.hxx:58
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: unoredline.cxx:57
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:955
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:549
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:157
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext.cxx:192
float u
unsigned char sal_Bool
const DateTime & GetTimeStamp() const
Definition: redline.hxx:128
#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:400
static css::uno::Reference< css::text::XTextTable > GetObject(SwFrameFormat &rFormat)
Definition: unocoll.cxx:982
bool StartListening(SvtBroadcaster &rBroadcaster)
SwStartNode * GetStartNode()
Definition: node.hxx:594
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:397
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:111
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:1770
SvtBroadcaster & GetNotifier()
Definition: calbck.hxx:99
void SetComment(const OUString &rS)
Definition: redline.hxx:209
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoredline.cxx:92
const OUString & GetComment() const
Definition: redline.hxx:127
sal_uLong EndOfSectionIndex() const
Definition: node.hxx:680
const PropertyValue * pValues
const SwDoc * GetDoc() const
Definition: unotext.cxx:132
static css::uno::Sequence< css::beans::PropertyValue > CreateRedlineProperties(SwRangeRedline const &rRedline, bool const bIsStart)
Definition: unoredline.cxx:290
SwUnoCursor & GetCursor()
Definition: unoobj.cxx:690
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:335
SwXRedlineText(SwDoc *pDoc, const SwNodeIndex &aNodeIndex)
Definition: unoredline.cxx:46
virtual ~SwXRedlinePortion() override
Definition: unoredline.cxx:172
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: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:407
SwUnoCursor & GetCursor() const
Definition: unoport.hxx:229
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoredline.cxx:522
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1765
SwTableNode is derived from SwStartNode.
SwUnoPropertyMapProvider aSwMapProvider
Definition: unomap1.cxx:87
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:134
#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:355
#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:485
#define UNO_NAME_REDLINE_TYPE
Definition: unoprnms.hxx:548
SwDoc & GetDoc() const
Definition: pam.hxx:243
SwSectionNode * GetSectionNode()
Definition: node.hxx:610
static css::uno::Reference< css::text::XTextRange > CreateXTextRange(SwDoc &rDoc, const SwPosition &rPos, const SwPosition *const pMark)
Definition: unoobj2.cxx:1203
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:188
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:475
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1284
SwNodeIndex * GetContentIdx() const
Definition: redline.hxx:183
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unoredline.cxx:143
virtual void Notify(const SfxHint &) override
Definition: unoredline.cxx:490
Base class of the Writer document model elements.
Definition: node.hxx:79