INTEGRATION: CWS vcl70 (1.40.16); FILE MERGED
2006/12/08 12:21:25 hdu 1.40.16.2: RESYNC: (1.40-1.41); FILE MERGED 2006/11/24 11:15:41 pl 1.40.16.1: #i65684# use IncludeFeature for CUPS >= 1.2
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: printerjob.cxx,v $
|
* $RCSfile: printerjob.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.41 $
|
* $Revision: 1.42 $
|
||||||
*
|
*
|
||||||
* last change: $Author: rt $ $Date: 2006-12-04 16:33:50 $
|
* last change: $Author: ihi $ $Date: 2006-12-21 11:56:32 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to
|
* The Contents of this file are made available subject to
|
||||||
* the terms of GNU Lesser General Public License Version 2.1.
|
* the terms of GNU Lesser General Public License Version 2.1.
|
||||||
@@ -735,22 +735,31 @@ struct less_ppd_key : public ::std::binary_function<double, double, bool>
|
|||||||
{ return left->getOrderDependency() < right->getOrderDependency(); }
|
{ return left->getOrderDependency() < right->getOrderDependency(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool writeFeature( osl::File* pFile, const PPDKey* pKey, const PPDValue* pValue )
|
static bool writeFeature( osl::File* pFile, const PPDKey* pKey, const PPDValue* pValue, bool bUseIncluseFeature )
|
||||||
{
|
{
|
||||||
if( ! pKey || ! pValue )
|
if( ! pKey || ! pValue )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
String aFeature( RTL_CONSTASCII_USTRINGPARAM( "[{\n%%BeginFeature: *" ) );
|
OStringBuffer aFeature(256);
|
||||||
aFeature += pKey->getKey();
|
aFeature.append( "[{\n" );
|
||||||
aFeature += ' ';
|
if( bUseIncluseFeature )
|
||||||
aFeature += pValue->m_aOption;
|
aFeature.append( "%%IncludeFeature:" );
|
||||||
aFeature += '\n';
|
else
|
||||||
aFeature += pValue->m_aValue;
|
aFeature.append( "%%BeginFeature:" );
|
||||||
aFeature.AppendAscii( "\n%%EndFeature\n} stopped cleartomark\n" );
|
aFeature.append( " *" );
|
||||||
ByteString aPSFeature( aFeature, RTL_TEXTENCODING_ASCII_US );
|
aFeature.append( OUStringToOString( pKey->getKey(), RTL_TEXTENCODING_ASCII_US ) );
|
||||||
|
aFeature.append( ' ' );
|
||||||
|
aFeature.append( OUStringToOString( pValue->m_aOption, RTL_TEXTENCODING_ASCII_US ) );
|
||||||
|
if( !bUseIncluseFeature )
|
||||||
|
{
|
||||||
|
aFeature.append( '\n' );
|
||||||
|
aFeature.append( OUStringToOString( pValue->m_aValue, RTL_TEXTENCODING_ASCII_US ) );
|
||||||
|
aFeature.append( "\n%%EndFeature" );
|
||||||
|
}
|
||||||
|
aFeature.append( "\n} stopped cleartomark\n" );
|
||||||
sal_uInt64 nWritten = 0;
|
sal_uInt64 nWritten = 0;
|
||||||
return pFile->write( aPSFeature.GetBuffer(), aPSFeature.Len(), nWritten )
|
return pFile->write( aFeature.getStr(), aFeature.getLength(), nWritten )
|
||||||
|| nWritten != aPSFeature.Len() ? false : true;
|
|| nWritten != (sal_uInt64)aFeature.getLength() ? false : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool bDocumentSetup )
|
bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool bDocumentSetup )
|
||||||
@@ -810,7 +819,7 @@ bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool b
|
|||||||
if( bHavePS2 )
|
if( bHavePS2 )
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bSuccess = writeFeature( pFile, pKey, pValue );
|
bSuccess = writeFeature( pFile, pKey, pValue, PrinterInfoManager::get().getUseIncludeFeature() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -903,7 +912,7 @@ void PrinterJob::writeJobPatch( osl::File* pFile, const JobData& rJobData )
|
|||||||
{
|
{
|
||||||
// note: this discards patch files not adhering to the "int" scheme
|
// note: this discards patch files not adhering to the "int" scheme
|
||||||
// as there won't be a value for them
|
// as there won't be a value for them
|
||||||
writeFeature( pFile, pKey, pKey->getValue( OUString::valueOf( patch_order.front() ) ) );
|
writeFeature( pFile, pKey, pKey->getValue( OUString::valueOf( patch_order.front() ) ), false );
|
||||||
patch_order.pop_front();
|
patch_order.pop_front();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user