summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-18 18:40:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-19 09:13:23 +0100
commitbd4f553ef03b45b4126314fa8287f933988575ea (patch)
tree976a9895e9f08e0b84baeec5bd993316ae003182 /vcl
parent2e4c6b51699362252d0bbdc27e0311c68e2ab21b (diff)
remove some UniString ctors
Change-Id: Ic2e712f4447b733b79d980e178d9d6d9d8bf0e40
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx12
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx4
2 files changed, 8 insertions, 8 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 45164979407f..42b05fc06b23 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1099,7 +1099,7 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines )
nTransPos = aLine.indexOf('"');
if (nTransPos == -1)
nTransPos = aLine.getLength();
- aValue = String( aLine.copy( 0, nTransPos ), RTL_TEXTENCODING_MS_1252 );
+ aValue = rtl::OStringToOUString(aLine.copy(0, nTransPos), RTL_TEXTENCODING_MS_1252);
// after the second doublequote can follow a / and a translation
if (nTransPos < aLine.getLength() - 2)
{
@@ -1116,7 +1116,7 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines )
else if(aLine[0] == '^')
{
aLine = aLine.copy(1);
- aValue = String( aLine, RTL_TEXTENCODING_MS_1252 );
+ aValue = rtl::OStringToOUString(aLine, RTL_TEXTENCODING_MS_1252);
eType = eSymbol;
}
else
@@ -1129,7 +1129,7 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines )
nTransPos = aLine.indexOf('/');
if (nTransPos == -1)
nTransPos = aLine.getLength();
- aValue = String( aLine.copy( 0, nTransPos ), RTL_TEXTENCODING_MS_1252 );
+ aValue = rtl::OStringToOUString(aLine.copy(0, nTransPos), RTL_TEXTENCODING_MS_1252);
if (nTransPos+1 < aLine.getLength())
aValueTranslation = handleTranslation( aLine.copy( nTransPos+1 ), bIsGlobalizedLine );
eType = eString;
@@ -1193,7 +1193,7 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines )
rtl::OString aLine(*line);
if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM("*Default")))
{
- String aKey( aLine.copy( 8 ), RTL_TEXTENCODING_MS_1252 );
+ String aKey(rtl::OStringToOUString(aLine.copy(8), RTL_TEXTENCODING_MS_1252));
sal_uInt16 nPos = aKey.Search( ':' );
if( nPos != STRING_NOTFOUND )
{
@@ -1942,8 +1942,8 @@ void PPDContext::rebuildFromStreamBuffer( char* pBuffer, sal_uLong nBytes )
if( pKey )
{
const PPDValue* pValue = NULL;
- String aOption( aLine.copy( nPos+1 ), RTL_TEXTENCODING_MS_1252 );
- if( ! aOption.EqualsAscii( "*nil" ) )
+ rtl::OUString aOption(rtl::OStringToOUString(aLine.copy(nPos+1), RTL_TEXTENCODING_MS_1252));
+ if (aOption != "*nil")
pValue = pKey->getValue( aOption );
m_aCurrentValues[ pKey ] = pValue;
#ifdef __DEBUG
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index d8d6f9b7732c..a1d96cda6707 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -331,7 +331,7 @@ void PrinterInfoManager::initialize()
if (aKey.matchL(RTL_CONSTASCII_STRINGPARAM("PPD_")))
{
aValue = aConfig.ReadKey( aKey );
- const PPDKey* pKey = m_aGlobalDefaults.m_pParser->getKey( String( aKey.copy( 4 ), RTL_TEXTENCODING_ISO_8859_1 ) );
+ const PPDKey* pKey = m_aGlobalDefaults.m_pParser->getKey(rtl::OStringToOUString(aKey.copy(4), RTL_TEXTENCODING_ISO_8859_1));
if( pKey )
{
m_aGlobalDefaults.m_aContext.
@@ -539,7 +539,7 @@ void PrinterInfoManager::initialize()
if( aKey.matchL(RTL_CONSTASCII_STRINGPARAM("PPD_")) && aPrinter.m_aInfo.m_pParser )
{
aValue = aConfig.ReadKey( aKey );
- const PPDKey* pKey = aPrinter.m_aInfo.m_pParser->getKey( String( aKey.copy( 4 ), RTL_TEXTENCODING_ISO_8859_1 ) );
+ const PPDKey* pKey = aPrinter.m_aInfo.m_pParser->getKey(rtl::OStringToOUString(aKey.copy(4), RTL_TEXTENCODING_ISO_8859_1));
if( pKey )
{
aPrinter.m_aInfo.m_aContext.