sw/inc/ndtxt.hxx                                        |    5 +++++
 sw/source/core/doc/DocumentContentOperationsManager.cxx |    3 +--
 sw/source/core/txtnode/ndtxt.cxx                        |    9 +++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 1868dd67c97f2c30948a857e328722a296fca3e8
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Oct 8 17:12:35 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Oct 8 20:11:34 2022 +0200

    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.gran...@collabora.co.uk>

diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 9c773751537e..5cfc5d31be5c 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -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);
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
@@ -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,

Reply via email to