diff options
author | Jan Holesovsky <kendy@collabora.com> | 2016-01-06 10:12:35 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-18 09:13:56 +0100 |
commit | 56a51fb78e26e4e7de6cacf31a99dc3a97ce7349 (patch) | |
tree | 339d2d873c8a55e481bb42d6b3e50918a7fbba87 /sw/source | |
parent | 72b292106d5d66b794f98a85e1fe0c970302c913 (diff) |
mailmerge: bPageStylesWithHeaderFooter should not be a return value.
Change-Id: I8d39b6b031b543e4cc6a31cf57d207b04a19ba38
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 33d55525d1dc..e54e1b8a7ac4 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1021,11 +1021,16 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, pSourceWindow, pProgressDlg, bMergeShell, pSourceShell, pParent); } - if(bCreateSingleFile) + if (bCreateSingleFile) { - bPageStylesWithHeaderFooter = CreateTargetDocShell(nMaxDumpDocs, bMergeShell, pSourceWindow, pSourceShell, - pSourceDocSh, xTargetDocShell, pTargetDoc, pTargetShell, - pTargetView, nStartingPageNo, sStartingPageDesc); + CreateTargetDocShell(nMaxDumpDocs, bMergeShell, pSourceWindow, pSourceShell, + pSourceDocSh, xTargetDocShell, pTargetDoc, pTargetShell, + pTargetView, nStartingPageNo, sStartingPageDesc); + + // #i72517# + const SwPageDesc* pSourcePageDesc = pSourceShell->FindPageDescByName(sStartingPageDesc); + const SwFrameFormat& rMaster = pSourcePageDesc->GetMaster(); + bPageStylesWithHeaderFooter = rMaster.GetHeader().IsActive() || rMaster.GetFooter().IsActive(); sModifiedStartingPageDesc = sStartingPageDesc; } @@ -1356,11 +1361,8 @@ bool SwDBManager::CreateNewTemp(OUString &sPath, const OUString &sAddress, return bErr; } -bool SwDBManager::CreateTargetDocShell(sal_Int32 nMaxDumpDocs, bool bMergeShell, vcl::Window *pSourceWindow, - SwWrtShell *pSourceShell, SwDocShell *pSourceDocSh, - SfxObjectShellRef &xTargetDocShell, SwDoc *&pTargetDoc, - SwWrtShell *&pTargetShell, SwView *&pTargetView, - sal_uInt16 &nStartingPageNo, OUString &sStartingPageDesc) +SwView* SwDBManager::CreateTargetDocShell(bool bMergeShell, vcl::Window *pSourceWindow, + SwWrtShell *pSourceShell, SwDocShell *pSourceDocSh) { // create a target docshell to put the merged document into xTargetDocShell = new SwDocShell( SfxObjectCreateMode::STANDARD ); @@ -1392,20 +1394,12 @@ bool SwDBManager::CreateTargetDocShell(sal_Int32 nMaxDumpDocs, bool bMergeShell, sStartingPageDesc = pSourceShell->GetPageDesc( pSourceShell->GetCurPageDesc()).GetName(); - // #i72517# - const SwPageDesc* pSourcePageDesc = pSourceShell->FindPageDescByName( sStartingPageDesc ); - const SwFrameFormat& rMaster = pSourcePageDesc->GetMaster(); - bool bPageStylesWithHeaderFooter = rMaster.GetHeader().IsActive() || - rMaster.GetFooter().IsActive(); - // copy compatibility options pTargetShell->GetDoc()->ReplaceCompatibilityOptions( *pSourceShell->GetDoc()); // #72821# copy dynamic defaults pTargetShell->GetDoc()->ReplaceDefaults( *pSourceShell->GetDoc()); pTargetShell->GetDoc()->ReplaceDocumentProperties( *pSourceShell->GetDoc()); - - return bPageStylesWithHeaderFooter; } void SwDBManager::LockUnlockDisp(bool bLock, SwDocShell *pSourceDocSh) |