summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 4a0740829142..2d1ce305f444 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1135,8 +1135,6 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
++targetDocPageCount; // Docs always start on odd pages (so offset must be even).
SwNodeIndex appendedDocStart = pTargetDoc->AppendDoc(*rWorkShell.GetDoc(),
nStartingPageNo, pTargetPageDesc, nDocNo == 1, targetDocPageCount);
- // #i72820# calculate layout to be able to find the correct page index
- pTargetShell->CalcLayout();
targetDocPageCount += rWorkShell.GetPageCnt();
if ( (nMaxDumpDocs < 0) || (nDocNo <= nMaxDumpDocs) )
lcl_SaveDoc( xTargetDocShell, "MergeDoc" );
@@ -1288,6 +1286,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
// Unfreeze target document layouts and correct all PageDescs.
if(rMergeDescriptor.bCreateSingleFile)
{
+ pTargetShell->CalcLayout();
std::set<SwRootFrm*> aAllLayouts = pTargetShell->GetDoc()->GetAllLayouts();
std::for_each( aAllLayouts.begin(), aAllLayouts.end(),
::std::bind2nd(::std::mem_fun(&SwRootFrm::FreezeLayout), false));