summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-01-06 10:32:24 +0100
committerJan Holesovsky <kendy@collabora.com>2016-03-16 14:56:01 +0100
commitf518c859b4f805600ce4b3991cf7e8d2b401eb9d (patch)
treeac23a71d86de45e39c880102f4ba2e16b5b8a9ff
parent3a7332e97943c5ee13cb0155e400b7adc323d75e (diff)
mailmerge: nStartingPageNo and sStartingPageDesc shouldn't be return values.
Change-Id: I86a049411c2ec461e66009e6dc54d8ea086e7f12
-rw-r--r--sw/inc/dbmgr.hxx3
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx15
2 files changed, 8 insertions, 10 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 7304b8d439b8..335bd0c84941 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -251,8 +251,7 @@ friend class SwConnectionDisposedListener_Impl;
SAL_DLLPRIVATE void 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);
+ SwWrtShell *&pTargetShell, SwView *&pTargetView);
SAL_DLLPRIVATE void LockUnlockDisp(bool bLock, SwDocShell *pSourceDocSh);
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index e54e1b8a7ac4..4303cbdacd15 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1024,8 +1024,13 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
if (bCreateSingleFile)
{
CreateTargetDocShell(nMaxDumpDocs, bMergeShell, pSourceWindow, pSourceShell,
- pSourceDocSh, xTargetDocShell, pTargetDoc, pTargetShell,
- pTargetView, nStartingPageNo, sStartingPageDesc);
+ pSourceDocSh, xTargetDocShell, pTargetDoc,
+ pTargetShell, pTargetView);
+
+ // determine the page style and number used at the start of the source document
+ pSourceShell->SttEndDoc(true);
+ nStartingPageNo = pSourceShell->GetVirtPageNum();
+ sStartingPageDesc = pSourceShell->GetPageDesc(pSourceShell->GetCurPageDesc()).GetName();
// #i72517#
const SwPageDesc* pSourcePageDesc = pSourceShell->FindPageDescByName(sStartingPageDesc);
@@ -1388,12 +1393,6 @@ SwView* SwDBManager::CreateTargetDocShell(bool bMergeShell, vcl::Window *pSource
//copy the styles from the source to the target document
pTargetView->GetDocShell()->_LoadStyles( *pSourceDocSh, true );
- //determine the page style and number used at the start of the source document
- pSourceShell->SttEndDoc(true);
- nStartingPageNo = pSourceShell->GetVirtPageNum();
- sStartingPageDesc = pSourceShell->GetPageDesc(
- pSourceShell->GetCurPageDesc()).GetName();
-
// copy compatibility options
pTargetShell->GetDoc()->ReplaceCompatibilityOptions( *pSourceShell->GetDoc());
// #72821# copy dynamic defaults