diff options
Diffstat (limited to 'sfx2/source/view/viewprn.cxx')
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index bdc85c81a8ee..9476dd22edec 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -604,10 +604,14 @@ void SfxViewShell::StartPrint( const uno::Sequence < beans::PropertyValue >& rPr )); pImpl->m_xPrinterController = xNewController; - SfxObjectShell *pObjShell = GetObjectShell(); - xNewController->setValue( "JobName", - Any( pObjShell->GetTitle(1) ) ); - xNewController->setPrinterModified( mbPrinterSettingsModified ); + // When no JobName was specified via com::sun::star::view::PrintOptions::JobName , + // use the document title as default job name + css::beans::PropertyValue* pJobNameVal = xNewController->getValue("JobName"); + if (!pJobNameVal) + { + xNewController->setValue("JobName", Any(GetObjectShell()->GetTitle(1))); + xNewController->setPrinterModified(mbPrinterSettingsModified); + } } void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rProps, bool bIsAPI, bool bIsDirect ) |