summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Melenchuk <Vasily.Melenchuk@cib.de>2018-05-15 12:06:41 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-05-17 13:06:41 +0200
commit8385e511aa400e9bd99fd0ca1c5bd5d130277b8a (patch)
treededc42fa0b846048ab2df466a528a3c692d0a666
parent4e207c2e17d75a3cb7b6b72690375279be40d64a (diff)
tdf#117664: mailmerge: copy printer settings to new mailmerge document
Created mailmerge output document was not using current printer settings, which can be taken not only from settings, but overriden by currently opened template. Change-Id: Ic127dcbfbe8f1e80073b06ecb399100344f4c01d Reviewed-on: https://gerrit.libreoffice.org/54358 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 8d6487dae6ee..bae61f7e5be1 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -138,6 +138,7 @@
#include <IDocumentState.hxx>
#include <imaildsplistener.hxx>
#include <iodetect.hxx>
+#include <IDocumentDeviceAccess.hxx>
#include <memory>
#include <comphelper/propertysequence.hxx>
@@ -1341,6 +1342,11 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
xTargetDocShell = lcl_CreateWorkingDocument( WorkingDocType::TARGET,
*pSourceShell, bMT_SHELL ? pSourceWindow : nullptr,
nullptr, &pTargetView, &pTargetShell, &pTargetDoc );
+
+ // import current print settings
+ const SwPrintData &rPrintData = pSourceShell->getIDocumentDeviceAccess().getPrintData();
+ pTargetDoc->getIDocumentDeviceAccess().setPrintData(rPrintData);
+
if (nMaxDumpDocs)
lcl_SaveDebugDoc( xTargetDocShell.get(), "MergeDoc" );
}