vcl119: #i114306# update jobsetup before and after print job

This commit is contained in:
Philipp Lohmann [pl] 2011-02-21 17:31:56 +01:00
parent f4993b2506
commit d2681b9888

View file

@ -344,15 +344,19 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
if( ! pController->getPrinter() )
{
rtl::OUString aPrinterName( i_rInitSetup.GetPrinterName() );
bool bSetJobSetup = true;
if( ! aPrinterName.getLength() && pController->isShowDialogs() && ! pController->isDirectPrint() )
{
// get printer name from configuration
SettingsConfigItem* pItem = SettingsConfigItem::get();
aPrinterName = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPrinterUsed" ) ) );
bSetJobSetup = false;
}
boost::shared_ptr<Printer> pPrinter( new Printer( aPrinterName ) );
if( bSetJobSetup )
pPrinter->SetJobSetup( i_rInitSetup );
pController->setPrinter( pPrinter );
}