summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-11-25 16:22:11 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-11-30 09:32:10 +0100
commitc906412f74b719050a2a3ea412c394587e7c73f2 (patch)
tree75fe74ae6190565e2b1d4e6c152099dfdc09a3ae /vcl/source
parent6b55b62b3e94fb1d5405264f4b03d107f73705c2 (diff)
Add 'SinglePrintJobs' to PrintOptions
So that this option can be set via UNO API Change-Id: I0b69162661a4327d59aaed82d5eff98cb50d852c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106655 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/print3.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 544e07ce02d4..404458218930 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -493,8 +493,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
}
else if( aDlg->isSingleJobs() )
{
- xController->setValue( "PrintCollateAsSingleJobs",
- css::uno::makeAny( true ) );
+ xController->getPrinter()->SetSinglePrintJobs(true);
}
}
catch (const std::bad_alloc&)
@@ -569,12 +568,7 @@ bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::Printer
if (!mpPrinter)
return false;
- bool bSinglePrintJobs = false;
- css::beans::PropertyValue* pSingleValue = i_xController->getValue(OUString("PrintCollateAsSingleJobs"));
- if( pSingleValue )
- {
- pSingleValue->Value >>= bSinglePrintJobs;
- }
+ bool bSinglePrintJobs = i_xController->getPrinter()->IsSinglePrintJobs();
css::beans::PropertyValue* pFileValue = i_xController->getValue(OUString("LocalFileName"));
if( pFileValue )
@@ -1714,6 +1708,12 @@ void PrinterController::pushPropertiesToPrinter()
pVal->Value >>= bCollate;
mpImplData->mxPrinter->SetCopyCount( static_cast<sal_uInt16>(nCopyCount), bCollate );
+ pVal = getValue("SinglePrintJobs");
+ bool bSinglePrintJobs = false;
+ if (pVal)
+ pVal->Value >>= bSinglePrintJobs;
+ mpImplData->mxPrinter->SetSinglePrintJobs(bSinglePrintJobs);
+
// duplex mode
pVal = getValue( OUString( "DuplexMode" ) );
if( pVal )