LibreOffice Module sw (master)  1
unovwr.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 <UndoOverwrite.hxx>
21 #include <unotools/charclass.hxx>
24 #include <doc.hxx>
25 #include <IDocumentUndoRedo.hxx>
27 #include <IShellCursorSupplier.hxx>
28 #include <swcrsr.hxx>
29 #include <swundo.hxx>
30 #include <pam.hxx>
31 #include <ndtxt.hxx>
32 #include <UndoCore.hxx>
33 #include <rolbck.hxx>
34 #include <acorrect.hxx>
35 #include <docary.hxx>
36 #include <strings.hrc>
37 
38 using namespace ::com::sun::star;
39 using namespace ::com::sun::star::i18n;
40 using namespace ::com::sun::star::uno;
41 
43  sal_Unicode cIns )
44  : SwUndo(SwUndoId::OVERWRITE, &rDoc),
45  m_bGroup( false )
46 {
47  SwTextNode *const pTextNd = rPos.nNode.GetNode().GetTextNode();
48  assert(pTextNd);
49  sal_Int32 const nTextNdLen = pTextNd->GetText().getLength();
50 
51  m_nStartNode = rPos.nNode.GetIndex();
53 
55  {
56  SwPaM aPam( rPos.nNode, rPos.nContent.GetIndex(),
57  rPos.nNode, rPos.nContent.GetIndex()+1 );
59  if( !FillSaveData( aPam, *m_pRedlSaveData, false ))
60  {
61  m_pRedlSaveData.reset();
62  }
63  if (m_nStartContent < nTextNdLen)
64  {
65  rDoc.getIDocumentRedlineAccess().DeleteRedline(aPam, false, RedlineType::Any);
66  }
67  }
68 
69  m_bInsChar = true;
70  if( m_nStartContent < nTextNdLen ) // no pure insert?
71  {
72  m_aDelStr += OUStringChar( pTextNd->GetText()[m_nStartContent] );
73  if( !m_pHistory )
74  m_pHistory.reset( new SwHistory );
75  SwRegHistory aRHst( *pTextNd, m_pHistory.get() );
76  m_pHistory->CopyAttr( pTextNd->GetpSwpHints(), m_nStartNode, 0,
77  nTextNdLen, false );
78  ++rPos.nContent;
79  m_bInsChar = false;
80  }
81 
82  bool bOldExpFlg = pTextNd->IsIgnoreDontExpand();
83  pTextNd->SetIgnoreDontExpand( true );
84 
85  pTextNd->InsertText( OUString(cIns), rPos.nContent,
87  m_aInsStr += OUStringChar( cIns );
88 
89  if( !m_bInsChar )
90  {
91  const SwIndex aTmpIndex( rPos.nContent, -2 );
92  pTextNd->EraseText( aTmpIndex, 1 );
93  }
94  pTextNd->SetIgnoreDontExpand( bOldExpFlg );
95 
96  m_bCacheComment = false;
97 }
98 
100 {
101 }
102 
104  sal_Unicode cIns )
105 {
106 // What is with only inserted characters?
107 
108  // Only deletion of single chars can be combined.
109  if( rPos.nNode != m_nStartNode || m_aInsStr.isEmpty() ||
110  ( !m_bGroup && m_aInsStr.getLength() != 1 ))
111  return false;
112 
113  // Is the node a TextNode at all?
114  SwTextNode * pDelTextNd = rPos.nNode.GetNode().GetTextNode();
115  if( !pDelTextNd ||
116  (pDelTextNd->GetText().getLength() != rPos.nContent.GetIndex() &&
117  rPos.nContent.GetIndex() != ( m_nStartContent + m_aInsStr.getLength() )))
118  return false;
119 
120  CharClass& rCC = GetAppCharClass();
121 
122  // ask the char that should be inserted
123  if (( CH_TXTATR_BREAKWORD == cIns || CH_TXTATR_INWORD == cIns ) ||
124  rCC.isLetterNumeric( OUString( cIns ), 0 ) !=
125  rCC.isLetterNumeric( m_aInsStr, m_aInsStr.getLength()-1 ) )
126  return false;
127 
128  if (!m_bInsChar && rPos.nContent.GetIndex() < pDelTextNd->GetText().getLength())
129  {
130  SwRedlineSaveDatas aTmpSav;
131  SwPaM aPam( rPos.nNode, rPos.nContent.GetIndex(),
132  rPos.nNode, rPos.nContent.GetIndex()+1 );
133 
134  const bool bSaved = FillSaveData( aPam, aTmpSav, false );
135 
136  bool bOk = ( !m_pRedlSaveData && !bSaved ) ||
137  ( m_pRedlSaveData && bSaved &&
139  m_nStartContent > rPos.nContent.GetIndex() ));
140  // aTmpSav.DeleteAndDestroyAll();
141  if( !bOk )
142  return false;
143 
144  rDoc.getIDocumentRedlineAccess().DeleteRedline( aPam, false, RedlineType::Any );
145  }
146 
147  // both 'overwrites' can be combined so 'move' the corresponding character
148  if( !m_bInsChar )
149  {
150  if (rPos.nContent.GetIndex() < pDelTextNd->GetText().getLength())
151  {
152  m_aDelStr += OUStringChar( pDelTextNd->GetText()[rPos.nContent.GetIndex()] );
153  ++rPos.nContent;
154  }
155  else
156  m_bInsChar = true;
157  }
158 
159  bool bOldExpFlg = pDelTextNd->IsIgnoreDontExpand();
160  pDelTextNd->SetIgnoreDontExpand( true );
161 
162  OUString const ins( pDelTextNd->InsertText(OUString(cIns), rPos.nContent,
164  assert(ins.getLength() == 1); // check in SwDoc::Overwrite => cannot fail
165  (void) ins;
166  m_aInsStr += OUStringChar( cIns );
167 
168  if( !m_bInsChar )
169  {
170  const SwIndex aTmpIndex( rPos.nContent, -2 );
171  pDelTextNd->EraseText( aTmpIndex, 1 );
172  }
173  pDelTextNd->SetIgnoreDontExpand( bOldExpFlg );
174 
175  m_bGroup = true;
176  return true;
177 }
178 
180 {
181  SwDoc& rDoc = rContext.GetDoc();
182  SwCursor& rCurrentPam(rContext.GetCursorSupplier().CreateNewShellCursor());
183 
184  rCurrentPam.DeleteMark();
185  rCurrentPam.GetPoint()->nNode = m_nStartNode;
186  SwTextNode* pTextNd = rCurrentPam.GetNode().GetTextNode();
187  assert(pTextNd);
188  SwIndex& rIdx = rCurrentPam.GetPoint()->nContent;
189  rIdx.Assign( pTextNd, m_nStartContent );
190 
191  SwAutoCorrExceptWord* pACEWord = rDoc.GetAutoCorrExceptWord();
192  if( pACEWord )
193  {
194  if( 1 == m_aInsStr.getLength() && 1 == m_aDelStr.getLength() )
195  pACEWord->CheckChar( *rCurrentPam.GetPoint(), m_aDelStr[0] );
196  rDoc.SetAutoCorrExceptWord( nullptr );
197  }
198 
199  // If there was not only an overwrite but also an insert, delete the surplus
200  if( m_aInsStr.getLength() > m_aDelStr.getLength() )
201  {
202  rIdx += m_aDelStr.getLength();
203  pTextNd->EraseText( rIdx, m_aInsStr.getLength() - m_aDelStr.getLength() );
204  rIdx = m_nStartContent;
205  }
206 
207  if( !m_aDelStr.isEmpty() )
208  {
209  bool bOldExpFlg = pTextNd->IsIgnoreDontExpand();
210  pTextNd->SetIgnoreDontExpand( true );
211 
212  ++rIdx;
213  for( sal_Int32 n = 0; n < m_aDelStr.getLength(); n++ )
214  {
215  // do it individually, to keep the attributes!
216  OUString aTmpStr(m_aDelStr[n]);
217  OUString const ins( pTextNd->InsertText(aTmpStr, rIdx) );
218  assert(ins.getLength() == 1); // cannot fail
219  (void) ins;
220  rIdx -= 2;
221  pTextNd->EraseText( rIdx, 1 );
222  rIdx += 2;
223  }
224  pTextNd->SetIgnoreDontExpand( bOldExpFlg );
225  --rIdx;
226  }
227 
228  if( m_pHistory )
229  {
230  if( pTextNd->GetpSwpHints() )
231  pTextNd->ClearSwpHintsArr( false );
232  m_pHistory->TmpRollback( &rDoc, 0, false );
233  }
234 
235  if( rCurrentPam.GetMark()->nContent.GetIndex() != m_nStartContent )
236  {
237  rCurrentPam.SetMark();
238  rCurrentPam.GetMark()->nContent = m_nStartContent;
239  }
240 
241  if( m_pRedlSaveData )
242  SetSaveData( rDoc, *m_pRedlSaveData );
243 }
244 
246 {
247  SwPaM& rCurrentPam = rContext.GetRepeatPaM();
248  if( m_aInsStr.isEmpty() || rCurrentPam.HasMark() )
249  return;
250 
251  SwDoc & rDoc = rContext.GetDoc();
252 
253  {
254  ::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
255  rDoc.getIDocumentContentOperations().Overwrite(rCurrentPam, OUString(m_aInsStr[0]));
256  }
257  for( sal_Int32 n = 1; n < m_aInsStr.getLength(); ++n )
258  rDoc.getIDocumentContentOperations().Overwrite(rCurrentPam, OUString(m_aInsStr[n]));
259 }
260 
262 {
263  SwDoc& rDoc = rContext.GetDoc();
264  SwCursor& rCurrentPam(rContext.GetCursorSupplier().CreateNewShellCursor());
265 
266  rCurrentPam.DeleteMark();
267  rCurrentPam.GetPoint()->nNode = m_nStartNode;
268  SwTextNode* pTextNd = rCurrentPam.GetNode().GetTextNode();
269  assert(pTextNd);
270  SwIndex& rIdx = rCurrentPam.GetPoint()->nContent;
271 
272  if( m_pRedlSaveData )
273  {
274  rIdx.Assign( pTextNd, m_nStartContent );
275  rCurrentPam.SetMark();
276  rCurrentPam.GetMark()->nContent += m_aDelStr.getLength();
277  rDoc.getIDocumentRedlineAccess().DeleteRedline( rCurrentPam, false, RedlineType::Any );
278  rCurrentPam.DeleteMark();
279  }
280  rIdx.Assign( pTextNd, !m_aDelStr.isEmpty() ? m_nStartContent+1 : m_nStartContent );
281 
282  bool bOldExpFlg = pTextNd->IsIgnoreDontExpand();
283  pTextNd->SetIgnoreDontExpand( true );
284 
285  for( sal_Int32 n = 0; n < m_aInsStr.getLength(); n++ )
286  {
287  // do it individually, to keep the attributes!
288  OUString const ins(
289  pTextNd->InsertText( OUString(m_aInsStr[n]), rIdx,
291  assert(ins.getLength() == 1); // cannot fail
292  (void) ins;
293  if( n < m_aDelStr.getLength() )
294  {
295  rIdx -= 2;
296  pTextNd->EraseText( rIdx, 1 );
297  rIdx += n+1 < m_aDelStr.getLength() ? 2 : 1;
298  }
299  }
300  pTextNd->SetIgnoreDontExpand( bOldExpFlg );
301 
302  // get back old start position from UndoNodes array
303  if( m_pHistory )
304  m_pHistory->SetTmpEnd( m_pHistory->Count() );
305  if( rCurrentPam.GetMark()->nContent.GetIndex() != m_nStartContent )
306  {
307  rCurrentPam.SetMark();
308  rCurrentPam.GetMark()->nContent = m_nStartContent;
309  }
310 }
311 
313 {
314  SwRewriter aResult;
315 
316  OUString aString = SwResId(STR_START_QUOTE) +
318  SwResId(STR_END_QUOTE);
319 
320  aResult.AddRule(UndoArg1, aString);
321 
322  return aResult;
323 }
324 
326 {
327  OUString sText;
328  std::unique_ptr<SwHistory> pHistory;
329  std::unique_ptr<Sequence< sal_Int32 >> pOffsets;
331  sal_Int32 nStart, nLen;
332 
333  UndoTransliterate_Data( SwNodeOffset nNd, sal_Int32 nStt, sal_Int32 nStrLen, const OUString& rText )
334  : sText( rText ),
335  nNdIdx( nNd ), nStart( nStt ), nLen( nStrLen )
336  {}
337 
338  void SetChangeAtNode( SwDoc& rDoc );
339 };
340 
342  const SwPaM& rPam,
343  const utl::TransliterationWrapper& rTrans )
344  : SwUndo( SwUndoId::TRANSLITERATE, &rPam.GetDoc() ), SwUndRng( rPam ), m_nType( rTrans.getType() )
345 {
346 }
347 
349 {
350 }
351 
353 {
354  SwDoc & rDoc = rContext.GetDoc();
355 
356  // since the changes were added to the vector from the end of the string/node towards
357  // the start, we need to revert them from the start towards the end now to keep the
358  // offset information of the undo data in sync with the changing text.
359  // Thus we need to iterate from the end of the vector to the start
360  for (sal_Int32 i = m_aChanges.size() - 1; i >= 0; --i)
361  m_aChanges[i]->SetChangeAtNode( rDoc );
362 
363  AddUndoRedoPaM(rContext, true);
364 }
365 
367 {
368  SwPaM & rPam( AddUndoRedoPaM(rContext) );
369  DoTransliterate(rContext.GetDoc(), rPam);
370 }
371 
373 {
374  DoTransliterate(rContext.GetDoc(), rContext.GetRepeatPaM());
375 }
376 
378 {
380  rDoc.getIDocumentContentOperations().TransliterateText( rPam, aTrans );
381 }
382 
384  sal_Int32 nStart, sal_Int32 nLen,
385  uno::Sequence <sal_Int32> const & rOffsets )
386 {
387  tools::Long nOffsLen = rOffsets.getLength();
389  rTNd.GetIndex(), nStart, static_cast<sal_Int32>(nOffsLen),
390  rTNd.GetText().copy(nStart, nLen));
391 
392  m_aChanges.push_back( std::unique_ptr<UndoTransliterate_Data>(pNew) );
393 
394  const sal_Int32* pOffsets = rOffsets.getConstArray();
395  // where did we need less memory ?
396  const sal_Int32* p = pOffsets;
397  for( tools::Long n = 0; n < nOffsLen; ++n, ++p )
398  if( *p != ( nStart + n ))
399  {
400  // create the Offset array
401  pNew->pOffsets.reset( new Sequence <sal_Int32> ( nLen ) );
402  sal_Int32* pIdx = pNew->pOffsets->getArray();
403  p = pOffsets;
404  tools::Long nMyOff, nNewVal = nStart;
405  for( n = 0, nMyOff = nStart; n < nOffsLen; ++p, ++n, ++nMyOff )
406  {
407  if( *p < nMyOff )
408  {
409  // something is deleted
410  nMyOff = *p;
411  *(pIdx-1) = nNewVal++;
412  }
413  else if( *p > nMyOff )
414  {
415  for( ; *p > nMyOff; ++nMyOff )
416  *pIdx++ = nNewVal;
417  --nMyOff;
418  --n;
419  --p;
420  }
421  else
422  *pIdx++ = nNewVal++;
423  }
424 
425  // and then we need to save the attributes/bookmarks
426  // but this data must moved every time to the last in the chain!
427  for (size_t i = 0; i + 1 < m_aChanges.size(); ++i) // check all changes but not the current one
428  {
429  UndoTransliterate_Data* pD = m_aChanges[i].get();
430  if( pD->nNdIdx == pNew->nNdIdx && pD->pHistory )
431  {
432  // same node and have a history?
433  pNew->pHistory = std::move(pD->pHistory);
434  break; // more can't exist
435  }
436  }
437 
438  if( !pNew->pHistory )
439  {
440  pNew->pHistory.reset( new SwHistory );
441  SwRegHistory aRHst( rTNd, pNew->pHistory.get() );
442  pNew->pHistory->CopyAttr( rTNd.GetpSwpHints(),
443  pNew->nNdIdx, 0, rTNd.GetText().getLength(), false );
444  }
445  break;
446  }
447 }
448 
450 {
451  SwTextNode* pTNd = rDoc.GetNodes()[ nNdIdx ]->GetTextNode();
452  if( !pTNd )
453  return;
454 
455  Sequence <sal_Int32> aOffsets( pOffsets ? pOffsets->getLength() : nLen );
456  if( pOffsets )
457  aOffsets = *pOffsets;
458  else
459  {
460  sal_Int32* p = aOffsets.getArray();
461  for( sal_Int32 n = 0; n < nLen; ++n, ++p )
462  *p = n + nStart;
463  }
464  pTNd->ReplaceTextOnly( nStart, nLen, sText, aOffsets );
465 
466  if( pHistory )
467  {
468  if( pTNd->GetpSwpHints() )
469  pTNd->ClearSwpHintsArr( false );
470  pHistory->TmpRollback( &rDoc, 0, false );
471  pHistory->SetTmpEnd( pHistory->Count() );
472  }
473 }
474 
475 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetChangeAtNode(SwDoc &rDoc)
Definition: unovwr.cxx:449
virtual SwCursor & CreateNewShellCursor()=0
SwPaM & AddUndoRedoPaM(::sw::UndoRedoContext &, bool const bCorrToContent=false) const
Definition: undobj.cxx:108
void DeleteMark()
Definition: pam.hxx:178
SwAutoCorrExceptWord * GetAutoCorrExceptWord()
Definition: doc.hxx:1391
Marks a position in the document model.
Definition: pam.hxx:36
std::unique_ptr< SwHistory > m_pHistory
Definition: undobj.hxx:166
virtual ~SwUndoOverwrite() override
Definition: unovwr.cxx:99
const OUString & GetText() const
Definition: ndtxt.hxx:218
bool getType(BSTR name, Type &type)
SwUndoId
Definition: swundo.hxx:29
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:226
OVERWRITE
SwNodeIndex nNode
Definition: pam.hxx:38
SwUndoTransliterate(const SwPaM &rPam, const utl::TransliterationWrapper &rTrans)
Definition: unovwr.cxx:341
std::vector< std::unique_ptr< UndoTransliterate_Data > > m_aChanges
SwPaM & GetRepeatPaM()
Definition: UndoCore.hxx:134
long Long
sal_Int64 n
Definition: doc.hxx:187
bool CanGrouping(SwDoc &, SwPosition &, sal_Unicode cIns)
Definition: unovwr.cxx:103
SwUndoOverwrite(SwDoc &, SwPosition &, sal_Unicode cIns)
Definition: unovwr.cxx:42
SwNode & GetNode() const
Definition: ndindex.hxx:119
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:144
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:315
SwNodeOffset nNdIdx
Definition: unovwr.cxx:330
virtual void TransliterateText(const SwPaM &rPaM, utl::TransliterationWrapper &)=0
change text to Upper/Lower/Hiragana/Katakana/...
void DoTransliterate(SwDoc &rDoc, SwPaM const &rPam)
Definition: unovwr.cxx:377
IShellCursorSupplier & GetCursorSupplier()
Definition: UndoCore.hxx:97
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:164
#define CH_TXTATR_BREAKWORD
Definition: hintids.hxx:173
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
sal_uInt16 sal_Unicode
#define CH_TXTATR_INWORD
Definition: hintids.hxx:174
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unovwr.cxx:372
SwIndex nContent
Definition: pam.hxx:39
bool empty() const
Definition: docary.hxx:266
SwDoc & GetDoc() const
Definition: UndoCore.hxx:132
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unovwr.cxx:261
static bool CanRedlineGroup(SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd)
Definition: undobj.cxx:1502
SwNodeOffset GetIndex() const
Definition: ndindex.hxx:152
SwDoc & GetDoc() const
Definition: UndoCore.hxx:95
virtual SwRewriter GetRewriter() const override
Returns the rewriter of this undo object.
Definition: unovwr.cxx:312
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unovwr.cxx:245
std::unique_ptr< Sequence< sal_Int32 > > pOffsets
Definition: unovwr.cxx:329
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unovwr.cxx:179
void SetIgnoreDontExpand(bool bNew)
Definition: node.hxx:144
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:137
virtual bool Overwrite(const SwPaM &rRg, const OUString &rStr)=0
Overwrite string in an existing text node.
TransliterationFlags m_nType
int i
SwIndex & Assign(SwIndexReg *, sal_Int32)
Definition: index.cxx:206
static void SetSaveData(SwDoc &rDoc, SwRedlineSaveDatas &rSData)
Definition: undobj.cxx:1474
virtual bool DeleteRedline(const SwPaM &rPam, bool bSaveInUndo, RedlineType nDelType)=0
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
std::unique_ptr< SwHistory > pHistory
Definition: unovwr.cxx:328
Marks a character position inside a document model node.
Definition: index.hxx:33
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:25
bool m_bCacheComment
Definition: undobj.hxx:61
bool IsIgnoreDontExpand() const
Definition: node.hxx:143
void CheckChar(const SwPosition &rPos, sal_Unicode cChar)
Definition: acorrect.cxx:615
sal_Int32 m_nStartContent
UndoTransliterate_Data(SwNodeOffset nNd, sal_Int32 nStt, sal_Int32 nStrLen, const OUString &rText)
Definition: unovwr.cxx:333
virtual ~SwUndoTransliterate() override
Definition: unovwr.cxx:348
void SetMark(const sw::mark::IMark *pMark)
Definition: index.cxx:222
virtual bool IsIgnoreRedline() const =0
void ReplaceTextOnly(sal_Int32 nPos, sal_Int32 nLen, const OUString &rText, const css::uno::Sequence< sal_Int32 > &rOffsets)
Definition: txtedt.cxx:1980
void EraseText(const SwIndex &rIdx, const sal_Int32 nCount=SAL_MAX_INT32, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
delete text content ATTENTION: must not be called with a range that overlaps the start of an attribut...
Definition: ndtxt.cxx:2688
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unovwr.cxx:366
OUString InsertText(const OUString &rStr, const SwIndex &rIdx, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
insert text content
Definition: ndtxt.cxx:2297
void SetAutoCorrExceptWord(std::unique_ptr< SwAutoCorrExceptWord > pNew)
Definition: docedt.cxx:826
void ClearSwpHintsArr(bool bDelFields)
Definition: thints.cxx:3396
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:335
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unovwr.cxx:352
OUString ShortenString(const OUString &rStr, sal_Int32 nLength, const OUString &rFillStr)
Shortens a string to a maximum length.
Definition: undobj.cxx:1534
Blocks grouping undo actions together into an SfxListUndoAction.
sal_Int32 GetIndex() const
Definition: index.hxx:91
SwNodes & GetNodes()
Definition: doc.hxx:408
void * p
Reference< XComponentContext > getProcessComponentContext()
std::unique_ptr< SwRedlineSaveDatas > m_pRedlSaveData
static bool FillSaveData(const SwPaM &rRange, SwRedlineSaveDatas &rSData, bool bDelRange=true, bool bCopyNext=true)
Definition: undobj.cxx:1409
virtual const SwRedlineTable & GetRedlineTable() const =0
SwNodeOffset m_nStartNode
CharClass & GetAppCharClass()
Definition: init.cxx:705
const int nUndoStringLength
Definition: UndoCore.hxx:243
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:864
void AddChanges(SwTextNode &rTNd, sal_Int32 nStart, sal_Int32 nLen, css::uno::Sequence< sal_Int32 > const &rOffsets)
Definition: unovwr.cxx:383
bool m_bDetectedRangeSegmentation false
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo