summaryrefslogtreecommitdiff
path: root/sw/source/core/frmedt/fecopy.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/frmedt/fecopy.cxx')
-rw-r--r--sw/source/core/frmedt/fecopy.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index e3056be2415e..0a2ed741e53f 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1043,6 +1043,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
// muessen die BoxAttribute aber entfernt werden.
GetDoc()->ClearBoxNumAttrs( rInsPos.nNode );
}
+
//find out if the clipboard document starts with a table
bool bStartWithTable = 0 != aCpyPam.Start()->nNode.GetNode().FindTableNode();
SwPosition aInsertPosition( rInsPos );
@@ -1063,6 +1064,22 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
}
}
+ // Update the rsid of each pasted text node.
+ {
+ xub_StrLen nNodesCnt = aCpyPam.End()->nNode.GetIndex() - aCpyPam.Start()->nNode.GetIndex();
+ SwNodes &rDestNodes = GetDoc()->GetNodes();
+ xub_StrLen nDestStart = PCURCRSR->GetPoint()->nNode.GetIndex() - nNodesCnt;
+
+ for ( sal_uInt64 nIdx = 0; nIdx <= nNodesCnt; nIdx++ )
+ {
+ SwTxtNode *pTxtNode = rDestNodes[ nDestStart + nIdx ]->GetTxtNode();
+ if ( pTxtNode )
+ {
+ GetDoc()->UpdateParRsid( pTxtNode );
+ }
+ }
+ }
+
SaveTblBoxCntnt( &rInsPos );
if(bIncludingPageFrames && bStartWithTable)
{