sw/source/core/doc/docnew.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
New commits: commit d3070bc5f9a7b1b93223c97c7167806f3b41b9fc Author: Jan-Marek Glogowski <glo...@fbihome.de> Date: Mon Jun 23 09:10:22 2014 +0200 Update SwDoc::Paste from SwFEShell::Paste SwDoc::Paste is already an minimal version of SwFEShell::Paste. Update the code based on the changes made in commit 4580094d2d9d5b952c4526ee23204f75a5bb2f1b Change-Id: I4d784f393952374e2a174510f9378b05cfdb78eb Reviewed-on: https://gerrit.libreoffice.org/9861 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 182d3af..0ac491b 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 );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits