summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-12 23:24:18 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-12-13 10:11:43 +0000
commit34cbfad1b27cf28c10974f8170abe00e824f4a9d (patch)
tree0f8d5356a28edb951e6acb58281c64aca402d27b /vcl/unx
parent41f59c6cf2e27a38e3cc4465582ba154be65086d (diff)
replace ByteString(String ctor
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx8
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx18
2 files changed, 13 insertions, 13 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 1fde94972895..3aec40640d2b 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1871,12 +1871,12 @@ char* PPDContext::getStreamableBuffer( sal_uLong& rBytes ) const
hash_type::const_iterator it;
for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it )
{
- ByteString aCopy( it->first->getKey(), RTL_TEXTENCODING_MS_1252 );
+ ByteString aCopy(rtl::OUStringToOString(it->first->getKey(), RTL_TEXTENCODING_MS_1252));
rBytes += aCopy.Len();
rBytes += 1; // for ':'
if( it->second )
{
- aCopy = ByteString( it->second->m_aOption, RTL_TEXTENCODING_MS_1252 );
+ aCopy = rtl::OUStringToOString(it->second->m_aOption, RTL_TEXTENCODING_MS_1252);
rBytes += aCopy.Len();
}
else
@@ -1889,13 +1889,13 @@ char* PPDContext::getStreamableBuffer( sal_uLong& rBytes ) const
char* pRun = pBuffer;
for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it )
{
- ByteString aCopy( it->first->getKey(), RTL_TEXTENCODING_MS_1252 );
+ ByteString aCopy(rtl::OUStringToOString(it->first->getKey(), RTL_TEXTENCODING_MS_1252));
int nBytes = aCopy.Len();
memcpy( pRun, aCopy.GetBuffer(), nBytes );
pRun += nBytes;
*pRun++ = ':';
if( it->second )
- aCopy = ByteString( it->second->m_aOption, RTL_TEXTENCODING_MS_1252 );
+ aCopy = rtl::OUStringToOString(it->second->m_aOption, RTL_TEXTENCODING_MS_1252);
else
aCopy = "*nil";
nBytes = aCopy.Len();
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 0f6f221d73b7..d8a7f7993adc 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -631,7 +631,7 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_aComment = it->m_aComment;
aPrinter.m_aInfo.m_aLocation = it->m_aLocation;
aPrinter.m_bModified = false;
- aPrinter.m_aGroup = ByteString( aPrinterName, aEncoding ); //provide group name in case user makes this one permanent in padmin
+ aPrinter.m_aGroup = rtl::OUStringToOString(aPrinterName, aEncoding); //provide group name in case user makes this one permanent in padmin
m_aPrinters[ aPrinterName ] = aPrinter;
}
@@ -780,11 +780,11 @@ bool PrinterInfoManager::writePrinterConfig()
aValue.append(rtl::OUStringToOString(it->first, RTL_TEXTENCODING_UTF8));
pConfig->WriteKey("Printer", aValue.makeStringAndClear());
pConfig->WriteKey( "DefaultPrinter", it->first == m_aDefaultPrinter ? "1" : "0" );
- pConfig->WriteKey( "Location", ByteString( String( it->second.m_aInfo.m_aLocation ), RTL_TEXTENCODING_UTF8 ) );
- pConfig->WriteKey( "Comment", ByteString( String( it->second.m_aInfo.m_aComment ), RTL_TEXTENCODING_UTF8 ) );
- pConfig->WriteKey( "Command", ByteString( String( it->second.m_aInfo.m_aCommand ), RTL_TEXTENCODING_UTF8 ) );
- pConfig->WriteKey( "QuickCommand", ByteString( String( it->second.m_aInfo.m_aQuickCommand ), RTL_TEXTENCODING_UTF8 ) );
- pConfig->WriteKey( "Features", ByteString( String( it->second.m_aInfo.m_aFeatures ), RTL_TEXTENCODING_UTF8 ) );
+ pConfig->WriteKey( "Location", rtl::OUStringToOString(it->second.m_aInfo.m_aLocation, RTL_TEXTENCODING_UTF8) );
+ pConfig->WriteKey( "Comment", rtl::OUStringToOString(it->second.m_aInfo.m_aComment, RTL_TEXTENCODING_UTF8) );
+ pConfig->WriteKey( "Command", rtl::OUStringToOString(it->second.m_aInfo.m_aCommand, RTL_TEXTENCODING_UTF8) );
+ pConfig->WriteKey( "QuickCommand", rtl::OUStringToOString(it->second.m_aInfo.m_aQuickCommand, RTL_TEXTENCODING_UTF8) );
+ pConfig->WriteKey( "Features", rtl::OUStringToOString(it->second.m_aInfo.m_aFeatures, RTL_TEXTENCODING_UTF8) );
pConfig->WriteKey("Copies", rtl::OString::valueOf(static_cast<sal_Int32>(it->second.m_aInfo.m_nCopies)));
pConfig->WriteKey( "Orientation", it->second.m_aInfo.m_eOrientation == orientation::Landscape ? "Landscape" : "Portrait" );
pConfig->WriteKey("PSLevel", rtl::OString::valueOf(static_cast<sal_Int32>(it->second.m_aInfo.m_nPSLevel)));
@@ -806,15 +806,15 @@ bool PrinterInfoManager::writePrinterConfig()
for( int i = 0; i < it->second.m_aInfo.m_aContext.countValuesModified(); i++ )
{
const PPDKey* pKey = it->second.m_aInfo.m_aContext.getModifiedKey( i );
- ByteString aKey( "PPD_" );
- aKey += ByteString( pKey->getKey(), RTL_TEXTENCODING_ISO_8859_1 );
+ rtl::OStringBuffer aKey(RTL_CONSTASCII_STRINGPARAM("PPD_"));
+ aKey.append(rtl::OUStringToOString(pKey->getKey(), RTL_TEXTENCODING_ISO_8859_1));
const PPDValue* pValue = it->second.m_aInfo.m_aContext.getValue( pKey );
if (pValue)
aValue.append(rtl::OUStringToOString(pValue->m_aOption, RTL_TEXTENCODING_ISO_8859_1));
else
aValue.append(RTL_CONSTASCII_STRINGPARAM("*nil"));
- pConfig->WriteKey(aKey, aValue.makeStringAndClear());
+ pConfig->WriteKey(aKey.makeStringAndClear(), aValue.makeStringAndClear());
}
}