From adf4c82b6c4ec9d8892f5c417e4a81cf04808447 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Wed, 10 Aug 2016 11:23:23 +0200 Subject: Flush the page break for correct layouting This is a workaround to create correct SwPageFrm objects for layouting, so the page break is actually visible when copying nodes, so we create the correct SwPageFrm. This is especially problematic for mail merge after the fix in commit 60d34e1c840d2c317bb7d0a5b14f4602c22b3fcc, which - correctly - checks all later SwPageDesc for every fix done by CheckPageDescs(). Change-Id: Ie6ea2e9a0587199be4dbaf3ed63a94c29b318ce2 --- sw/source/core/doc/docnew.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sw') diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 3e162fdfb6dd..07ac968c241c 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1066,6 +1066,13 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu for (sw::mark::IMark* pMark : aSeenMarks) pMarkAccess->repositionMark(pMark, aPaM); } + + // Flush the page break, if we want to keep it + if ( !bDeletePrevious ) + { + pTargetShell->EndAllAction(); + pTargetShell->StartAllAction(); + } } } #ifdef DBG_UTIL -- cgit