add another SwTextNode::CopyText variant

part of the process of hiding the internals of SwPosition

Change-Id: I79c21a370918566c7d93008a62ff9843d3bfe3fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141115
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2022-10-08 20:11:34 +02:00
committed by Noel Grandin
parent 0df9418318
commit 1868dd67c9
3 changed files with 15 additions and 2 deletions
+5
View File
@@ -351,6 +351,11 @@ public:
const SwContentIndex &rStart,
sal_Int32 nLen,
const bool bForceCopyOfAllAttrs = false );
void CopyText( SwTextNode * const pDest,
const SwContentIndex &rDestStart,
const SwPosition &rStart,
sal_Int32 nLen,
const bool bForceCopyOfAllAttrs = false );
void CutText(SwTextNode * const pDest,
const SwContentIndex & rStart, const sal_Int32 nLen);
@@ -5042,8 +5042,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
? pEnd->GetContentIndex()
: pSttTextNd->GetText().getLength())
- pStt->GetContentIndex();
pSttTextNd->CopyText( pDestTextNd, aDestIdx,
pStt->nContent, nCpyLen );
pSttTextNd->CopyText( pDestTextNd, aDestIdx, *pStt, nCpyLen );
if( bEndEqualIns )
pEnd->AdjustContent( -nCpyLen );
}
+9
View File
@@ -2055,6 +2055,15 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
CopyText( pDest, aIdx, rStart, nLen, bForceCopyOfAllAttrs );
}
void SwTextNode::CopyText( SwTextNode *const pDest,
const SwContentIndex &rDestStart,
const SwPosition &rStart,
sal_Int32 nLen,
const bool bForceCopyOfAllAttrs )
{
CopyText( pDest, rDestStart, rStart.nContent, nLen, bForceCopyOfAllAttrs );
}
void SwTextNode::CopyText( SwTextNode *const pDest,
const SwContentIndex &rDestStart,
const SwContentIndex &rStart,