[Libreoffice-commits] core.git: sw/inc sw/source
Jan-Marek Glogowski
glogow at fbihome.de
Sat Jul 30 15:02:54 UTC 2016
sw/inc/dbmgr.hxx | 2 +-
sw/source/uibase/dbui/dbmgr.cxx | 23 ++---------------------
2 files changed, 3 insertions(+), 22 deletions(-)
New commits:
commit b6a698b093f78dc90836d502db3d0276f335fbfe
Author: Jan-Marek Glogowski <glogow at 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.
Change-Id: I70d0852cdcc369b0fc9f344086830f15d8dea451
Reviewed-on: https://gerrit.libreoffice.org/27721
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index c14f20a..af2f73a 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -209,7 +209,7 @@ struct SwMergeDescriptor
bSendAsAttachment( 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 197cc08..afae323 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1105,9 +1105,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_;
@@ -1433,25 +1433,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, false/*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 );
More information about the Libreoffice-commits
mailing list