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

New commits:
commit 3ae74cd221898622821e813e3bb86b9335e38055
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.
    
    Reviewed-on: https://gerrit.libreoffice.org/54358
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>
    
    Conflicts:
            sw/source/uibase/dbui/dbmgr.cxx
    
    Change-Id: Ic127dcbfbe8f1e80073b06ecb399100344f4c01d

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 5c6540112fcb..36a14daf5982 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -135,6 +135,7 @@
 #include <calc.hxx>
 #include <dbfld.hxx>
 #include <IDocumentState.hxx>
+#include <IDocumentDeviceAccess.hxx>
 
 #include <memory>
 #include <comphelper/propertysequence.hxx>
@@ -1240,6 +1241,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, "MergeDoc" );
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to