sw/inc/dbmgr.hxx | 2 +- sw/source/uibase/dbui/dbmgr.cxx | 23 ++--------------------- 2 files changed, 3 insertions(+), 22 deletions(-)
New commits: commit 498bcdbbb02696c66f9bd093b30c17b9efd1459c Author: Jan-Marek Glogowski <glo...@fbihome.de> Date: Sat Jul 30 15:26:07 2016 +0200 tdf#95251 MM just allow print as single document Remove kept block from revert of 138d29aa09417eba4d15ade4c9f4dab2620b6326 After this revert MM just supports pinting via a single merged document. Printing as inidividual files should have still worked, but as a workaround we remove this functionality, until the print backend can handle multiple-file print jobs correctly. Reviewed-on: https://gerrit.libreoffice.org/27721 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> (cherry picked from commit b6a698b093f78dc90836d502db3d0276f335fbfe) Conflicts: sw/source/uibase/dbui/dbmgr.cxx Change-Id: I70d0852cdcc369b0fc9f344086830f15d8dea451 Reviewed-on: https://gerrit.libreoffice.org/27722 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index 1e409a6..442d0e1 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -211,7 +211,7 @@ struct SwMergeDescriptor bPrintAsync( false ), pMailMergeConfigItem( nullptr ) { - if( nType == DBMGR_MERGE_SHELL ) + if( nType == DBMGR_MERGE_SHELL || nType == DBMGR_MERGE_PRINTER ) bCreateSingleFile = true; } }; diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index be17f00..7b4c2f6 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1103,9 +1103,9 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, assert( bMT_EMAIL && !bCheckSingleFile_ ); bCheckSingleFile_ = false; } - else if( bMT_SHELL ) + else if( bMT_SHELL || bMT_PRINTER ) { - assert( bMT_SHELL && bCheckSingleFile_ ); + assert( (bMT_SHELL || bMT_PRINTER) && bCheckSingleFile_ ); bCheckSingleFile_ = true; } const bool bCreateSingleFile = bCheckSingleFile_; @@ -1431,25 +1431,6 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, rMergeDescriptor.pMailMergeConfigItem->AddMergedDocument( aMergeInfo ); } } - else if( bMT_PRINTER ) - { - if( !bWorkDocInitialized ) // set up printing only once at the beginning - { - uno::Sequence< beans::PropertyValue > aOptions( rMergeDescriptor.aPrintOptions ); - lcl_PreparePrinterOptions( rMergeDescriptor.aPrintOptions, false, aOptions ); - - pWorkView->StartPrint( aOptions, bIsMergeSilent, rMergeDescriptor.bPrintAsync ); - // some GetPrinter functions have a true default, so keep the false - SfxPrinter* pDocPrt = pWorkView->GetPrinter(); - JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : SfxViewShell::GetJobSetup(); - if( !Printer::PreparePrintJob( pWorkView->GetPrinterController(), aJobSetup ) ) - MergeCancel(); - } - if( IsMergeOk() && !Printer::ExecutePrintJob( pWorkView->GetPrinterController()) ) - { - m_aMergeStatus = MergeStatus::ERROR; - } - } else { assert( bNeedsTempFiles ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits