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