diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/printer/jobdata.cxx | 18 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/printer/printerinfomanager.cxx | 8 |
3 files changed, 17 insertions, 17 deletions
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx index 4b9756b58e30..76c23b4997da 100644 --- a/vcl/unx/generic/printer/jobdata.cxx +++ b/vcl/unx/generic/printer/jobdata.cxx @@ -200,24 +200,24 @@ bool JobData::constructFromStreamBuffer( void* pData, int bytes, JobData& rJobDa while( ! aStream.IsEof() ) { aStream.ReadLine( aLine ); - if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM("JobData"))) + if (aLine.startsWith("JobData")) bVersion = true; - else if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM(printerEquals))) + else if (aLine.startsWith(printerEquals)) { bPrinter = true; rJobData.m_aPrinterName = OStringToOUString(aLine.copy(RTL_CONSTASCII_LENGTH(printerEquals)), RTL_TEXTENCODING_UTF8); } - else if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM(orientatationEquals))) + else if (aLine.startsWith(orientatationEquals)) { bOrientation = true; rJobData.m_eOrientation = aLine.copy(RTL_CONSTASCII_LENGTH(orientatationEquals)).equalsIgnoreAsciiCase("landscape") ? orientation::Landscape : orientation::Portrait; } - else if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM(copiesEquals))) + else if (aLine.startsWith(copiesEquals)) { bCopies = true; rJobData.m_nCopies = aLine.copy(RTL_CONSTASCII_LENGTH(copiesEquals)).toInt32(); } - else if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM(margindajustmentEquals))) + else if (aLine.startsWith(margindajustmentEquals)) { bMargin = true; OString aValues(aLine.copy(RTL_CONSTASCII_LENGTH(margindajustmentEquals))); @@ -226,22 +226,22 @@ bool JobData::constructFromStreamBuffer( void* pData, int bytes, JobData& rJobDa rJobData.m_nTopMarginAdjust = aValues.getToken(2, ',').toInt32(); rJobData.m_nBottomMarginAdjust = aValues.getToken(3, ',').toInt32(); } - else if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM(colordepthEquals))) + else if (aLine.startsWith(colordepthEquals)) { bColorDepth = true; rJobData.m_nColorDepth = aLine.copy(RTL_CONSTASCII_LENGTH(colordepthEquals)).toInt32(); } - else if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM(colordeviceEquals))) + else if (aLine.startsWith(colordeviceEquals)) { bColorDevice = true; rJobData.m_nColorDevice = aLine.copy(RTL_CONSTASCII_LENGTH(colordeviceEquals)).toInt32(); } - else if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM(pslevelEquals))) + else if (aLine.startsWith(pslevelEquals)) { bPSLevel = true; rJobData.m_nPSLevel = aLine.copy(RTL_CONSTASCII_LENGTH(pslevelEquals)).toInt32(); } - else if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM(pdfdeviceEquals))) + else if (aLine.startsWith(pdfdeviceEquals)) { bPDFDevice = true; rJobData.m_nPDFDevice = aLine.copy(RTL_CONSTASCII_LENGTH(pdfdeviceEquals)).toInt32(); diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 35bea659309a..efd8ee96695c 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -994,7 +994,7 @@ void PPDParser::parse( ::std::list< OString >& rLines ) continue; // default values are parsed in pass 2 - if (aKey.matchL(RTL_CONSTASCII_STRINGPARAM("Default"))) + if (aKey.startsWith("Default")) continue; bool bQuery = false; @@ -1174,7 +1174,7 @@ void PPDParser::parse( ::std::list< OString >& rLines ) for( line = rLines.begin(); line != rLines.end(); ++line ) { OString aLine(*line); - if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM("*Default"))) + if (aLine.startsWith("*Default")) { OUString aKey(OStringToOUString(aLine.copy(8), RTL_TEXTENCODING_MS_1252)); sal_Int32 nPos = aKey.indexOf( ':' ); @@ -1204,8 +1204,8 @@ void PPDParser::parse( ::std::list< OString >& rLines ) } } } - else if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM("*UIConstraints")) || - aLine.matchL(RTL_CONSTASCII_STRINGPARAM("*NonUIConstraints"))) + else if (aLine.startsWith("*UIConstraints") || + aLine.startsWith("*NonUIConstraints")) { parseConstraint( aLine ); } diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx index e9f7791c20ec..4f8f56ec75ca 100644 --- a/vcl/unx/generic/printer/printerinfomanager.cxx +++ b/vcl/unx/generic/printer/printerinfomanager.cxx @@ -315,7 +315,7 @@ void PrinterInfoManager::initialize() for( int nKey = 0; nKey < aConfig.GetKeyCount(); ++nKey ) { OString aKey( aConfig.GetKeyName( nKey ) ); - if (aKey.matchL(RTL_CONSTASCII_STRINGPARAM("PPD_"))) + if (aKey.startsWith("PPD_")) { aValue = aConfig.ReadKey( aKey ); const PPDKey* pKey = m_aGlobalDefaults.m_pParser->getKey(OStringToOUString(aKey.copy(4), RTL_TEXTENCODING_ISO_8859_1)); @@ -327,7 +327,7 @@ void PrinterInfoManager::initialize() sal_True ); } } - else if (aKey.matchL(RTL_CONSTASCII_STRINGPARAM("SubstFont_"))) + else if (aKey.startsWith("SubstFont_")) { aValue = aConfig.ReadKey( aKey ); m_aGlobalDefaults.m_aFontSubstitutes[ OStringToOUString( aKey.copy( 10 ), RTL_TEXTENCODING_ISO_8859_1 ) ] = OStringToOUString( aValue, RTL_TEXTENCODING_ISO_8859_1 ); @@ -523,7 +523,7 @@ void PrinterInfoManager::initialize() for( int nKey = 0; nKey < aConfig.GetKeyCount(); ++nKey ) { OString aKey( aConfig.GetKeyName( nKey ) ); - if( aKey.matchL(RTL_CONSTASCII_STRINGPARAM("PPD_")) && aPrinter.m_aInfo.m_pParser ) + if( aKey.startsWith("PPD_") && aPrinter.m_aInfo.m_pParser ) { aValue = aConfig.ReadKey( aKey ); const PPDKey* pKey = aPrinter.m_aInfo.m_pParser->getKey(OStringToOUString(aKey.copy(4), RTL_TEXTENCODING_ISO_8859_1)); @@ -535,7 +535,7 @@ void PrinterInfoManager::initialize() sal_True ); } } - else if( aKey.matchL(RTL_CONSTASCII_STRINGPARAM("SubstFont_")) ) + else if( aKey.startsWith("SubstFont_") ) { aValue = aConfig.ReadKey( aKey ); aPrinter.m_aInfo.m_aFontSubstitutes[ OStringToOUString( aKey.copy( 10 ), RTL_TEXTENCODING_ISO_8859_1 ) ] = OStringToOUString( aValue, RTL_TEXTENCODING_ISO_8859_1 ); |