LibreOffice Module sw (master)  1
untblk.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 <hintids.hxx>
21 #include <fmtanchr.hxx>
22 #include <frmfmt.hxx>
23 #include <doc.hxx>
24 #include <IDocumentUndoRedo.hxx>
26 #include <IShellCursorSupplier.hxx>
27 #include <docary.hxx>
28 #include <swundo.hxx>
29 #include <pam.hxx>
30 #include <ndtxt.hxx>
31 #include <UndoCore.hxx>
32 #include <rolbck.hxx>
33 #include <redline.hxx>
34 
36  : SwUndo( nUndoId, rPam.GetDoc() ), SwUndRng( rPam ),
37  pTextFormatColl( nullptr ), pLastNdColl(nullptr),
38  bSttWasTextNd( true ), nNdDiff( 0 ), nSetPos( 0 )
39 {
40  pHistory.reset( new SwHistory );
41  SwDoc* pDoc = rPam.GetDoc();
42 
43  SwTextNode* pTextNd = rPam.GetPoint()->nNode.GetNode().GetTextNode();
44  if( pTextNd )
45  {
46  pTextFormatColl = pTextNd->GetTextColl();
47  pHistory->CopyAttr( pTextNd->GetpSwpHints(), nSttNode,
48  0, pTextNd->GetText().getLength(), false );
49  if( pTextNd->HasSwAttrSet() )
50  pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), nSttNode );
51 
52  // We may have some flys anchored to paragraph where we inserting.
53  // These flys will be saved in pFrameFormats array (only flys which exist BEFORE insertion!)
54  // Then in SwUndoInserts::SetInsertRange the flys saved in pFrameFormats will NOT create Undos.
55  // m_FlyUndos will only be filled with newly inserted flys.
56 
57  const size_t nArrLen = pDoc->GetSpzFrameFormats()->size();
58  for( size_t n = 0; n < nArrLen; ++n )
59  {
60  SwFrameFormat* pFormat = (*pDoc->GetSpzFrameFormats())[n];
61  SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
62  const SwPosition* pAPos = pAnchor->GetContentAnchor();
63  if (pAPos &&
64  (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) &&
65  nSttNode == pAPos->nNode.GetIndex() )
66  {
67  if( !pFrameFormats )
68  pFrameFormats.reset( new std::vector<SwFrameFormat*> );
69  pFrameFormats->push_back( pFormat );
70  }
71  }
72  }
73  // consider Redline
75  {
78  }
79 }
80 
81 // This method does two things:
82 // 1. Adjusts SwUndoRng members, required for Undo.
83 // Members are:
84 // SwUndoRng::nSttNode - all nodes starting from this node will be deleted during Undo (in SwUndoInserts::UndoImpl)
85 // SwUndoRng::nSttContent - corresponding content index in SwUndoRng::nSttNode
86 // SwUndoRng::nEndNode - end node for deletion
87 // SwUndoRng::nEndContent - end content index
88 // All these members are filled in during construction of SwUndoInserts instance, and can be adjusted using this method
89 //
90 // 2. Fills in m_FlyUndos array with flys anchored ONLY to first and last paragraphs (first == rPam.Start(), last == rPam.End())
91 // Flys, anchored to any paragraph, but not first and last, are handled by DelContentIndex (see SwUndoInserts::UndoImpl) and are not stored in m_FlyUndos.
92 
93 void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
94  bool bSttIsTextNd )
95 {
96  const SwPosition* pTmpPos = rPam.End();
97  nEndNode = pTmpPos->nNode.GetIndex();
98  nEndContent = pTmpPos->nContent.GetIndex();
99  if( rPam.HasMark() )
100  {
101  if( pTmpPos == rPam.GetPoint() )
102  pTmpPos = rPam.GetMark();
103  else
104  pTmpPos = rPam.GetPoint();
105 
106  nSttNode = pTmpPos->nNode.GetIndex();
107  nSttContent = pTmpPos->nContent.GetIndex();
108 
109  if( !bSttIsTextNd ) // if a table selection is added...
110  {
111  ++nSttNode; // ... then the CopyPam is not fully correct
112  bSttWasTextNd = false;
113  }
114  }
115 
116  // Fill m_FlyUndos with flys anchored to first and last paragraphs
117 
118  if( bScanFlys)
119  {
120  // than collect all new Flys
121  SwDoc* pDoc = rPam.GetDoc();
122  const size_t nArrLen = pDoc->GetSpzFrameFormats()->size();
123  for( size_t n = 0; n < nArrLen; ++n )
124  {
125  SwFrameFormat* pFormat = (*pDoc->GetSpzFrameFormats())[n];
126  SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
127  SwPosition const*const pAPos = pAnchor->GetContentAnchor();
128  if (pAPos &&
129  (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) &&
130  (nSttNode == pAPos->nNode.GetIndex() || nEndNode == pAPos->nNode.GetIndex()))
131  {
132  std::vector<SwFrameFormat*>::iterator it;
133  if( !pFrameFormats ||
134  pFrameFormats->end() == ( it = std::find( pFrameFormats->begin(), pFrameFormats->end(), pFormat ) ) )
135  {
136  std::shared_ptr<SwUndoInsLayFormat> const pFlyUndo(
137  new SwUndoInsLayFormat(pFormat, 0, 0));
138  m_FlyUndos.push_back(pFlyUndo);
139  }
140  else
141  pFrameFormats->erase( it );
142  }
143  }
144  pFrameFormats.reset();
145  }
146 }
147 
149 {
150  if (m_pUndoNodeIndex) // delete also the section from UndoNodes array
151  {
152  // Insert saves content in IconSection
153  SwNodes& rUNds = m_pUndoNodeIndex->GetNodes();
154  rUNds.Delete(*m_pUndoNodeIndex,
155  rUNds.GetEndOfExtras().GetIndex() - m_pUndoNodeIndex->GetIndex());
156  m_pUndoNodeIndex.reset();
157  }
158  pFrameFormats.reset();
159  pRedlData.reset();
160 }
161 
162 // Undo Insert operation
163 // It's important to note that Undo stores absolute node indexes. I.e. if during insertion, you insert nodes 31 to 33,
164 // during Undo nodes with indices from 31 to 33 will be deleted. Undo doesn't check that nodes 31 to 33 are the same nodes which were inserted.
165 // It just deletes them.
166 // This may seem as bad programming practice, but Undo actions are strongly ordered. If you change your document in some way, a new Undo action is added.
167 // During Undo most recent actions will be executed first. So during execution of particular Undo action indices will be correct.
168 // But storing absolute indices leads to crashes if some action in Undo fails to roll back some modifications.
169 
170 // Has following main steps:
171 // 1. DelContentIndex to delete footnotes, flys, bookmarks (see comment for this function)
172 // Deleted flys are stored in pHistory array.
173 // First and last paragraphs flys are handled later in this function! They are not deleted by DelContentIndex!
174 // For flys anchored to last paragraph, DelContentIndex re-anchors them to the last paragraph that will remain after Undo.
175 // This is not fully correct, as everything between nSttNode and nEndNode should be deleted (these nodes marks range of inserted nodes).
176 // But due to bug in paste (probably there), during paste all flys are anchored to last paragraph (see https://bugs.documentfoundation.org/show_bug.cgi?id=94225#c38).
177 // So they should be re-anchored.
178 // 2. MoveToUndoNds moves nodes to Undo nodes array and removes them from document.
179 // 3. m_FlyUndos removes flys anchored to first and last paragraph in Undo range. This array may be empty.
180 // 4. Lastly (starting from if(pTextNode)), text from last paragraph is joined to last remaining paragraph and FormatColl for last paragraph is restored.
181 // Format coll for last paragraph is removed during execution of UndoImpl
182 
184 {
185  SwDoc& rDoc = rContext.GetDoc();
186  SwPaM& rPam = AddUndoRedoPaM(rContext);
187 
190 
191  // if Point and Mark are different text nodes so a JoinNext has to be done
192  bool bJoinNext = nSttNode != nEndNode &&
193  rPam.GetMark()->nNode.GetNode().GetTextNode() &&
194  rPam.GetPoint()->nNode.GetNode().GetTextNode();
195 
196  // Is there any content? (loading from template does not have content)
198  {
199  if( nSttNode != nEndNode )
200  {
201  SwTextNode* pTextNd = rDoc.GetNodes()[ nEndNode ]->GetTextNode();
202  if (pTextNd && pTextNd->GetText().getLength() == nEndContent)
203  pLastNdColl = pTextNd->GetTextColl();
204  }
205 
206  RemoveIdxFromRange(rPam, false);
207  SetPaM(rPam);
208 
209  // are there Footnotes or ContentFlyFrames in text?
210  nSetPos = pHistory->Count();
211  nNdDiff = rPam.GetMark()->nNode.GetIndex();
212  DelContentIndex(*rPam.GetMark(), *rPam.GetPoint());
213  nNdDiff -= rPam.GetMark()->nNode.GetIndex();
214 
215  if( *rPam.GetPoint() != *rPam.GetMark() )
216  {
217  m_pUndoNodeIndex.reset(
218  new SwNodeIndex(rDoc.GetNodes().GetEndOfContent()));
219  MoveToUndoNds(rPam, m_pUndoNodeIndex.get());
220 
221  if( !bSttWasTextNd )
223  }
224  }
225 
226  if (!m_FlyUndos.empty())
227  {
228  sal_uLong nTmp = rPam.GetPoint()->nNode.GetIndex();
229  for (size_t n = m_FlyUndos.size(); 0 < n; --n)
230  {
231  m_FlyUndos[ n-1 ]->UndoImpl(rContext);
232  }
233  nNdDiff += nTmp - rPam.GetPoint()->nNode.GetIndex();
234  }
235 
236  SwNodeIndex& rIdx = rPam.GetPoint()->nNode;
237  SwTextNode* pTextNode = rIdx.GetNode().GetTextNode();
238  if( pTextNode )
239  {
240  if( !pTextFormatColl ) // if 0 than it's no TextNode -> delete
241  {
242  SwNodeIndex aDelIdx( rIdx );
243  ++rIdx;
244  SwContentNode* pCNd = rIdx.GetNode().GetContentNode();
245  rPam.GetPoint()->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 );
246  rPam.SetMark();
247  rPam.DeleteMark();
248 
249  RemoveIdxRel(aDelIdx.GetIndex(), *rPam.GetPoint());
250 
251  rDoc.GetNodes().Delete( aDelIdx );
252  }
253  else
254  {
255  if( bJoinNext && pTextNode->CanJoinNext())
256  {
257  {
258  RemoveIdxRel( rIdx.GetIndex()+1, SwPosition( rIdx,
259  SwIndex( pTextNode, pTextNode->GetText().getLength() )));
260  }
261  pTextNode->JoinNext();
262  }
263  // reset all text attributes in the paragraph!
264  pTextNode->RstTextAttr( SwIndex(pTextNode, 0), pTextNode->Len(), 0, nullptr, true );
265 
266  pTextNode->ResetAllAttr();
267 
269  pTextFormatColl = static_cast<SwTextFormatColl*>(pTextNode->ChgFormatColl( pTextFormatColl )) ;
270 
271  pHistory->SetTmpEnd( nSetPos );
272  pHistory->TmpRollback(&rDoc, 0, false);
273  }
274  }
275 }
276 
277 // See SwUndoInserts::UndoImpl comments
278 // All actions here should be done in reverse order to what is done in SwUndoInserts::UndoImpl!
279 
281 {
282  // position cursor onto REDO section
283  SwPaM& rPam(rContext.GetCursorSupplier().CreateNewShellCursor());
284  SwDoc* pDoc = rPam.GetDoc();
285  rPam.DeleteMark();
286  rPam.GetPoint()->nNode = nSttNode - nNdDiff;
287  SwContentNode* pCNd = rPam.GetContentNode();
288  rPam.GetPoint()->nContent.Assign( pCNd, nSttContent );
289 
290  SwTextFormatColl* pSavTextFormatColl = pTextFormatColl;
291  if( pTextFormatColl && pCNd && pCNd->IsTextNode() )
292  pSavTextFormatColl = static_cast<SwTextNode*>(pCNd)->GetTextColl();
293 
294  pHistory->SetTmpEnd( nSetPos );
295 
296  // retrieve start position for rollback
298  {
299  const bool bMvBkwrd = MovePtBackward(rPam);
300 
301  // re-insert content again (first detach m_pUndoNodeIndex!)
302  sal_uLong const nMvNd = m_pUndoNodeIndex->GetIndex();
303  m_pUndoNodeIndex.reset();
304  MoveFromUndoNds(*pDoc, nMvNd, *rPam.GetMark());
305  if( bSttWasTextNd )
306  MovePtForward(rPam, bMvBkwrd);
307  rPam.Exchange();
308  }
309 
310  if (pDoc->GetTextFormatColls()->IsAlive(pTextFormatColl))
311  {
312  SwTextNode* pTextNd = rPam.GetMark()->nNode.GetNode().GetTextNode();
313  if( pTextNd )
314  pTextNd->ChgFormatColl( pTextFormatColl );
315  }
316  pTextFormatColl = pSavTextFormatColl;
317 
318  if (pLastNdColl && pDoc->GetTextFormatColls()->IsAlive(pLastNdColl)
319  && rPam.GetPoint()->nNode != rPam.GetMark()->nNode)
320  {
321  SwTextNode* pTextNd = rPam.GetPoint()->nNode.GetNode().GetTextNode();
322  if( pTextNd )
323  pTextNd->ChgFormatColl( pLastNdColl );
324  }
325 
326  // tdf#108124 (10/25/2017)
327  // During UNDO we call SwUndoInsLayFormat::UndoImpl in reverse order,
328  // firstly for m_FlyUndos[ m_FlyUndos.size()-1 ], etc.
329  // As absolute node index of fly stored in SwUndoFlyBase::nNdPgPos we
330  // should recover from Undo in direct order (last should be recovered first)
331  // During REDO we should recover Flys (Images) in direct order,
332  // firstly m_FlyUndos[0], then with m_FlyUndos[1] index, etc.
333 
334  for (size_t n = 0; m_FlyUndos.size() > n; ++n)
335  {
336  m_FlyUndos[n]->RedoImpl(rContext);
337  }
338 
339  pHistory->Rollback( pDoc, nSetPos );
340 
342  {
343  RedlineFlags eOld = pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
344  pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld & ~RedlineFlags::Ignore );
345  pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( *pRedlData, rPam ), true);
346  pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
347  }
348  else if( !( RedlineFlags::Ignore & GetRedlineFlags() ) &&
349  !pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() )
350  pDoc->getIDocumentRedlineAccess().SplitRedline(rPam);
351 }
352 
354 {
355  SwPaM aPam( rContext.GetDoc().GetNodes().GetEndOfContent() );
356  SetPaM( aPam );
357  SwPaM & rRepeatPaM( rContext.GetRepeatPaM() );
358  aPam.GetDoc()->getIDocumentContentOperations().CopyRange( aPam, *rRepeatPaM.GetPoint(), /*bCopyAll=*/false, /*bCheckPos=*/true );
359 }
360 
363 {
364 }
365 
367  : SwUndoInserts( SwUndoId::COPY, rPam )
368 {
369 }
370 
371 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< std::vector< SwFrameFormat * > > pFrameFormats
Definition: undobj.hxx:234
std::vector< std::shared_ptr< SwUndoInsLayFormat > > m_FlyUndos
Definition: undobj.hxx:235
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
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:903
std::unique_ptr< SwHistory > pHistory
Definition: undobj.hxx:154
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
Marks a position in the document model.
Definition: pam.hxx:35
sal_Int32 nSttContent
Definition: undobj.hxx:217
virtual ~SwUndoInserts() override
Definition: untblk.cxx:148
bool bSttWasTextNd
Definition: undobj.hxx:237
const OUString & GetText() const
Definition: ndtxt.hxx:211
SwUndoId
Definition: swundo.hxx:29
virtual sal_uInt16 ResetAllAttr() override
Definition: ndtxt.cxx:5150
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:219
virtual SwPaM & CreateNewShellCursor()=0
SwNodeIndex nNode
Definition: pam.hxx:37
std::unique_ptr< SwRedlineData > pRedlData
Definition: undobj.hxx:236
virtual sal_Int32 Len() const override
Definition: ndtxt.cxx:284
sal_uIntPtr sal_uLong
SwPaM & GetRepeatPaM()
Definition: UndoCore.hxx:128
const SwPosition * GetMark() const
Definition: pam.hxx:209
Definition: doc.hxx:185
void SetRedlineFlags(RedlineFlags eMode)
Definition: undobj.hxx:118
SwNode & GetNode() const
Definition: ndindex.hxx:118
SwTextFormatColl * pTextFormatColl
Definition: undobj.hxx:233
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:347
bool CanJoinNext(SwNodeIndex *pIdx=nullptr) const
Is it possible to join two nodes? In pIdx the second position can be returned.
Definition: node.cxx:1775
virtual SwContentNode * JoinNext() override
Definition: ndtxt.cxx:949
const SwFrameFormats * GetSpzFrameFormats() const
Definition: doc.hxx:738
IShellCursorSupplier & GetCursorSupplier()
Definition: UndoCore.hxx:96
sal_uLong nEndNode
Definition: undobj.hxx:216
SwUndoInserts(SwUndoId nUndoId, const SwPaM &)
Definition: untblk.cxx:35
void Delete(const SwNodeIndex &rPos, sal_uLong nNodes=1)
delete nodes
Definition: nodes.cxx:1063
sal_uInt16 nSetPos
Definition: undobj.hxx:242
SwIndex nContent
Definition: pam.hxx:38
static bool IsRedlineOn(const RedlineFlags eM)
SwDoc & GetDoc() const
Definition: UndoCore.hxx:126
sal_uLong GetIndex() const
Definition: ndindex.hxx:151
static void MoveToUndoNds(SwPaM &rPam, SwNodeIndex *pNodeIdx, sal_uLong *pEndNdIdx=nullptr)
Definition: undobj.cxx:709
SwDoc & GetDoc() const
Definition: UndoCore.hxx:94
static void RemoveIdxFromRange(SwPaM &rPam, bool bMoveNext)
Definition: undobj.cxx:124
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untblk.cxx:183
RedlineFlags GetRedlineFlags() const
Definition: undobj.hxx:117
SwUndoCpyDoc(const SwPaM &)
Definition: untblk.cxx:366
bool IsAlive(typename std::remove_pointer< Value >::type const *const p) const
check that given format is still alive (i.e. contained here)
Definition: docary.hxx:144
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
Definition: ndarr.hxx:164
virtual std::size_t GetRedlineAuthor()=0
SwUndoInsDoc(const SwPaM &)
Definition: untblk.cxx:361
static void MovePtForward(SwPaM &rPam, bool bMvBkwrd)
Definition: undobj.cxx:821
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
const SwAttrSet * GetpSwAttrSet() const
Definition: node.hxx:443
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
Definition: pam.cxx:483
void RstTextAttr(const SwIndex &rIdx, const sal_Int32 nLen, const sal_uInt16 nWhich=0, const SfxItemSet *pSet=nullptr, const bool bInclRefToxMark=false, const bool bExactRange=false)
delete all attributes.
Definition: txtedt.cxx:366
Style of a layout element.
Definition: frmfmt.hxx:57
sal_uLong nNdDiff
Definition: undobj.hxx:239
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
const SwPosition * GetPoint() const
Definition: pam.hxx:207
void DelContentIndex(const SwPosition &pMark, const SwPosition &pPoint, DelContentType nDelContentType=DelContentType::AllMask)
Definition: undobj.cxx:846
SwIndex & Assign(SwIndexReg *, sal_Int32)
Definition: index.cxx:198
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
const SwPosition * GetContentAnchor() const
Definition: fmtanchr.hxx:67
virtual bool DeleteRedline(const SwPaM &rPam, bool bSaveInUndo, RedlineType nDelType)=0
SwContentNode * GetContentNode()
Definition: node.hxx:615
FlyAnchors.
Definition: fmtanchr.hxx:34
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Definition: pam.hxx:205
SwDoc * GetDoc() const
Definition: pam.hxx:243
Marks a character position inside a document model node.
Definition: index.hxx:37
virtual SwFormatColl * ChgFormatColl(SwFormatColl *) override
Definition: ndtxt.cxx:3929
sal_uLong nSttNode
Definition: undobj.hxx:216
Marks a node in the document model.
Definition: ndindex.hxx:31
static bool MovePtBackward(SwPaM &rPam)
Definition: undobj.cxx:808
bool HasSwAttrSet() const
Definition: node.hxx:444
sal_Int32 nEndContent
Definition: undobj.hxx:217
ignore Redlines
void SetInsertRange(const SwPaM &, bool bScanFlys=true, bool bSttWasTextNd=true)
Definition: untblk.cxx:93
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untblk.cxx:280
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:367
void SetPaM(SwPaM &, bool bCorrToContent=false) const
Definition: undobj.cxx:78
static void MoveFromUndoNds(SwDoc &rDoc, sal_uLong nNodeIdx, SwPosition &rInsPos, const sal_uLong *pEndNdIdx=nullptr, bool bForceCreateFrames=false)
Definition: undobj.cxx:746
const SwTextFormatColls * GetTextFormatColls() const
Definition: doc.hxx:773
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
static void RemoveIdxRel(sal_uLong, const SwPosition &)
Definition: undobj.cxx:151
SwMoveFnCollection const & fnMoveBackward
Definition: paminit.cxx:58
const short COPY
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
size_t size() const
Definition: docary.hxx:225
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
Definition: pam.cxx:457
SwTextFormatColl * pLastNdColl
Definition: undobj.hxx:233
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
Definition: ndarr.hxx:162
bool IsTextNode() const
Definition: node.hxx:636
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untblk.cxx:353
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:842
std::unique_ptr< SwNodeIndex > m_pUndoNodeIndex
start of Content in UndoNodes for Redo
Definition: undobj.hxx:241
SwTextFormatColl * GetTextColl() const
Definition: ndtxt.hxx:836
virtual bool CopyRange(SwPaM &rPam, SwPosition &rPos, const bool bCopyAll, bool bCheckPos) const =0
Copy a selected content range to a position.