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
This commit is contained in:
Kurt Zenker
2005-11-01 09:25:53 +00:00
parent a5e1ad4d12
commit 884b18d505

View File

@@ -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;