50 sal_Int32
const nTextNdLen = pTextNd->
GetText().getLength();
134 const bool bSaved =
FillSaveData( aPam, aTmpSav,
false );
162 OUString
const ins( pDelTextNd->
InsertText(OUString(cIns), rPos,
164 assert(ins.getLength() == 1);
217 OUString
const ins( pTextNd->
InsertText(aTmpStr, rPtPos) );
218 assert(ins.getLength() == 1);
291 assert(ins.getLength() == 1);
316 OUString aString =
SwResId(STR_START_QUOTE) +
384 sal_Int32 nStart, sal_Int32 nLen,
385 uno::Sequence <sal_Int32>
const & rOffsets )
389 rTNd.
GetIndex(), nStart,
static_cast<sal_Int32
>(nOffsLen),
390 rTNd.
GetText().copy(nStart, nLen));
392 m_aChanges.push_back( std::unique_ptr<UndoTransliterate_Data>(pNew) );
394 const sal_Int32* pOffsets = rOffsets.getConstArray();
396 const sal_Int32*
p = pOffsets;
398 if( *
p != ( nStart +
n ))
402 sal_Int32* pIdx = pNew->
oOffsets->getArray();
405 for(
n = 0, nMyOff = nStart;
n < nOffsLen; ++
p, ++
n, ++nMyOff )
411 *(pIdx-1) = nNewVal++;
413 else if( *
p > nMyOff )
415 for( ; *
p > nMyOff; ++nMyOff )
460 sal_Int32*
p = aOffsets.getArray();
461 for( sal_Int32
n = 0;
n <
nLen; ++
n, ++
p )
470 pHistory->TmpRollback( &rDoc, 0,
false );
OUString ShortenString(const OUString &rStr, sal_Int32 nLength, std::u16string_view aFillStr)
Shortens a string to a maximum length.
const int nUndoStringLength
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)
Marks a character position inside a document model content node (SwContentNode)
SwAutoCorrExceptWord * GetAutoCorrExceptWord()
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
void SetAutoCorrExceptWord(std::unique_ptr< SwAutoCorrExceptWord > pNew)
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
bool IsIgnoreDontExpand() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
void SetIgnoreDontExpand(bool bNew)
SwNodeOffset GetIndex() const
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwNode & GetPointNode() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
const SwPosition * GetPoint() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
void AddRule(SwUndoArg eWhat, const OUString &rWith)
SwTextNode is a paragraph in the document model.
void ClearSwpHintsArr(bool bDelFields)
void ReplaceTextOnly(sal_Int32 nPos, sal_Int32 nLen, std::u16string_view aText, const css::uno::Sequence< sal_Int32 > &rOffsets)
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...
OUString InsertText(const OUString &rStr, const SwContentIndex &rIdx, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
insert text content
SwpHints * GetpSwpHints()
const OUString & GetText() const
SwPaM & AddUndoRedoPaM(::sw::UndoRedoContext &, bool const bCorrToContent=false) const
SwUndoOverwrite(SwDoc &, SwPosition &, sal_Unicode cIns)
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual void RepeatImpl(::sw::RepeatContext &) override
bool CanGrouping(SwDoc &, SwPosition &, sal_Unicode cIns)
virtual SwRewriter GetRewriter() const override
Returns the rewriter of this undo object.
virtual ~SwUndoOverwrite() override
std::unique_ptr< SwRedlineSaveDatas > m_pRedlSaveData
virtual void RedoImpl(::sw::UndoRedoContext &) override
SwNodeOffset m_nStartNode
sal_Int32 m_nStartContent
std::unique_ptr< SwHistory > m_pHistory
SwUndoTransliterate(const SwPaM &rPam, const utl::TransliterationWrapper &rTrans)
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)
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual ~SwUndoTransliterate() override
void DoTransliterate(SwDoc &rDoc, SwPaM const &rPam)
virtual void RedoImpl(::sw::UndoRedoContext &) override
virtual void RepeatImpl(::sw::RepeatContext &) override
static bool FillSaveData(const SwPaM &rRange, SwRedlineSaveDatas &rSData, bool bDelRange=true, bool bCopyNext=true)
static void SetSaveData(SwDoc &rDoc, SwRedlineSaveDatas &rSData)
static bool CanRedlineGroup(SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd)
Blocks grouping undo actions together into an SfxListUndoAction.
virtual SwCursor & CreateNewShellCursor()=0
IShellCursorSupplier & GetCursorSupplier()
#define CH_TXTATR_BREAKWORD
CharClass & GetAppCharClass()
bool getType(BSTR name, Type &type)
Marks a position in the document model.
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
void SetContent(sal_Int32 nContentIndex)
Set content index, only valid to call this if the position points to a SwContentNode subclass.
const SwContentNode * GetContentNode() const
SwNodeOffset GetNodeIndex() const
sal_Int32 GetContentIndex() const
void AdjustContent(sal_Int32 nDelta)
Adjust content index, only valid to call this if the position points to a SwContentNode subclass.
void SetChangeAtNode(SwDoc &rDoc)
std::optional< Sequence< sal_Int32 > > oOffsets
UndoTransliterate_Data(SwNodeOffset nNd, sal_Int32 nStt, sal_Int32 nStrLen, OUString aText)
std::unique_ptr< SwHistory > pHistory
OUString SwResId(TranslateId aId)