diff options
Diffstat (limited to 'sw/source/core/doc/docnew.cxx')
-rw-r--r-- | sw/source/core/doc/docnew.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 182d3af253ee..0ac491be141b 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1027,14 +1027,15 @@ void SwDoc::Paste( const SwDoc& rSource ) aIndexBefore--; rSource.CopyRange( aCpyPam, rInsPos, true ); + // Note: aCpyPam is invalid now - { - ++aIndexBefore; - SwPaM aPaM(SwPosition(aIndexBefore), - SwPosition(rInsPos.nNode)); + ++aIndexBefore; + SwPaM aPaM(SwPosition(aIndexBefore), + SwPosition(rInsPos.nNode)); - MakeUniqueNumRules(aPaM); - } + aPaM.GetDoc()->MakeUniqueNumRules(aPaM); + + // No need to update the rsid, as this is an empty doc } //TODO: Is this necessary here? SaveTblBoxCntnt( &rInsPos ); |