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  UndoRedlineImpl(rDoc, rPam);
94 
95  if( mpRedlSaveData )
96  {
97  sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
99  if( mbHiddenRedlines )
100  {
101  mpRedlSaveData->clear();
102 
103  nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex() - nEndExtra;
104  m_nSttNode += nEndExtra;
105  m_nEndNode += nEndExtra;
106  }
107  SetPaM(rPam, true);
108  }
109 
110  // update frames after calling SetSaveData
111  if (dynamic_cast<SwUndoRedlineDelete*>(this))
112  {
114  }
115  else if (dynamic_cast<SwUndoAcceptRedline*>(this)
116  || dynamic_cast<SwUndoRejectRedline*>(this))
117  { // (can't check here if there's a delete redline being accepted)
119  }
120 }
121 
123 {
124  SwDoc& rDoc = rContext.GetDoc();
127 
128  SwPaM & rPam( AddUndoRedoPaM(rContext) );
130  {
131  sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
133 
134  nEndExtra -= rDoc.GetNodes().GetEndOfExtras().GetIndex();
135  m_nSttNode -= nEndExtra;
136  m_nEndNode -= nEndExtra;
137  }
138 
139  RedoRedlineImpl(rDoc, rPam);
140 
141  SetPaM(rPam, true);
143 }
144 
146 {
147 }
148 
149 // default: remove redlines
151 {
152  rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
153 }
154 
156  : SwUndoRedline( nUsrId != SwUndoId::EMPTY ? nUsrId : SwUndoId::DELETE, rRange ),
157  m_bCanGroup( false ), m_bIsDelim( false ), m_bIsBackspace( false )
158 {
159  const SwTextNode* pTNd;
160  SetRedlineText(rRange.GetText());
161  if( SwUndoId::DELETE == mnUserId &&
163  nullptr != (pTNd = rRange.GetNode().GetTextNode()) )
164  {
165  sal_Unicode const cCh = pTNd->GetText()[m_nSttContent];
166  if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
167  {
168  m_bCanGroup = true;
170  m_nSttContent );
172  }
173  }
174 
175  m_bCacheComment = false;
176 }
177 
178 // bit of a hack, replace everything...
180 {
181  SwRewriter aResult;
183  aStr = ShortenString(aStr, nUndoStringLength, SwResId(STR_LDOTS));
184  SwRewriter aRewriter;
185  aRewriter.AddRule(UndoArg1, aStr);
186  OUString ret = aRewriter.Apply(SwResId(STR_UNDO_REDLINE_DELETE));
187  aResult.AddRule(UndoArg1, ret);
188  return aResult;
189 }
190 
191 void SwUndoRedlineDelete::SetRedlineText(const OUString & rText)
192 {
193  m_sRedlineText = rText;
194 }
195 
197 {
198  rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
199 }
200 
202 {
203  if (rPam.GetPoint() != rPam.GetMark())
204  {
206  }
208 }
209 
211 {
212  bool bRet = false;
213  if( SwUndoId::DELETE == mnUserId && mnUserId == rNext.mnUserId &&
214  m_bCanGroup == rNext.m_bCanGroup &&
215  m_bIsDelim == rNext.m_bIsDelim &&
216  m_bIsBackspace == rNext.m_bIsBackspace &&
217  m_nSttNode == m_nEndNode &&
218  rNext.m_nSttNode == m_nSttNode &&
219  rNext.m_nEndNode == m_nEndNode )
220  {
221  int bIsEnd = 0;
222  if( rNext.m_nSttContent == m_nEndContent )
223  bIsEnd = 1;
224  else if( rNext.m_nEndContent == m_nSttContent )
225  bIsEnd = -1;
226 
227  if( bIsEnd &&
228  (( !mpRedlSaveData && !rNext.mpRedlSaveData ) ||
229  ( mpRedlSaveData && rNext.mpRedlSaveData &&
231  *rNext.mpRedlSaveData, 1 != bIsEnd )
232  )))
233  {
234  if( 1 == bIsEnd )
236  else
238  bRet = true;
239  }
240  }
241  return bRet;
242 }
243 
245  const SwSortOptions& rOpt )
246  : SwUndoRedline( SwUndoId::SORT_TXT, rRange ),
247  m_pOpt( new SwSortOptions( rOpt ) ),
248  m_nSaveEndNode( m_nEndNode ), m_nSaveEndContent( m_nEndContent )
249 {
250 }
251 
253 {
254 }
255 
257 {
258  // rPam contains the sorted range
259  // aSaveRange contains copied (i.e. original) range
260 
261  SwPosition *const pStart = rPam.Start();
262  SwPosition *const pEnd = rPam.End();
263 
264  SwNodeIndex aPrevIdx( pStart->nNode, -1 );
265  sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
266 
268  {
269  // Search both Redline objects and make them visible to make the nodes
270  // consistent again. The 'delete' one is hidden, thus search for the
271  // 'insert' Redline object. The former is located directly after the latter.
273  *rDoc.GetNodes()[ m_nSttNode + 1 ],
274  RedlineType::Insert );
275  OSL_ENSURE( SwRedlineTable::npos != nFnd && nFnd+1 < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(),
276  "could not find an Insert object" );
277  ++nFnd;
278  rDoc.getIDocumentRedlineAccess().GetRedlineTable()[nFnd]->Show(1, nFnd);
279  }
280 
281  {
282  SwPaM aTmp( *rPam.GetMark() );
283  aTmp.GetMark()->nContent = 0;
284  aTmp.SetMark();
285  aTmp.GetPoint()->nNode = m_nSaveEndNode;
286  aTmp.GetPoint()->nContent.Assign( aTmp.GetContentNode(), m_nSaveEndContent );
287  rDoc.getIDocumentRedlineAccess().DeleteRedline( aTmp, true, RedlineType::Any );
288  }
289 
291 
292  SwPaM *const pPam = & rPam;
293  pPam->DeleteMark();
294  pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
295  SwContentNode* pCNd = pPam->GetContentNode();
296  pPam->GetPoint()->nContent.Assign(pCNd, 0 );
297  pPam->SetMark();
298 
299  pPam->GetPoint()->nNode += nOffsetTemp;
300  pCNd = pPam->GetContentNode();
301  pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
302 
303  SetValues( *pPam );
304 
305  SetPaM(rPam);
306 }
307 
309 {
310  SwPaM* pPam = &rPam;
311  SwPosition* pStart = pPam->Start();
312  SwPosition* pEnd = pPam->End();
313 
314  SwNodeIndex aPrevIdx( pStart->nNode, -1 );
315  sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
316  const sal_Int32 nCntStt = pStart->nContent.GetIndex();
317 
318  rDoc.SortText(rPam, *m_pOpt);
319 
320  pPam->DeleteMark();
321  pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
322  SwContentNode* pCNd = pPam->GetContentNode();
323  sal_Int32 nLen = pCNd->Len();
324  if( nLen > nCntStt )
325  nLen = nCntStt;
326  pPam->GetPoint()->nContent.Assign(pCNd, nLen );
327  pPam->SetMark();
328 
329  pPam->GetPoint()->nNode += nOffsetTemp;
330  pCNd = pPam->GetContentNode();
331  pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
332 
333  SetValues( rPam );
334 
335  SetPaM( rPam );
336  rPam.GetPoint()->nNode = m_nSaveEndNode;
338 }
339 
341 {
342  rContext.GetDoc().SortText( rContext.GetRepeatPaM(), *m_pOpt );
343 }
344 
346 {
347  const SwPosition& rPos = *rRange.End();
348  m_nSaveEndNode = rPos.nNode.GetIndex();
350 }
351 
354 {
355 }
356 
358 {
359  rDoc.getIDocumentRedlineAccess().AcceptRedline(rPam, false);
360 }
361 
363 {
364  rContext.GetDoc().getIDocumentRedlineAccess().AcceptRedline(rContext.GetRepeatPaM(), true);
365 }
366 
369 {
370 }
371 
373 {
374  rDoc.getIDocumentRedlineAccess().RejectRedline(rPam, false);
375 }
376 
378 {
379  rContext.GetDoc().getIDocumentRedlineAccess().RejectRedline(rContext.GetRepeatPaM(), true);
380 }
381 
382 SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, bool bIns )
383  : SwUndo( SwUndoId::COMPAREDOC, rRg.GetDoc() ), SwUndRng( rRg ),
384  m_bInsert( bIns )
385 {
386  SwDoc* pDoc = rRg.GetDoc();
387  if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
388  {
389  RedlineType eTyp = m_bInsert ? RedlineType::Insert : RedlineType::Delete;
392  }
393 }
394 
396  : SwUndo( SwUndoId::COMPAREDOC, rRedl.GetDoc() ), SwUndRng( rRedl ),
397  // for MergeDoc the corresponding inverse is needed
398  m_bInsert( RedlineType::Delete == rRedl.GetType() )
399 {
400  SwDoc* pDoc = rRedl.GetDoc();
401  if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
402  {
403  m_pRedlineData.reset( new SwRedlineData( rRedl.GetRedlineData() ) );
405  }
406 
408  if( !FillSaveData( rRedl, *m_pRedlineSaveDatas, false ))
409  {
410  m_pRedlineSaveDatas.reset();
411  }
412 }
413 
415 {
416  m_pRedlineData.reset();
417  m_pUndoDelete.reset();
418  m_pUndoDelete2.reset();
419  m_pRedlineSaveDatas.reset();
420 }
421 
423 {
424  SwDoc& rDoc = rContext.GetDoc();
425  SwPaM& rPam(AddUndoRedoPaM(rContext));
426 
427  if( !m_bInsert )
428  {
429  // delete Redlines
432 
433  rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
434 
436 
437  // per definition Point is end (in SwUndRng!)
438  SwContentNode* pCSttNd = rPam.GetContentNode(false);
439  SwContentNode* pCEndNd = rPam.GetContentNode();
440 
441  // if start- and end-content is zero, then the doc-compare moves
442  // complete nodes into the current doc. And then the selection
443  // must be from end to start, so the delete join into the right
444  // direction.
445  if( !m_nSttContent && !m_nEndContent )
446  rPam.Exchange();
447 
448  bool bJoinText, bJoinPrev;
449  sw_GetJoinFlags(rPam, bJoinText, bJoinPrev);
450 
451  m_pUndoDelete.reset( new SwUndoDelete(rPam, false) );
452 
453  if( bJoinText )
454  sw_JoinText(rPam, bJoinPrev);
455 
456  if( pCSttNd && !pCEndNd)
457  {
458  // #112139# Do not step behind the end of content.
459  SwNode & rTmp = rPam.GetNode();
460  SwNode * pEnd = rDoc.GetNodes().DocumentSectionEndNode(&rTmp);
461 
462  if (&rTmp != pEnd)
463  {
464  rPam.SetMark();
465  ++rPam.GetPoint()->nNode;
466  rPam.GetBound().nContent.Assign( nullptr, 0 );
467  rPam.GetBound( false ).nContent.Assign( nullptr, 0 );
468  m_pUndoDelete2.reset( new SwUndoDelete(rPam, true) );
469  }
470  }
471  rPam.DeleteMark();
472  }
473  else
474  {
476  {
477  rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
478 
479  if( m_pRedlineSaveDatas )
481  }
482  SetPaM(rPam, true);
483  }
484 }
485 
487 {
488  SwDoc& rDoc = rContext.GetDoc();
489 
490  if( m_bInsert )
491  {
492  SwPaM& rPam(AddUndoRedoPaM(rContext));
494  {
495  SwRangeRedline* pTmp = new SwRangeRedline(*m_pRedlineData, rPam);
498  }
499  else if( !( RedlineFlags::Ignore & GetRedlineFlags() ) &&
501  {
503  }
504  SetPaM(rPam, true);
505  }
506  else
507  {
508  if( m_pUndoDelete2 )
509  {
510  m_pUndoDelete2->UndoImpl(rContext);
511  m_pUndoDelete2.reset();
512  }
513  m_pUndoDelete->UndoImpl(rContext);
514  m_pUndoDelete.reset();
515 
516  // note: don't call SetPaM before executing Undo of members
517  SwPaM& rPam(AddUndoRedoPaM(rContext));
518 
519  SwRangeRedline* pTmp = new SwRangeRedline(*m_pRedlineData, rPam);
522 
523  SetPaM(rPam, true);
524  }
525 }
526 
527 /* 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:1223
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:377
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:35
SwUndoId
Definition: swundo.hxx:29
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unredln.cxx:422
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:201
sal_uIntPtr sal_uLong
SwPaM & GetRepeatPaM()
Definition: UndoCore.hxx:128
virtual ~SwUndoRedlineSort() override
Definition: unredln.cxx:252
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:79
virtual ~SwUndoCompDoc() override
Definition: unredln.cxx:414
void SetRedlineFlags(RedlineFlags eMode)
Definition: undobj.hxx:120
SwNode & GetNode() const
Definition: ndindex.hxx:119
SwNode * DocumentSectionEndNode(SwNode *pNode) const
Definition: nodes.cxx:2314
SwPosition & GetBound(bool bOne=true)
Definition: pam.hxx:245
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:314
SwUndoCompDoc(const SwPaM &rRg, bool bIns)
Definition: unredln.cxx:382
void SetRedlineText(const OUString &rText)
Definition: unredln.cxx:191
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:37
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:372
static bool CanRedlineGroup(SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd)
Definition: undobj.cxx:1485
bool CanGrouping(const SwUndoRedlineDelete &rPrev)
Definition: unredln.cxx:210
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:1752
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unredln.cxx:362
virtual std::size_t GetRedlineAuthor()=0
void InvalidateRange(Invalidation)
Initiate the layout.
Definition: docredln.cxx:1219
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
void SetSaveRange(const SwPaM &rRange)
Definition: unredln.cxx:345
static bool HasHiddenRedlines(const SwRedlineSaveDatas &rSData)
Definition: undobj.cxx:1477
const SwPosition * GetPoint() const
Definition: pam.hxx:207
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:486
SwUndoRedlineDelete(const SwPaM &rRange, SwUndoId nUserId)
Definition: unredln.cxx:155
static void SetSaveData(SwDoc &rDoc, SwRedlineSaveDatas &rSData)
Definition: undobj.cxx:1458
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
SwDoc * GetDoc() const
Definition: pam.hxx:243
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:308
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:34
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
SwUndoRejectRedline(const SwPaM &rRange)
Definition: unredln.cxx:367
SwUndoRedlineSort(const SwPaM &rRange, const SwSortOptions &rOpt)
Definition: unredln.cxx:244
show all deletes
const SwPosition * Start() const
Definition: pam.hxx:212
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unredln.cxx:122
void SetMark(const sw::mark::IMark *pMark)
Definition: index.cxx:222
std::unique_ptr< SwUndoDelete > m_pUndoDelete
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:352
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:334
virtual void RedoRedlineImpl(SwDoc &rDoc, SwPaM &rPam) override
Definition: unredln.cxx:357
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:1517
SwUndoId mnUserId
Definition: UndoRedline.hxx:36
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:150
OUString DenoteSpecialCharacters(const OUString &rStr)
Denotes special characters in a string.
Definition: undel.cxx:715
sal_uLong m_nSaveEndNode
Definition: UndoRedline.hxx:80
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: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:1393
virtual bool RejectRedline(SwRedlineTable::size_type nPos, bool bCallDelete)=0
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: unredln.cxx:179
virtual const SwRedlineTable & GetRedlineTable() const =0
bool Insert(SwRangeRedline *&p)
Definition: docredln.cxx:420
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:145
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:340
sal_Int32 m_nSaveEndContent
Definition: UndoRedline.hxx:81
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:256
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:196