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