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>
24#include <doc.hxx>
25#include <IDocumentUndoRedo.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#include <utility>
38
39using namespace ::com::sun::star;
40using namespace ::com::sun::star::i18n;
41using namespace ::com::sun::star::uno;
42
44 sal_Unicode cIns )
45 : SwUndo(SwUndoId::OVERWRITE, &rDoc),
46 m_bGroup( false )
47{
48 SwTextNode *const pTextNd = rPos.GetNode().GetTextNode();
49 assert(pTextNd);
50 sal_Int32 const nTextNdLen = pTextNd->GetText().getLength();
51
54
56 {
57 SwPaM aPam( rPos.GetNode(), rPos.GetContentIndex(),
58 rPos.GetNode(), rPos.GetContentIndex()+1 );
60 if( !FillSaveData( aPam, *m_pRedlSaveData, false ))
61 {
62 m_pRedlSaveData.reset();
63 }
64 if (m_nStartContent < nTextNdLen)
65 {
66 rDoc.getIDocumentRedlineAccess().DeleteRedline(aPam, false, RedlineType::Any);
67 }
68 }
69
70 m_bInsChar = true;
71 if( m_nStartContent < nTextNdLen ) // no pure insert?
72 {
73 m_aDelStr += OUStringChar( pTextNd->GetText()[m_nStartContent] );
74 if( !m_pHistory )
75 m_pHistory.reset( new SwHistory );
76 SwRegHistory aRHst( *pTextNd, m_pHistory.get() );
77 m_pHistory->CopyAttr( pTextNd->GetpSwpHints(), m_nStartNode, 0,
78 nTextNdLen, false );
79 rPos.AdjustContent(+1);
80 m_bInsChar = false;
81 }
82
83 bool bOldExpFlg = pTextNd->IsIgnoreDontExpand();
84 pTextNd->SetIgnoreDontExpand( true );
85
86 pTextNd->InsertText( OUString(cIns), rPos, SwInsertFlags::EMPTYEXPAND );
87 m_aInsStr += OUStringChar( cIns );
88
89 if( !m_bInsChar )
90 {
91 const SwContentIndex aTmpIndex( rPos.GetContentNode(), rPos.GetContentIndex() - 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.GetNodeIndex() != 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.GetNode().GetTextNode();
115 if( !pDelTextNd ||
116 (pDelTextNd->GetText().getLength() != rPos.GetContentIndex() &&
117 rPos.GetContentIndex() != ( 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.GetContentIndex() < pDelTextNd->GetText().getLength())
129 {
130 SwRedlineSaveDatas aTmpSav;
131 SwPaM aPam( rPos.GetNode(), rPos.GetContentIndex(),
132 rPos.GetNode(), rPos.GetContentIndex()+1 );
133
134 const bool bSaved = FillSaveData( aPam, aTmpSav, false );
135
136 bool bOk = ( !m_pRedlSaveData && !bSaved ) ||
137 ( m_pRedlSaveData && bSaved &&
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.GetContentIndex() < pDelTextNd->GetText().getLength())
151 {
152 m_aDelStr += OUStringChar( pDelTextNd->GetText()[rPos.GetContentIndex()] );
153 rPos.AdjustContent(+1);
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,
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 SwContentIndex aTmpIndex( rPos.GetContentNode(), rPos.GetContentIndex() - 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()->Assign( m_nStartNode );
186 SwTextNode* pTextNd = rCurrentPam.GetPointNode().GetTextNode();
187 assert(pTextNd);
188 SwPosition& rPtPos = *rCurrentPam.GetPoint();
189 rPtPos.SetContent( m_nStartContent );
190
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 rPtPos.AdjustContent( m_aDelStr.getLength() );
203 pTextNd->EraseText( rPtPos, m_aInsStr.getLength() - m_aDelStr.getLength() );
204 rPtPos.SetContent( m_nStartContent );
205 }
206
207 if( !m_aDelStr.isEmpty() )
208 {
209 bool bOldExpFlg = pTextNd->IsIgnoreDontExpand();
210 pTextNd->SetIgnoreDontExpand( true );
211
212 rPtPos.AdjustContent(+1);
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, rPtPos) );
218 assert(ins.getLength() == 1); // cannot fail
219 (void) ins;
220 rPtPos.AdjustContent(-2);
221 pTextNd->EraseText( rPtPos, 1 );
222 rPtPos.AdjustContent(+2);
223 }
224 pTextNd->SetIgnoreDontExpand( bOldExpFlg );
225 rPtPos.AdjustContent(-1);
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()->GetContentIndex() != m_nStartContent )
236 {
237 rCurrentPam.SetMark();
238 rCurrentPam.GetMark()->SetContent( m_nStartContent );
239 }
240
241 if( 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()->Assign(m_nStartNode);
268 SwTextNode* pTextNd = rCurrentPam.GetPointNode().GetTextNode();
269 assert(pTextNd);
270 SwPosition& rPtPos = *rCurrentPam.GetPoint();
271
272 if( m_pRedlSaveData )
273 {
274 rPtPos.SetContent( m_nStartContent );
275 rCurrentPam.SetMark();
276 rCurrentPam.GetMark()->AdjustContent( m_aDelStr.getLength() );
277 rDoc.getIDocumentRedlineAccess().DeleteRedline( rCurrentPam, false, RedlineType::Any );
278 rCurrentPam.DeleteMark();
279 }
280 rPtPos.SetContent( !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]), rPtPos,
291 assert(ins.getLength() == 1); // cannot fail
292 (void) ins;
293 if( n < m_aDelStr.getLength() )
294 {
295 rPtPos.AdjustContent(-2);
296 pTextNd->EraseText( rPtPos, 1 );
297 rPtPos.AdjustContent( 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()->GetContentIndex() != m_nStartContent )
306 {
307 rCurrentPam.SetMark();
308 rCurrentPam.GetMark()->SetContent( 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::optional<Sequence< sal_Int32 >> oOffsets;
331 sal_Int32 nStart, nLen;
332
333 UndoTransliterate_Data( SwNodeOffset nNd, sal_Int32 nStt, sal_Int32 nStrLen, OUString aText )
334 : sText(std::move( aText )),
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{
379 utl::TransliterationWrapper aTrans( ::comphelper::getProcessComponentContext(), m_nType );
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->oOffsets.emplace( nLen );
402 sal_Int32* pIdx = pNew->oOffsets->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 {
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( oOffsets ? oOffsets->getLength() : nLen );
456 if( oOffsets )
457 aOffsets = *oOffsets;
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: */
@ UndoArg1
Definition: SwRewriter.hxx:29
OUString ShortenString(const OUString &rStr, sal_Int32 nLength, std::u16string_view aFillStr)
Shortens a string to a maximum length.
Definition: undobj.cxx:1579
const int nUndoStringLength
Definition: UndoCore.hxx:243
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
virtual void TransliterateText(const SwPaM &rPaM, utl::TransliterationWrapper &)=0
change text to Upper/Lower/Hiragana/Katakana/...
virtual bool Overwrite(const SwPaM &rRg, const OUString &rStr)=0
Overwrite string in an existing text node.
virtual bool IsIgnoreRedline() const =0
virtual bool DeleteRedline(const SwPaM &rPam, bool bSaveInUndo, RedlineType nDelType)=0
virtual const SwRedlineTable & GetRedlineTable() const =0
void CheckChar(const SwPosition &rPos, sal_Unicode cChar)
Definition: acorrect.cxx:625
Marks a character position inside a document model content node (SwContentNode)
Definition: doc.hxx:197
SwAutoCorrExceptWord * GetAutoCorrExceptWord()
Definition: doc.hxx:1410
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:329
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:158
void SetAutoCorrExceptWord(std::unique_ptr< SwAutoCorrExceptWord > pNew)
Definition: docedt.cxx:816
SwNodes & GetNodes()
Definition: doc.hxx:422
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:349
bool IsIgnoreDontExpand() const
Definition: node.hxx:163
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:901
void SetIgnoreDontExpand(bool bNew)
Definition: node.hxx:164
SwNodeOffset GetIndex() const
Definition: node.hxx:312
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
const SwPosition * GetMark() const
Definition: pam.hxx:255
SwNode & GetPointNode() const
Definition: pam.hxx:275
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
Definition: pam.cxx:643
void DeleteMark()
Definition: pam.hxx:232
const SwPosition * GetPoint() const
Definition: pam.hxx:253
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Definition: pam.hxx:251
bool empty() const
Definition: docary.hxx:267
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:25
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
void ClearSwpHintsArr(bool bDelFields)
Definition: thints.cxx:3437
void ReplaceTextOnly(sal_Int32 nPos, sal_Int32 nLen, std::u16string_view aText, const css::uno::Sequence< sal_Int32 > &rOffsets)
Definition: txtedt.cxx:2047
void EraseText(const SwContentIndex &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:2777
OUString InsertText(const OUString &rStr, const SwContentIndex &rIdx, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
insert text content
Definition: ndtxt.cxx:2372
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:252
const OUString & GetText() const
Definition: ndtxt.hxx:244
SwPaM & AddUndoRedoPaM(::sw::UndoRedoContext &, bool const bCorrToContent=false) const
Definition: undobj.cxx:100
SwUndoOverwrite(SwDoc &, SwPosition &, sal_Unicode cIns)
Definition: unovwr.cxx:43
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unovwr.cxx:179
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unovwr.cxx:245
bool CanGrouping(SwDoc &, SwPosition &, sal_Unicode cIns)
Definition: unovwr.cxx:103
virtual SwRewriter GetRewriter() const override
Returns the rewriter of this undo object.
Definition: unovwr.cxx:312
virtual ~SwUndoOverwrite() override
Definition: unovwr.cxx:99
std::unique_ptr< SwRedlineSaveDatas > m_pRedlSaveData
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unovwr.cxx:261
SwNodeOffset m_nStartNode
sal_Int32 m_nStartContent
std::unique_ptr< SwHistory > m_pHistory
Definition: undobj.hxx:167
SwUndoTransliterate(const SwPaM &rPam, const utl::TransliterationWrapper &rTrans)
Definition: unovwr.cxx:341
TransliterationFlags m_nType
std::vector< std::unique_ptr< UndoTransliterate_Data > > m_aChanges
void AddChanges(SwTextNode &rTNd, sal_Int32 nStart, sal_Int32 nLen, css::uno::Sequence< sal_Int32 > const &rOffsets)
Definition: unovwr.cxx:383
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unovwr.cxx:352
virtual ~SwUndoTransliterate() override
Definition: unovwr.cxx:348
void DoTransliterate(SwDoc &rDoc, SwPaM const &rPam)
Definition: unovwr.cxx:377
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unovwr.cxx:366
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unovwr.cxx:372
static bool FillSaveData(const SwPaM &rRange, SwRedlineSaveDatas &rSData, bool bDelRange=true, bool bCopyNext=true)
Definition: undobj.cxx:1455
static void SetSaveData(SwDoc &rDoc, SwRedlineSaveDatas &rSData)
Definition: undobj.cxx:1519
static bool CanRedlineGroup(SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd)
Definition: undobj.cxx:1547
bool m_bCacheComment
Definition: undobj.hxx:62
Blocks grouping undo actions together into an SfxListUndoAction.
virtual SwCursor & CreateNewShellCursor()=0
SwDoc & GetDoc() const
Definition: UndoCore.hxx:132
SwPaM & GetRepeatPaM()
Definition: UndoCore.hxx:134
SwDoc & GetDoc() const
Definition: UndoCore.hxx:95
IShellCursorSupplier & GetCursorSupplier()
Definition: UndoCore.hxx:97
#define CH_TXTATR_INWORD
Definition: hintids.hxx:175
#define CH_TXTATR_BREAKWORD
Definition: hintids.hxx:174
CharClass & GetAppCharClass()
Definition: init.cxx:721
void * p
sal_Int64 n
OVERWRITE
int i
long Long
bool getType(BSTR name, Type &type)
Marks a position in the document model.
Definition: pam.hxx:38
SwNode & GetNode() const
Definition: pam.hxx:81
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
Definition: pam.cxx:231
void SetContent(sal_Int32 nContentIndex)
Set content index, only valid to call this if the position points to a SwContentNode subclass.
Definition: pam.cxx:267
const SwContentNode * GetContentNode() const
Definition: pam.hxx:84
SwNodeOffset GetNodeIndex() const
Definition: pam.hxx:78
sal_Int32 GetContentIndex() const
Definition: pam.hxx:85
void AdjustContent(sal_Int32 nDelta)
Adjust content index, only valid to call this if the position points to a SwContentNode subclass.
Definition: pam.cxx:262
void SetChangeAtNode(SwDoc &rDoc)
Definition: unovwr.cxx:449
std::optional< Sequence< sal_Int32 > > oOffsets
Definition: unovwr.cxx:329
UndoTransliterate_Data(SwNodeOffset nNd, sal_Int32 nStt, sal_Int32 nStrLen, OUString aText)
Definition: unovwr.cxx:333
SwNodeOffset nNdIdx
Definition: unovwr.cxx:330
std::unique_ptr< SwHistory > pHistory
Definition: unovwr.cxx:328
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:168
SwUndoId
Definition: swundo.hxx:30
sal_uInt16 sal_Unicode