[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sw/source

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Tue Nov 5 15:12:27 UTC 2019


 sw/source/uibase/dbui/dbmgr.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8ee995513d2749d8f3b4e4d6970c2f33cc1fc276
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Sep 6 15:57:06 2019 +0200
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Tue Nov 5 16:11:34 2019 +0100

    tdf#127410 Reliably copy doc print settings for MM
    
    Commit 8385e511aa400e9bd99fd0ca1c5bd5d130277b8a
    ("tdf#117664: mailmerge: copy printer settings to new mailmerge
    document") already implemented copying print settings.
    
    Move it into 'lcl_CreateWorkingDocument' so this happens
    whenever a working document is created from the source
    document.
    
    The problem previously was that a printer settings weren't
    previously copied to the working copy for the
    
        if( pSourceDocSh->IsModified() )
    
    case in 'SwDBManager::Merge'.
    
    Reviewed-on: https://gerrit.libreoffice.org/78714
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 481166337b8187add77c9b2be9f6e2009692f90b)
    
     Conflicts:
            sw/source/uibase/dbui/dbmgr.cxx
    
    Change-Id: I0dbe830bed0a36eb25da0d1b43a7f0d7dbc18f2e
    Reviewed-on: https://gerrit.libreoffice.org/82065
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    Tested-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 7ca405d91eb9..59dae0bb3ac1 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1065,6 +1065,10 @@ static SfxObjectShell* lcl_CreateWorkingDocument(
     pWorkDoc->GetIDocumentUndoRedo().DoUndo( false );
     pWorkDoc->ReplaceDocumentProperties( *pSourceDoc );
 
+    // import print settings
+    const SwPrintData &rPrintData = pSourceDoc->getIDocumentDeviceAccess().getPrintData();
+    pWorkDoc->getIDocumentDeviceAccess().setPrintData(rPrintData);
+
     if( aType == WorkingDocType::TARGET )
     {
         assert( !ppDBManager );
@@ -1344,10 +1348,6 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
             *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" );
     }


More information about the Libreoffice-commits mailing list