diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-10-08 17:12:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-08 20:11:34 +0200 |
commit | 1868dd67c97f2c30948a857e328722a296fca3e8 (patch) | |
tree | 7fe101a7380316438f241a8c86697bf1668717e2 /sw/source | |
parent | 0df9418318b5f6718fd864f1755587b584d2a322 (diff) |
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>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/DocumentContentOperationsManager.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 677ae7f0b8fd..51c0fdb9cba9 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -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 ); } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index c411628df4be..cab06e4959aa 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2057,6 +2057,15 @@ void SwTextNode::CopyText( SwTextNode *const pDest, 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, sal_Int32 nLen, const bool bForceCopyOfAllAttrs ) |