sw/source/uibase/dbui/dbmgr.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 8385e511aa400e9bd99fd0ca1c5bd5d130277b8a
Author: Vasily Melenchuk <vasily.melenc...@cib.de>
Date:   Tue May 15 12:06:41 2018 +0300

    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.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>

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" );
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to