From 884b18d5057d4083fc03ae49b6a1da8412e2edba Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Tue, 1 Nov 2005 09:25:53 +0000 Subject: [PATCH] INTEGRATION: CWS vcl42 (1.12.14); FILE MERGED 2005/10/05 22:38:47 pl 1.12.14.2: RESYNC: (1.12-1.13); FILE MERGED 2005/07/14 08:00:44 pl 1.12.14.1: #i51879# merge global defaults into CUPS printers --- psprint/source/printer/cupsmgr.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/psprint/source/printer/cupsmgr.cxx b/psprint/source/printer/cupsmgr.cxx index 57837bdb1f13..55de8e9c6960 100644 --- a/psprint/source/printer/cupsmgr.cxx +++ b/psprint/source/printer/cupsmgr.cxx @@ -4,9 +4,9 @@ * * $RCSfile: cupsmgr.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: rt $ $Date: 2005-09-08 16:44:29 $ + * last change: $Author: kz $ $Date: 2005-11-01 10:25:53 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -456,6 +456,10 @@ void CUPSManager::initialize() rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); int nPrinter = m_nDests; + // reset global default PPD options; these are queried on demand from CUPS + m_aGlobalDefaults.m_pParser = NULL; + m_aGlobalDefaults.m_aContext = PPDContext(); + // add CUPS printers, should there be a printer // with the same name as a CUPS printer, overwrite it while( nPrinter-- ) @@ -472,7 +476,10 @@ void CUPSManager::initialize() } // initialize printer with possible configuration from psprint.conf + bool bSetToGlobalDefaults = m_aPrinters.find( aPrinterName ) == m_aPrinters.end(); Printer aPrinter = m_aPrinters[ aPrinterName ]; + if( bSetToGlobalDefaults ) + aPrinter.m_aInfo = m_aGlobalDefaults; aPrinter.m_aInfo.m_aPrinterName = aPrinterName; if( pDest->is_default ) m_aDefaultPrinter = aPrinterName;