summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2014-06-23 09:10:22 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-24 15:35:56 +0000
commitd3070bc5f9a7b1b93223c97c7167806f3b41b9fc (patch)
tree27dc9aafeda2820b42c5e9642e2513ed636bedd2
parent0a0c70e05aab5f98f465e5155df3d40a9a423afe (diff)
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/doc/docnew.cxx13
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 );