summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/generic/print/genprnpsp.cxx1
-rw-r--r--vcl/inc/vcl/jobdata.hxx3
-rw-r--r--vcl/unx/generic/printer/jobdata.cxx8
3 files changed, 10 insertions, 2 deletions
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx
index 9949eae4b6c0..6800e01ed506 100644
--- a/vcl/generic/print/genprnpsp.cxx
+++ b/vcl/generic/print/genprnpsp.cxx
@@ -584,6 +584,7 @@ sal_Bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
if( pSetupFunction( aInfo ) )
{
+ aInfo.resolveDefaultBackend();
rtl_freeMemory( pJobSetup->mpDriverData );
pJobSetup->mpDriverData = NULL;
diff --git a/vcl/inc/vcl/jobdata.hxx b/vcl/inc/vcl/jobdata.hxx
index 577e0fadb6a7..3f81877f230f 100644
--- a/vcl/inc/vcl/jobdata.hxx
+++ b/vcl/inc/vcl/jobdata.hxx
@@ -68,7 +68,8 @@ struct VCL_DLLPUBLIC JobData
void setCollate( bool bCollate );
bool setPaper( int nWidth, int nHeight ); // dimensions in pt
bool setPaperBin( int nPaperBin ); // dimensions in pt
- void setDefaultBackend( bool bUsePDF );
+ void resolveDefaultBackend();
+ void setDefaultBackend(bool bUsePDF);
// creates a new buffer using new
// it is up to the user to delete it again
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index 385ed02426ae..c55f64aad12f 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -18,9 +18,9 @@
*/
+#include <officecfg/Office/Common.hxx>
#include "vcl/jobdata.hxx"
#include "vcl/printerinfomanager.hxx"
-
#include "tools/stream.hxx"
#include <sal/alloca.h>
@@ -269,6 +269,12 @@ bool JobData::constructFromStreamBuffer( void* pData, int bytes, JobData& rJobDa
return bVersion && bPrinter && bOrientation && bCopies && bContext && bMargin && bPSLevel && bPDFDevice && bColorDevice && bColorDepth;
}
+void JobData::resolveDefaultBackend()
+{
+ if (m_nPSLevel == 0 && m_nPDFDevice == 0)
+ setDefaultBackend(officecfg::Office::Common::Print::Option::Printer::PDFAsStandardPrintJobFormat::get());
+}
+
void JobData::setDefaultBackend(bool bUsePDF)
{
if (bUsePDF && m_nPSLevel == 0 && m_nPDFDevice == 0)