LibreOffice Module sw (master)  1
unredln.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 <UndoRedline.hxx>
21 #include <hintids.hxx>
22 #include <unotools/charclass.hxx>
23 #include <doc.hxx>
25 #include <swundo.hxx>
26 #include <pam.hxx>
27 #include <ndtxt.hxx>
28 #include <txtfrm.hxx>
29 #include <UndoCore.hxx>
30 #include <UndoDelete.hxx>
31 #include <strings.hrc>
32 #include <redline.hxx>
33 #include <docary.hxx>
34 #include <sortopt.hxx>
35 #include <docedt.hxx>
36 
38  : SwUndo( SwUndoId::REDLINE, &rRange.GetDoc() ), SwUndRng( rRange ),
39  mnUserId( nUsrId ),
40  mbHiddenRedlines( false )
41 {
42  // consider Redline
43  SwDoc& rDoc = rRange.GetDoc();
45  {
46  switch( mnUserId )
47  {
48  case SwUndoId::DELETE:
49  case SwUndoId::REPLACE:
50  mpRedlData.reset( new SwRedlineData( RedlineType::Delete, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() ) );
51  break;
52  default:
53  ;
54  }
56  }
57 
58  sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
59 
62  {
63  mpRedlSaveData.reset();
64  }
65  else
66  {
68  if( mbHiddenRedlines ) // then the NodeIndices of SwUndRng need to be corrected
69  {
70  nEndExtra -= rDoc.GetNodes().GetEndOfExtras().GetIndex();
71  m_nSttNode -= nEndExtra;
72  m_nEndNode -= nEndExtra;
73  }
74  }
75 }
76 
78 {
79  mpRedlData.reset();
80  mpRedlSaveData.reset();
81 }
82 
84 {
85  return mpRedlSaveData ? mpRedlSaveData->size() : 0;
86 }
87 
89 {
90  SwDoc& rDoc = rContext.GetDoc();
91  SwPaM& rPam(AddUndoRedoPaM(rContext));
92 
93  // fix PaM for deletions shown in margin
94  SwRedlineTable::size_type nCurRedlinePos;
95  const SwRangeRedline * pRedline =
96  rDoc.getIDocumentRedlineAccess().GetRedline( *rPam.End(), &nCurRedlinePos );
97  if ( pRedline && !pRedline->IsVisible() )
98  {
100  // skip older redlines in the same position
101  while ( nCurRedlinePos + 1 < rTable.size() &&
102  *pRedline->GetPoint() == *rTable[nCurRedlinePos + 1]->GetPoint() )
103  {
104  ++nCurRedlinePos;
105  }
106  SwRangeRedline * pHiddenRedline( rTable[nCurRedlinePos] );
107  pHiddenRedline->Show(0, rTable.GetPos(pHiddenRedline), /*bForced=*/true);
108  pHiddenRedline->Show(1, rTable.GetPos(pHiddenRedline), /*bForced=*/true);
109  rPam = *pHiddenRedline;
110  }
111 
112  UndoRedlineImpl(rDoc, rPam);
113 
114  if( mpRedlSaveData )
115  {
116  sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
117  SetSaveData(rDoc, *mpRedlSaveData);
118  if( mbHiddenRedlines )
119  {
120  mpRedlSaveData->clear();
121 
122  nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex() - nEndExtra;
123  m_nSttNode += nEndExtra;
124  m_nEndNode += nEndExtra;
125  }
126  SetPaM(rPam, true);
127  }
128 
129  // update frames after calling SetSaveData
130  if (dynamic_cast<SwUndoRedlineDelete*>(this))
131  {
133  }
134  else if (dynamic_cast<SwUndoAcceptRedline*>(this)
135  || dynamic_cast<SwUndoRejectRedline*>(this))
136  { // (can't check here if there's a delete redline being accepted)
138  }
139 }
140 
142 {
143  SwDoc& rDoc = rContext.GetDoc();
146 
147  SwPaM & rPam( AddUndoRedoPaM(rContext) );
149  {
150  sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
152 
153  nEndExtra -= rDoc.GetNodes().GetEndOfExtras().GetIndex();
154  m_nSttNode -= nEndExtra;
155  m_nEndNode -= nEndExtra;
156  }
157 
158  RedoRedlineImpl(rDoc, rPam);
159 
160  SetPaM(rPam, true);
162 }
163 
165 {
166 }
167 
168 // default: remove redlines
170 {
171  rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
172 }
173 
175  : SwUndoRedline( nUsrId != SwUndoId::EMPTY ? nUsrId : SwUndoId::DELETE, rRange ),
176  m_bCanGroup( false ), m_bIsDelim( false ), m_bIsBackspace( false )
177 {
178  const SwTextNode* pTNd;
179  SetRedlineText(rRange.GetText());
180  if( SwUndoId::DELETE == mnUserId &&
182  nullptr != (pTNd = rRange.GetNode().GetTextNode()) )
183  {
184  sal_Unicode const cCh = pTNd->GetText()[m_nSttContent];
185  if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
186  {
187  m_bCanGroup = true;
189  m_nSttContent );
191  }
192  }
193 
194  m_bCacheComment = false;
195 }
196 
197 // bit of a hack, replace everything...
199 {
200  SwRewriter aResult;
202  aStr = ShortenString(aStr, nUndoStringLength, SwResId(STR_LDOTS));
203  SwRewriter aRewriter;
204  aRewriter.AddRule(UndoArg1, aStr);
205  OUString ret = aRewriter.Apply(SwResId(STR_UNDO_REDLINE_DELETE));
206  aResult.AddRule(UndoArg1, ret);
207  return aResult;
208 }
209 
210 void SwUndoRedlineDelete::SetRedlineText(const OUString & rText)
211 {
212  m_sRedlineText = rText;
213 }
214 
216 {
217  rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
218 }
219 
221 {
222  if (rPam.GetPoint() != rPam.GetMark())
223  {
225  }
227 }
228 
230 {
231  bool bRet = false;
232  if( SwUndoId::DELETE == mnUserId && mnUserId == rNext.mnUserId &&
233  m_bCanGroup == rNext.m_bCanGroup &&
234  m_bIsDelim == rNext.m_bIsDelim &&
235  m_bIsBackspace == rNext.m_bIsBackspace &&
236  m_nSttNode == m_nEndNode &&
237  rNext.m_nSttNode == m_nSttNode &&
238  rNext.m_nEndNode == m_nEndNode )
239  {
240  int bIsEnd = 0;
241  if( rNext.m_nSttContent == m_nEndContent )
242  bIsEnd = 1;
243  else if( rNext.m_nEndContent == m_nSttContent )
244  bIsEnd = -1;
245 
246  if( bIsEnd &&
247  (( !mpRedlSaveData && !rNext.mpRedlSaveData ) ||
248  ( mpRedlSaveData && rNext.mpRedlSaveData &&
250  *rNext.mpRedlSaveData, 1 != bIsEnd )
251  )))
252  {
253  if( 1 == bIsEnd )
255  else
257  bRet = true;
258  }
259  }
260  return bRet;
261 }
262 
264  const SwSortOptions& rOpt )
265  : SwUndoRedline( SwUndoId::SORT_TXT, rRange ),
266  m_pOpt( new SwSortOptions( rOpt ) ),
267  m_nSaveEndNode( m_nEndNode ), m_nSaveEndContent( m_nEndContent )
268 {
269 }
270 
272 {
273 }
274 
276 {
277  // rPam contains the sorted range
278  // aSaveRange contains copied (i.e. original) range
279 
280  SwPosition *const pStart = rPam.Start();
281  SwPosition *const pEnd = rPam.End();
282 
283  SwNodeIndex aPrevIdx( pStart->nNode, -1 );
284  sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
285 
287  {
288  // Search both Redline objects and make them visible to make the nodes
289  // consistent again. The 'delete' one is hidden, thus search for the
290  // 'insert' Redline object. The former is located directly after the latter.
292  *rDoc.GetNodes()[ m_nSttNode + 1 ],
293  RedlineType::Insert );
294  OSL_ENSURE( SwRedlineTable::npos != nFnd && nFnd+1 < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(),
295  "could not find an Insert object" );
296  ++nFnd;
297  rDoc.getIDocumentRedlineAccess().GetRedlineTable()[nFnd]->Show(1, nFnd);
298  }
299 
300  {
301  SwPaM aTmp( *rPam.GetMark() );
302  aTmp.GetMark()->nContent = 0;
303  aTmp.SetMark();
304  aTmp.GetPoint()->nNode = m_nSaveEndNode;
305  aTmp.GetPoint()->nContent.Assign( aTmp.GetContentNode(), m_nSaveEndContent );
306  rDoc.getIDocumentRedlineAccess().DeleteRedline( aTmp, true, RedlineType::Any );
307  }
308 
310 
311  SwPaM *const pPam = & rPam;
312  pPam->DeleteMark();
313  pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
314  SwContentNode* pCNd = pPam->GetContentNode();
315  pPam->GetPoint()->nContent.Assign(pCNd, 0 );
316  pPam->SetMark();
317 
318  pPam->GetPoint()->nNode += nOffsetTemp;
319  pCNd = pPam->GetContentNode();
320  pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
321 
322  SetValues( *pPam );
323 
324  SetPaM(rPam);
325 }
326 
328 {
329  SwPaM* pPam = &rPam;
330  SwPosition* pStart = pPam->Start();
331  SwPosition* pEnd = pPam->End();
332 
333  SwNodeIndex aPrevIdx( pStart->nNode, -1 );
334  sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
335  const sal_Int32 nCntStt = pStart->nContent.GetIndex();
336 
337  rDoc.SortText(rPam, *m_pOpt);
338 
339  pPam->DeleteMark();
340  pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
341  SwContentNode* pCNd = pPam->GetContentNode();
342  sal_Int32 nLen = pCNd->Len();
343  if( nLen > nCntStt )
344  nLen = nCntStt;
345  pPam->GetPoint()->nContent.Assign(pCNd, nLen );
346  pPam->SetMark();
347 
348  pPam->GetPoint()->nNode += nOffsetTemp;
349  pCNd = pPam->GetContentNode();
350  pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
351 
352  SetValues( rPam );
353 
354  SetPaM( rPam );
355  rPam.GetPoint()->nNode = m_nSaveEndNode;
357 }
358 
360 {
361  rContext.GetDoc().SortText( rContext.GetRepeatPaM(), *m_pOpt );
362 }
363 
365 {
366  const SwPosition& rPos = *rRange.End();
367  m_nSaveEndNode = rPos.nNode.GetIndex();
369 }
370 
373 {
374 }
375 
377 {
378  rDoc.getIDocumentRedlineAccess().AcceptRedline(rPam, false);
379 }
380 
382 {
383  rContext.GetDoc().getIDocumentRedlineAccess().AcceptRedline(rContext.GetRepeatPaM(), true);
384 }
385 
388 {
389 }
390 
392 {
393  rDoc.getIDocumentRedlineAccess().RejectRedline(rPam, false);
394 }
395 
397 {
398  rContext.GetDoc().getIDocumentRedlineAccess().RejectRedline(rContext.GetRepeatPaM(), true);
399 }
400 
401 SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, bool bIns )
402  : SwUndo( SwUndoId::COMPAREDOC, &rRg.GetDoc() ), SwUndRng( rRg ),
403  m_bInsert( bIns )
404 {
405  SwDoc& rDoc = rRg.GetDoc();
407  {
408  RedlineType eTyp = m_bInsert ? RedlineType::Insert : RedlineType::Delete;
411  }
412 }
413 
415  : SwUndo( SwUndoId::COMPAREDOC, &rRedl.GetDoc() ), SwUndRng( rRedl ),
416  // for MergeDoc the corresponding inverse is needed
417  m_bInsert( RedlineType::Delete == rRedl.GetType() )
418 {
419  SwDoc& rDoc = rRedl.GetDoc();
421  {
422  m_pRedlineData.reset( new SwRedlineData( rRedl.GetRedlineData() ) );
424  }
425 
427  if( !FillSaveData( rRedl, *m_pRedlineSaveDatas, false ))
428  {
429  m_pRedlineSaveDatas.reset();
430  }
431 }
432 
434 {
435  m_pRedlineData.reset();
436  m_pUndoDelete.reset();
437  m_pUndoDelete2.reset();
438  m_pRedlineSaveDatas.reset();
439 }
440 
442 {
443  SwDoc& rDoc = rContext.GetDoc();
444  SwPaM& rPam(AddUndoRedoPaM(rContext));
445 
446  if( !m_bInsert )
447  {
448  // delete Redlines
451 
452  rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
453 
455 
456  // per definition Point is end (in SwUndRng!)
457  SwContentNode* pCSttNd = rPam.GetContentNode(false);
458  SwContentNode* pCEndNd = rPam.GetContentNode();
459 
460  // if start- and end-content is zero, then the doc-compare moves
461  // complete nodes into the current doc. And then the selection
462  // must be from end to start, so the delete join into the right
463  // direction.
464  if( !m_nSttContent && !m_nEndContent )
465  rPam.Exchange();
466 
467  bool bJoinText, bJoinPrev;
468  sw_GetJoinFlags(rPam, bJoinText, bJoinPrev);
469 
470  m_pUndoDelete.reset( new SwUndoDelete(rPam, false) );
471 
472  if( bJoinText )
473  sw_JoinText(rPam, bJoinPrev);
474 
475  if( pCSttNd && !pCEndNd)
476  {
477  // #112139# Do not step behind the end of content.
478  SwNode & rTmp = rPam.GetNode();
479  SwNode * pEnd = rDoc.GetNodes().DocumentSectionEndNode(&rTmp);
480 
481  if (&rTmp != pEnd)
482  {
483  rPam.SetMark();
484  ++rPam.GetPoint()->nNode;
485  rPam.GetBound().nContent.Assign( nullptr, 0 );
486  rPam.GetBound( false ).nContent.Assign( nullptr, 0 );
487  m_pUndoDelete2.reset( new SwUndoDelete(rPam, true) );
488  }
489  }
490  rPam.DeleteMark();
491  }
492  else
493  {
495  {
496  rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
497 
498  if( m_pRedlineSaveDatas )
500  }
501  SetPaM(rPam, true);
502  }
503 }
504 
506 {
507  SwDoc& rDoc = rContext.GetDoc();
508 
509  if( m_bInsert )
510  {
511  SwPaM& rPam(AddUndoRedoPaM(rContext));
513  {
514  SwRangeRedline* pTmp = new SwRangeRedline(*m_pRedlineData, rPam);
517  }
518  else if( !( RedlineFlags::Ignore & GetRedlineFlags() ) &&
520  {
522  }
523  SetPaM(rPam, true);
524  }
525  else
526  {
527  if( m_pUndoDelete2 )
528  {
529  m_pUndoDelete2->UndoImpl(rContext);
530  m_pUndoDelete2.reset();
531  }
532  m_pUndoDelete->UndoImpl(rContext);
533  m_pUndoDelete.reset();
534 
535  // note: don't call SetPaM before executing Undo of members
536  SwPaM& rPam(AddUndoRedoPaM(rContext));
537 
538  SwRangeRedline* pTmp = new SwRangeRedline(*m_pRedlineData, rPam);
541 
542  SetPaM(rPam, true);
543  }
544 }
545 
546 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 GetRedlSaveCount() const
Definition: unredln.cxx:83
SwPaM & AddUndoRedoPaM(::sw::UndoRedoContext &, bool const bCorrToContent=false) const
Definition: undobj.cxx:108
virtual sal_Int32 Len() const
Definition: node.cxx:1225
void DeleteMark()
Definition: pam.hxx:177
sal_uLong GetIndex() const
Definition: node.hxx:290
SwNode & GetNode(bool bPoint=true) const
Definition: pam.hxx:223
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unredln.cxx:396
void Show(sal_uInt16 nLoop, size_t nMyPos, bool bForced=false)
Definition: docredln.cxx:1110
Marks a position in the document model.
Definition: pam.hxx:35
void UpdateFramesForAddDeleteRedline(SwDoc &rDoc, SwPaM const &rPam)
virtual ~SwUndoRedline() override
Definition: unredln.cxx:77
std::unique_ptr< SwRedlineSaveDatas > m_pRedlineSaveDatas
const OUString & GetText() const
Definition: ndtxt.hxx:211
std::unique_ptr< SwRedlineSaveDatas > mpRedlSaveData
Definition: UndoRedline.hxx:36
SwUndoId
Definition: swundo.hxx:29
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unredln.cxx:441
virtual AppendResult AppendRedline(SwRangeRedline *pNewRedl, bool bCallDelete)=0
Append a new redline.
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
SwNodeIndex nNode
Definition: pam.hxx:37
virtual void RedoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:220
sal_uIntPtr sal_uLong
SwPaM & GetRepeatPaM()
Definition: UndoCore.hxx:128
virtual ~SwUndoRedlineSort() override
Definition: unredln.cxx:271
const SwPosition * GetMark() const
Definition: pam.hxx:209
sal_uLong m_nEndNode
Definition: undobj.hxx:229
Definition: doc.hxx:184
std::unique_ptr< SwSortOptions > m_pOpt
Definition: UndoRedline.hxx:80
virtual ~SwUndoCompDoc() override
Definition: unredln.cxx:433
void SetRedlineFlags(RedlineFlags eMode)
Definition: undobj.hxx:120
SwNode & GetNode() const
Definition: ndindex.hxx:119
SwNode * DocumentSectionEndNode(SwNode *pNode) const
Definition: nodes.cxx:2315
SwPosition & GetBound(bool bOne=true)
Definition: pam.hxx:245
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:315
SwUndoCompDoc(const SwPaM &rRg, bool bIns)
Definition: unredln.cxx:401
void SetRedlineText(const OUString &rText)
Definition: unredln.cxx:210
std::unique_ptr< SwRedlineData > m_pRedlineData
size_type size() const
Definition: docary.hxx:266
void SetValues(const SwPaM &rPam)
Definition: undobj.cxx:58
SwContentNode * GetContentNode(bool bPoint=true) const
Definition: pam.hxx:229
#define CH_TXTATR_BREAKWORD
Definition: hintids.hxx:170
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
sal_uInt16 sal_Unicode
#define CH_TXTATR_INWORD
Definition: hintids.hxx:171
SwUndoRedline(SwUndoId nUserId, const SwPaM &rRange)
Definition: unredln.cxx:37
bool mbHiddenRedlines
Definition: UndoRedline.hxx:38
SwIndex nContent
Definition: pam.hxx:38
bool empty() const
Definition: docary.hxx:265
static bool IsRedlineOn(const RedlineFlags eM)
SwDoc & GetDoc() const
Definition: UndoCore.hxx:126
sal_uLong GetIndex() const
Definition: ndindex.hxx:152
virtual void RedoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:391
static bool CanRedlineGroup(SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd)
Definition: undobj.cxx:1491
bool CanGrouping(const SwUndoRedlineDelete &rPrev)
Definition: unredln.cxx:229
RedlineFlags on.
SwDoc & GetDoc() const
Definition: UndoCore.hxx:94
RedlineFlags GetRedlineFlags() const
Definition: undobj.hxx:119
bool sw_JoinText(SwPaM &rPam, bool bJoinPrev)
Definition: docedt.cxx:358
const SwRedlineData & GetRedlineData(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1775
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unredln.cxx:381
virtual std::size_t GetRedlineAuthor()=0
void InvalidateRange(Invalidation)
Initiate the layout.
Definition: docredln.cxx:1243
bool SortText(const SwPaM &, const SwSortOptions &)
Sort Text in the Document.
Definition: docsort.cxx:285
OUString GetText() const
Definition: pam.cxx:1069
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
virtual SwRedlineTable::size_type GetRedlinePos(const SwNode &rNode, RedlineType nType) const =0
size_type GetPos(const SwRangeRedline *p) const
Definition: docredln.cxx:592
void SetSaveRange(const SwPaM &rRange)
Definition: unredln.cxx:364
static bool HasHiddenRedlines(const SwRedlineSaveDatas &rSData)
Definition: undobj.cxx:1483
const SwPosition * GetPoint() const
Definition: pam.hxx:207
OUString DenoteSpecialCharacters(const OUString &rStr, bool bQuoted=true)
Denotes special characters in a string.
Definition: undel.cxx:717
SwIndex & Assign(SwIndexReg *, sal_Int32)
Definition: index.cxx:206
OUString Apply(const OUString &rStr) const
Definition: SwRewriter.cxx:43
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unredln.cxx:505
SwUndoRedlineDelete(const SwPaM &rRange, SwUndoId nUserId)
Definition: unredln.cxx:174
static void SetSaveData(SwDoc &rDoc, SwRedlineSaveDatas &rSData)
Definition: undobj.cxx:1464
void Exchange()
Definition: pam.cxx:489
virtual bool DeleteRedline(const SwPaM &rPam, bool bSaveInUndo, RedlineType nDelType)=0
vector_type::size_type size_type
Definition: docary.hxx:228
sal_Int32 m_nEndContent
Definition: undobj.hxx:230
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unredln.cxx:88
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:29
virtual void RedoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:327
Marks a node in the document model.
Definition: ndindex.hxx:31
bool m_bCacheComment
Definition: undobj.hxx:61
std::unique_ptr< SwRedlineData > mpRedlData
Definition: UndoRedline.hxx:35
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
SwUndoRejectRedline(const SwPaM &rRange)
Definition: unredln.cxx:386
SwUndoRedlineSort(const SwPaM &rRange, const SwSortOptions &rOpt)
Definition: unredln.cxx:263
show all deletes
const SwPosition * Start() const
Definition: pam.hxx:212
bool IsVisible() const
Definition: redline.hxx:188
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unredln.cxx:141
void SetMark(const sw::mark::IMark *pMark)
Definition: index.cxx:222
std::unique_ptr< SwUndoDelete > m_pUndoDelete
virtual const SwRangeRedline * GetRedline(const SwPosition &rPos, SwRedlineTable::size_type *pFndPos) const =0
sal_uLong m_nSttNode
Definition: undobj.hxx:229
ignore Redlines
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:80
virtual bool SplitRedline(const SwPaM &rPam)=0
SwUndoAcceptRedline(const SwPaM &rRange)
Definition: unredln.cxx:371
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:335
virtual void RedoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:376
void SetPaM(SwPaM &, bool bCorrToContent=false) const
Definition: undobj.cxx:80
void UpdateFramesForRemoveDeleteRedline(SwDoc &rDoc, SwPaM const &rPam)
OUString ShortenString(const OUString &rStr, sal_Int32 nLength, const OUString &rFillStr)
Shortens a string to a maximum length.
Definition: undobj.cxx:1523
SwUndoId mnUserId
Definition: UndoRedline.hxx:37
virtual bool DelFullPara(SwPaM &)=0
Delete full paragraphs.
sal_Int32 GetIndex() const
Definition: index.hxx:91
virtual bool IsRedlineOn() const =0
Query if redlining is on.
SwNodes & GetNodes()
Definition: doc.hxx:403
const SwPosition * End() const
Definition: pam.hxx:217
virtual void RedoRedlineImpl(SwDoc &rDoc, SwPaM &rPam)
Definition: unredln.cxx:169
sal_uLong m_nSaveEndNode
Definition: UndoRedline.hxx:81
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
SwDoc & GetDoc() const
Definition: pam.hxx:243
virtual bool AcceptRedline(SwRedlineTable::size_type nPos, bool bCallDelete)=0
void sw_GetJoinFlags(SwPaM &rPam, bool &rJoinText, bool &rJoinPrev)
Definition: docedt.cxx:327
RedlineType
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
Definition: pam.cxx:475
static bool FillSaveData(const SwPaM &rRange, SwRedlineSaveDatas &rSData, bool bDelRange=true, bool bCopyNext=true)
Definition: undobj.cxx:1399
virtual bool RejectRedline(SwRedlineTable::size_type nPos, bool bCallDelete)=0
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: unredln.cxx:198
virtual const SwRedlineTable & GetRedlineTable() const =0
bool Insert(SwRangeRedline *&p)
Definition: docredln.cxx:422
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
Definition: ndarr.hxx:161
std::unique_ptr< SwUndoDelete > m_pUndoDelete2
virtual void UndoRedlineImpl(SwDoc &rDoc, SwPaM &rPam)
Definition: unredln.cxx:164
CharClass & GetAppCharClass()
Definition: init.cxx:708
static constexpr size_type npos
Definition: docary.hxx:229
aStr
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unredln.cxx:359
sal_Int32 m_nSaveEndContent
Definition: UndoRedline.hxx:82
sal_Int32 m_nSttContent
Definition: undobj.hxx:230
const int nUndoStringLength
Definition: UndoCore.hxx:224
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:844
virtual void UndoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:275
SwNodeIndex & Assign(SwNodes const &rNds, sal_uLong)
Definition: ndindex.hxx:272
Base class of the Writer document model elements.
Definition: node.hxx:79
virtual void UndoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:215