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 <rolbck.hxx>
33 #include <redline.hxx>
34 #include <docary.hxx>
35 #include <sortopt.hxx>
36 #include <docedt.hxx>
37 
39  : SwUndo( SwUndoId::REDLINE, rRange.GetDoc() ), SwUndRng( rRange ),
40  mnUserId( nUsrId ),
41  mbHiddenRedlines( false )
42 {
43  // consider Redline
44  SwDoc& rDoc = *rRange.GetDoc();
46  {
47  switch( mnUserId )
48  {
49  case SwUndoId::DELETE:
50  case SwUndoId::REPLACE:
52  break;
53  default:
54  ;
55  }
57  }
58 
59  sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
60 
63  {
64  mpRedlSaveData.reset();
65  }
66  else
67  {
69  if( mbHiddenRedlines ) // then the NodeIndices of SwUndRng need to be corrected
70  {
71  nEndExtra -= rDoc.GetNodes().GetEndOfExtras().GetIndex();
72  nSttNode -= nEndExtra;
73  nEndNode -= nEndExtra;
74  }
75  }
76 }
77 
79 {
80  mpRedlData.reset();
81  mpRedlSaveData.reset();
82 }
83 
85 {
86  return mpRedlSaveData ? mpRedlSaveData->size() : 0;
87 }
88 
90 {
91  SwDoc& rDoc = rContext.GetDoc();
92  SwPaM& rPam(AddUndoRedoPaM(rContext));
93 
94  UndoRedlineImpl(rDoc, rPam);
95 
96  if( mpRedlSaveData )
97  {
98  sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
100  if( mbHiddenRedlines )
101  {
102  mpRedlSaveData->clear();
103 
104  nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex() - nEndExtra;
105  nSttNode += nEndExtra;
106  nEndNode += nEndExtra;
107  }
108  SetPaM(rPam, true);
109  }
110 
111  // update frames after calling SetSaveData
112  if (dynamic_cast<SwUndoRedlineDelete*>(this))
113  {
115  }
116  else if (dynamic_cast<SwUndoAcceptRedline*>(this)
117  || dynamic_cast<SwUndoRejectRedline*>(this))
118  { // (can't check here if there's a delete redline being accepted)
120  }
121 }
122 
124 {
125  SwDoc& rDoc = rContext.GetDoc();
128 
129  SwPaM & rPam( AddUndoRedoPaM(rContext) );
131  {
132  sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
134 
135  nEndExtra -= rDoc.GetNodes().GetEndOfExtras().GetIndex();
136  nSttNode -= nEndExtra;
137  nEndNode -= nEndExtra;
138  }
139 
140  RedoRedlineImpl(rDoc, rPam);
141 
142  SetPaM(rPam, true);
144 }
145 
147 {
148 }
149 
150 // default: remove redlines
152 {
154 }
155 
157  : SwUndoRedline( nUsrId != SwUndoId::EMPTY ? nUsrId : SwUndoId::DELETE, rRange ),
158  bCanGroup( false ), bIsDelim( false ), bIsBackspace( false )
159 {
160  const SwTextNode* pTNd;
161  SetRedlineText(rRange.GetText());
162  if( SwUndoId::DELETE == mnUserId &&
163  nSttNode == nEndNode && nSttContent + 1 == nEndContent &&
164  nullptr != (pTNd = rRange.GetNode().GetTextNode()) )
165  {
166  sal_Unicode const cCh = pTNd->GetText()[nSttContent];
167  if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
168  {
169  bCanGroup = true;
171  nSttContent );
173  }
174  }
175 
176  bCacheComment = false;
177 }
178 
179 // bit of a hack, replace everything...
181 {
182  SwRewriter aResult;
184  aStr = ShortenString(aStr, nUndoStringLength, SwResId(STR_LDOTS));
185  SwRewriter aRewriter;
186  aRewriter.AddRule(UndoArg1, aStr);
187  OUString ret = aRewriter.Apply(SwResId(STR_UNDO_REDLINE_DELETE));
188  aResult.AddRule(UndoArg1, ret);
189  return aResult;
190 }
191 
192 void SwUndoRedlineDelete::SetRedlineText(const OUString & rText)
193 {
194  m_sRedlineText = rText;
195 }
196 
198 {
200 }
201 
203 {
204  if (rPam.GetPoint() != rPam.GetMark())
205  {
207  }
209 }
210 
212 {
213  bool bRet = false;
214  if( SwUndoId::DELETE == mnUserId && mnUserId == rNext.mnUserId &&
215  bCanGroup == rNext.bCanGroup &&
216  bIsDelim == rNext.bIsDelim &&
217  bIsBackspace == rNext.bIsBackspace &&
218  nSttNode == nEndNode &&
219  rNext.nSttNode == nSttNode &&
220  rNext.nEndNode == nEndNode )
221  {
222  int bIsEnd = 0;
223  if( rNext.nSttContent == nEndContent )
224  bIsEnd = 1;
225  else if( rNext.nEndContent == nSttContent )
226  bIsEnd = -1;
227 
228  if( bIsEnd &&
229  (( !mpRedlSaveData && !rNext.mpRedlSaveData ) ||
230  ( mpRedlSaveData && rNext.mpRedlSaveData &&
232  *rNext.mpRedlSaveData, 1 != bIsEnd )
233  )))
234  {
235  if( 1 == bIsEnd )
236  nEndContent = rNext.nEndContent;
237  else
238  nSttContent = rNext.nSttContent;
239  bRet = true;
240  }
241  }
242  return bRet;
243 }
244 
246  const SwSortOptions& rOpt )
247  : SwUndoRedline( SwUndoId::SORT_TXT, rRange ),
248  pOpt( new SwSortOptions( rOpt ) ),
249  nSaveEndNode( nEndNode ), nSaveEndContent( nEndContent )
250 {
251 }
252 
254 {
255 }
256 
258 {
259  // rPam contains the sorted range
260  // aSaveRange contains copied (i.e. original) range
261 
262  SwPosition *const pStart = rPam.Start();
263  SwPosition *const pEnd = rPam.End();
264 
265  SwNodeIndex aPrevIdx( pStart->nNode, -1 );
266  sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
267 
269  {
270  // Search both Redline objects and make them visible to make the nodes
271  // consistent again. The 'delete' one is hidden, thus search for the
272  // 'insert' Redline object. The former is located directly after the latter.
274  *rDoc.GetNodes()[ nSttNode + 1 ],
276  OSL_ENSURE( SwRedlineTable::npos != nFnd && nFnd+1 < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(),
277  "could not find an Insert object" );
278  ++nFnd;
279  rDoc.getIDocumentRedlineAccess().GetRedlineTable()[nFnd]->Show(1, nFnd);
280  }
281 
282  {
283  SwPaM aTmp( *rPam.GetMark() );
284  aTmp.GetMark()->nContent = 0;
285  aTmp.SetMark();
286  aTmp.GetPoint()->nNode = nSaveEndNode;
287  aTmp.GetPoint()->nContent.Assign( aTmp.GetContentNode(), nSaveEndContent );
289  }
290 
292 
293  SwPaM *const pPam = & rPam;
294  pPam->DeleteMark();
295  pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
296  SwContentNode* pCNd = pPam->GetContentNode();
297  pPam->GetPoint()->nContent.Assign(pCNd, 0 );
298  pPam->SetMark();
299 
300  pPam->GetPoint()->nNode += nOffsetTemp;
301  pCNd = pPam->GetContentNode();
302  pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
303 
304  SetValues( *pPam );
305 
306  SetPaM(rPam);
307 }
308 
310 {
311  SwPaM* pPam = &rPam;
312  SwPosition* pStart = pPam->Start();
313  SwPosition* pEnd = pPam->End();
314 
315  SwNodeIndex aPrevIdx( pStart->nNode, -1 );
316  sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
317  const sal_Int32 nCntStt = pStart->nContent.GetIndex();
318 
319  rDoc.SortText(rPam, *pOpt);
320 
321  pPam->DeleteMark();
322  pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
323  SwContentNode* pCNd = pPam->GetContentNode();
324  sal_Int32 nLen = pCNd->Len();
325  if( nLen > nCntStt )
326  nLen = nCntStt;
327  pPam->GetPoint()->nContent.Assign(pCNd, nLen );
328  pPam->SetMark();
329 
330  pPam->GetPoint()->nNode += nOffsetTemp;
331  pCNd = pPam->GetContentNode();
332  pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
333 
334  SetValues( rPam );
335 
336  SetPaM( rPam );
337  rPam.GetPoint()->nNode = nSaveEndNode;
339 }
340 
342 {
343  rContext.GetDoc().SortText( rContext.GetRepeatPaM(), *pOpt );
344 }
345 
347 {
348  const SwPosition& rPos = *rRange.End();
349  nSaveEndNode = rPos.nNode.GetIndex();
351 }
352 
355 {
356 }
357 
359 {
360  rDoc.getIDocumentRedlineAccess().AcceptRedline(rPam, false);
361 }
362 
364 {
365  rContext.GetDoc().getIDocumentRedlineAccess().AcceptRedline(rContext.GetRepeatPaM(), true);
366 }
367 
370 {
371 }
372 
374 {
375  rDoc.getIDocumentRedlineAccess().RejectRedline(rPam, false);
376 }
377 
379 {
380  rContext.GetDoc().getIDocumentRedlineAccess().RejectRedline(rContext.GetRepeatPaM(), true);
381 }
382 
383 SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, bool bIns )
384  : SwUndo( SwUndoId::COMPAREDOC, rRg.GetDoc() ), SwUndRng( rRg ),
385  bInsert( bIns )
386 {
387  SwDoc* pDoc = rRg.GetDoc();
388  if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
389  {
391  pRedlData.reset( new SwRedlineData( eTyp, pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) );
393  }
394 }
395 
397  : SwUndo( SwUndoId::COMPAREDOC, rRedl.GetDoc() ), SwUndRng( rRedl ),
398  // for MergeDoc the corresponding inverse is needed
399  bInsert( RedlineType::Delete == rRedl.GetType() )
400 {
401  SwDoc* pDoc = rRedl.GetDoc();
402  if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
403  {
404  pRedlData.reset( new SwRedlineData( rRedl.GetRedlineData() ) );
406  }
407 
408  pRedlSaveData.reset( new SwRedlineSaveDatas );
409  if( !FillSaveData( rRedl, *pRedlSaveData, false ))
410  {
411  pRedlSaveData.reset();
412  }
413 }
414 
416 {
417  pRedlData.reset();
418  pUnDel.reset();
419  pUnDel2.reset();
420  pRedlSaveData.reset();
421 }
422 
424 {
425  SwDoc& rDoc = rContext.GetDoc();
426  SwPaM& rPam(AddUndoRedoPaM(rContext));
427 
428  if( !bInsert )
429  {
430  // delete Redlines
433 
435 
437 
438  // per definition Point is end (in SwUndRng!)
439  SwContentNode* pCSttNd = rPam.GetContentNode(false);
440  SwContentNode* pCEndNd = rPam.GetContentNode();
441 
442  // if start- and end-content is zero, then the doc-compare moves
443  // complete nodes into the current doc. And then the selection
444  // must be from end to start, so the delete join into the right
445  // direction.
446  if( !nSttContent && !nEndContent )
447  rPam.Exchange();
448 
449  bool bJoinText, bJoinPrev;
450  sw_GetJoinFlags(rPam, bJoinText, bJoinPrev);
451 
452  pUnDel.reset( new SwUndoDelete(rPam, false) );
453 
454  if( bJoinText )
455  sw_JoinText(rPam, bJoinPrev);
456 
457  if( pCSttNd && !pCEndNd)
458  {
459  // #112139# Do not step behind the end of content.
460  SwNode & rTmp = rPam.GetNode();
461  SwNode * pEnd = rDoc.GetNodes().DocumentSectionEndNode(&rTmp);
462 
463  if (&rTmp != pEnd)
464  {
465  rPam.SetMark();
466  ++rPam.GetPoint()->nNode;
467  rPam.GetBound().nContent.Assign( nullptr, 0 );
468  rPam.GetBound( false ).nContent.Assign( nullptr, 0 );
469  pUnDel2.reset( new SwUndoDelete(rPam, true) );
470  }
471  }
472  rPam.DeleteMark();
473  }
474  else
475  {
477  {
479 
480  if( pRedlSaveData )
481  SetSaveData(rDoc, *pRedlSaveData);
482  }
483  SetPaM(rPam, true);
484  }
485 }
486 
488 {
489  SwDoc& rDoc = rContext.GetDoc();
490 
491  if( bInsert )
492  {
493  SwPaM& rPam(AddUndoRedoPaM(rContext));
495  {
496  SwRangeRedline* pTmp = new SwRangeRedline(*pRedlData, rPam);
499  }
500  else if( !( RedlineFlags::Ignore & GetRedlineFlags() ) &&
502  {
504  }
505  SetPaM(rPam, true);
506  }
507  else
508  {
509  if( pUnDel2 )
510  {
511  pUnDel2->UndoImpl(rContext);
512  pUnDel2.reset();
513  }
514  pUnDel->UndoImpl(rContext);
515  pUnDel.reset();
516 
517  // note: don't call SetPaM before executing Undo of members
518  SwPaM& rPam(AddUndoRedoPaM(rContext));
519 
520  SwRangeRedline* pTmp = new SwRangeRedline(*pRedlData, rPam);
523 
524  SetPaM(rPam, true);
525  }
526 }
527 
528 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 GetRedlSaveCount() const
Definition: unredln.cxx:84
SwPaM & AddUndoRedoPaM(::sw::UndoRedoContext &, bool const bCorrToContent=false) const
Definition: undobj.cxx:106
virtual sal_Int32 Len() const
Definition: node.cxx:1183
void DeleteMark()
Definition: pam.hxx:177
sal_uLong GetIndex() const
Definition: node.hxx:282
SwNode & GetNode(bool bPoint=true) const
Definition: pam.hxx:223
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unredln.cxx:378
Marks a position in the document model.
Definition: pam.hxx:35
void UpdateFramesForAddDeleteRedline(SwDoc &rDoc, SwPaM const &rPam)
virtual ~SwUndoRedline() override
Definition: unredln.cxx:78
sal_Int32 nSttContent
Definition: undobj.hxx:217
const OUString & GetText() const
Definition: ndtxt.hxx:211
std::unique_ptr< SwRedlineSaveDatas > mpRedlSaveData
Definition: UndoRedline.hxx:35
SwUndoId
Definition: swundo.hxx:29
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unredln.cxx:423
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
sal_uLong nSaveEndNode
Definition: UndoRedline.hxx:80
virtual void RedoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:202
sal_uIntPtr sal_uLong
SwPaM & GetRepeatPaM()
Definition: UndoCore.hxx:128
virtual ~SwUndoRedlineSort() override
Definition: unredln.cxx:253
const SwPosition * GetMark() const
Definition: pam.hxx:209
Definition: doc.hxx:185
virtual ~SwUndoCompDoc() override
Definition: unredln.cxx:415
std::unique_ptr< SwRedlineData > pRedlData
bool bCacheComment
Definition: undobj.hxx:59
void SetRedlineFlags(RedlineFlags eMode)
Definition: undobj.hxx:118
std::unique_ptr< SwRedlineSaveDatas > pRedlSaveData
SwNode & GetNode() const
Definition: ndindex.hxx:118
SwNode * DocumentSectionEndNode(SwNode *pNode) const
Definition: nodes.cxx:2331
SwPosition & GetBound(bool bOne=true)
Definition: pam.hxx:245
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:347
SwUndoCompDoc(const SwPaM &rRg, bool bIns)
Definition: unredln.cxx:383
void SetRedlineText(const OUString &rText)
Definition: unredln.cxx:192
sal_uLong nEndNode
Definition: undobj.hxx:216
size_type size() const
Definition: docary.hxx:368
void SetValues(const SwPaM &rPam)
Definition: undobj.cxx:56
SwContentNode * GetContentNode(bool bPoint=true) const
Definition: pam.hxx:229
#define CH_TXTATR_BREAKWORD
Definition: hintids.hxx:43
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
sal_uInt16 sal_Unicode
#define CH_TXTATR_INWORD
Definition: hintids.hxx:44
SwUndoRedline(SwUndoId nUserId, const SwPaM &rRange)
Definition: unredln.cxx:38
bool mbHiddenRedlines
Definition: UndoRedline.hxx:37
SwIndex nContent
Definition: pam.hxx:38
bool empty() const
Definition: docary.hxx:367
static bool IsRedlineOn(const RedlineFlags eM)
SwDoc & GetDoc() const
Definition: UndoCore.hxx:126
sal_uLong GetIndex() const
Definition: ndindex.hxx:151
std::unique_ptr< SwUndoDelete > pUnDel2
virtual void RedoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:373
static bool CanRedlineGroup(SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd)
Definition: undobj.cxx:1473
bool CanGrouping(const SwUndoRedlineDelete &rPrev)
Definition: unredln.cxx:211
RedlineFlags on.
SwDoc & GetDoc() const
Definition: UndoCore.hxx:94
RedlineFlags GetRedlineFlags() const
Definition: undobj.hxx:117
bool sw_JoinText(SwPaM &rPam, bool bJoinPrev)
Definition: docedt.cxx:339
const SwRedlineData & GetRedlineData(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1731
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unredln.cxx:363
virtual std::size_t GetRedlineAuthor()=0
void InvalidateRange(Invalidation)
Initiate the layout.
Definition: docredln.cxx:1199
bool SortText(const SwPaM &, const SwSortOptions &)
Sort Text in the Document.
Definition: docsort.cxx:292
OUString GetText() const
Definition: pam.cxx:1009
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
void SetSaveRange(const SwPaM &rRange)
Definition: unredln.cxx:346
static bool HasHiddenRedlines(const SwRedlineSaveDatas &rSData)
Definition: undobj.cxx:1465
const SwPosition * GetPoint() const
Definition: pam.hxx:207
SwIndex & Assign(SwIndexReg *, sal_Int32)
Definition: index.cxx:198
OUString Apply(const OUString &rStr) const
Definition: SwRewriter.cxx:43
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unredln.cxx:487
SwUndoRedlineDelete(const SwPaM &rRange, SwUndoId nUserId)
Definition: unredln.cxx:156
static void SetSaveData(SwDoc &rDoc, SwRedlineSaveDatas &rSData)
Definition: undobj.cxx:1446
void Exchange()
Definition: pam.cxx:471
virtual bool DeleteRedline(const SwPaM &rPam, bool bSaveInUndo, RedlineType nDelType)=0
vector_type::size_type size_type
Definition: docary.hxx:330
SwDoc * GetDoc() const
Definition: pam.hxx:243
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unredln.cxx:89
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:29
sal_uLong nSttNode
Definition: undobj.hxx:216
std::unique_ptr< SwSortOptions > pOpt
Definition: UndoRedline.hxx:79
virtual void RedoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:309
Marks a node in the document model.
Definition: ndindex.hxx:31
std::unique_ptr< SwRedlineData > mpRedlData
Definition: UndoRedline.hxx:34
OUString SwResId(const char *pId)
Definition: swmodule.cxx:191
SwUndoRejectRedline(const SwPaM &rRange)
Definition: unredln.cxx:368
SwUndoRedlineSort(const SwPaM &rRange, const SwSortOptions &rOpt)
Definition: unredln.cxx:245
sal_Int32 nEndContent
Definition: undobj.hxx:217
show all deletes
const SwPosition * Start() const
Definition: pam.hxx:212
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unredln.cxx:123
void SetMark(const sw::mark::IMark *pMark)
Definition: index.cxx:214
ignore Redlines
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
virtual bool SplitRedline(const SwPaM &rPam)=0
SwUndoId const mnUserId
Definition: UndoRedline.hxx:36
SwUndoAcceptRedline(const SwPaM &rRange)
Definition: unredln.cxx:353
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:367
virtual void RedoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:358
void SetPaM(SwPaM &, bool bCorrToContent=false) const
Definition: undobj.cxx:78
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:1505
sal_Int32 nSaveEndContent
Definition: UndoRedline.hxx:81
virtual bool DelFullPara(SwPaM &)=0
Delete full paragraphs.
bool const bInsert
sal_Int32 GetIndex() const
Definition: index.hxx:95
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:151
std::unique_ptr< SwUndoDelete > pUnDel
OUString DenoteSpecialCharacters(const OUString &rStr)
Denotes special characters in a string.
Definition: undel.cxx:706
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
virtual bool AcceptRedline(SwRedlineTable::size_type nPos, bool bCallDelete)=0
void sw_GetJoinFlags(SwPaM &rPam, bool &rJoinText, bool &rJoinPrev)
Definition: docedt.cxx:308
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
Definition: pam.cxx:457
static bool FillSaveData(const SwPaM &rRange, SwRedlineSaveDatas &rSData, bool bDelRange=true, bool bCopyNext=true)
Definition: undobj.cxx:1381
virtual bool RejectRedline(SwRedlineTable::size_type nPos, bool bCallDelete)=0
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: unredln.cxx:180
virtual const SwRedlineTable & GetRedlineTable() const =0
bool Insert(SwRangeRedline *&p)
Definition: docredln.cxx:425
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
Definition: ndarr.hxx:162
virtual void UndoRedlineImpl(SwDoc &rDoc, SwPaM &rPam)
Definition: unredln.cxx:146
CharClass & GetAppCharClass()
Definition: init.cxx:751
static constexpr size_type npos
Definition: docary.hxx:331
aStr
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unredln.cxx:341
const int nUndoStringLength
Definition: UndoCore.hxx:225
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:843
virtual void UndoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:257
SwNodeIndex & Assign(SwNodes const &rNds, sal_uLong)
Definition: ndindex.hxx:271
Base class of the Writer document model elements.
Definition: node.hxx:79
virtual void UndoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:197