summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-30 09:38:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-05 09:18:18 +0000
commit6bbd168aac145b0f06b527450268b128783398fc (patch)
tree82456c2a5a8f016de8f9b456c0df7525b90ff95c
parent164b4ba0c713d09684e1381590179cd3dadce2b7 (diff)
convert SvStream::WriteLine to rtl::OString
-rw-r--r--tools/inc/tools/stream.hxx2
-rw-r--r--tools/source/stream/stream.cxx4
-rw-r--r--vcl/generic/fontmanager/fontcache.cxx14
-rw-r--r--vcl/unx/generic/printer/jobdata.cxx2
4 files changed, 11 insertions, 11 deletions
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 2270effbd074..0ef6140007d1 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -380,7 +380,7 @@ public:
sal_Bool ReadLine( ByteString& rStr );
sal_Bool ReadLine( rtl::OString& rStr );
- sal_Bool WriteLine( const ByteString& rStr );
+ sal_Bool WriteLine( const rtl::OString& rStr );
sal_Bool WriteLines( const ByteString& rStr );
sal_Bool ReadByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSet );
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index f00e7ff55068..8e2cbb0646e2 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -899,9 +899,9 @@ sal_Bool SvStream::WriteByteStringLine( const String& rStr, rtl_TextEncoding eDe
return WriteLine(rtl::OUStringToOString(rStr, eDestCharSet));
}
-sal_Bool SvStream::WriteLine( const ByteString& rStr )
+sal_Bool SvStream::WriteLine(const rtl::OString& rStr)
{
- Write( rStr.GetBuffer(), rStr.Len() );
+ Write(rStr.getStr(), rStr.getLength());
endl(*this);
return nError == SVSTREAM_OK;
}
diff --git a/vcl/generic/fontmanager/fontcache.cxx b/vcl/generic/fontmanager/fontcache.cxx
index 12767f9822e8..cbad197a19f5 100644
--- a/vcl/generic/fontmanager/fontcache.cxx
+++ b/vcl/generic/fontmanager/fontcache.cxx
@@ -122,7 +122,7 @@ void FontCache::flush()
}
aStream.SetLineDelimiter( LINEEND_LF );
- aStream.WriteLine( ByteString( CACHE_MAGIC ) );
+ aStream.WriteLine(rtl::OString(RTL_CONSTASCII_STRINGPARAM(CACHE_MAGIC)));
PrintFontManager& rManager( PrintFontManager::get() );
MultiAtomProvider* pAtoms = rManager.m_pAtoms;
@@ -139,7 +139,7 @@ void FontCache::flush()
aLine.append(aDirectory);
if( rDir.empty() && dir_it->second.m_bNoFiles )
aLine.insert(0, RTL_CONSTASCII_STRINGPARAM("Empty"));
- aStream.WriteLine(ByteString(aLine.makeStringAndClear()));
+ aStream.WriteLine(aLine.makeStringAndClear());
for( FontDirMap::const_iterator entry_it = rDir.begin(); entry_it != rDir.end(); ++entry_it )
{
@@ -150,14 +150,14 @@ void FontCache::flush()
aLine.append(RTL_CONSTASCII_STRINGPARAM("File:"));
aLine.append(entry_it->first);
- aStream.WriteLine(ByteString(aLine.makeStringAndClear()));
+ aStream.WriteLine(aLine.makeStringAndClear());
int nEntrySize = entry_it->second.m_aEntry.size();
// write: type;nfonts
aLine.append(static_cast<sal_Int32>(rEntry.front()->m_eType));
aLine.append(';');
aLine.append(static_cast<sal_Int32>(nEntrySize));
- aStream.WriteLine(ByteString(aLine.makeStringAndClear()));
+ aStream.WriteLine(aLine.makeStringAndClear());
sal_Int32 nSubEntry = 0;
for( FontCacheEntry::const_iterator it = rEntry.begin(); it != rEntry.end(); ++it, nSubEntry++ )
@@ -182,7 +182,7 @@ void FontCache::flush()
aLine.append(OUStringToOString(rAdd, RTL_TEXTENCODING_UTF8));
}
}
- aStream.WriteLine(ByteString(aLine.makeStringAndClear()));
+ aStream.WriteLine(aLine.makeStringAndClear());
const OUString& rPSName( pAtoms->getString( ATOM_PSNAME, (*it)->m_nPSName ) );
aLine.append(nSubEntry);
@@ -238,9 +238,9 @@ void FontCache::flush()
aLine.append(';');
aLine.append(OUStringToOString((*it)->m_aStyleName, RTL_TEXTENCODING_UTF8));
}
- aStream.WriteLine(ByteString(aLine.makeStringAndClear()));
+ aStream.WriteLine(aLine.makeStringAndClear());
}
- aStream.WriteLine( ByteString() );
+ aStream.WriteLine(rtl::OString());
}
}
m_bDoFlush = false;
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index 23c2bc94b5b8..bb059f02579d 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -124,7 +124,7 @@ bool JobData::getStreamBuffer( void*& pData, int& bytes )
SvMemoryStream aStream;
// write header job data
- aStream.WriteLine( "JobData 1" );
+ aStream.WriteLine(rtl::OString(RTL_CONSTASCII_STRINGPARAM("JobData 1")));
rtl::OStringBuffer aLine;