diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-29 22:57:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-30 13:18:38 +0000 |
commit | 47e1e8494dde85414d28efafa99b33a62b59116d (patch) | |
tree | 5d054daf1893d7141db6e1b4b9440a38eb142ce2 /svl | |
parent | CreateResMgr just takes a const char* (diff) | |
download | core-47e1e8494dde85414d28efafa99b33a62b59116d.tar.gz core-47e1e8494dde85414d28efafa99b33a62b59116d.zip |
make svl ByteString free
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/slstitm.cxx | 6 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 12 | ||||
-rw-r--r-- | svl/source/svdde/ddecli.cxx | 2 |
3 files changed, 8 insertions, 12 deletions
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx index d3e41c84f2ca..7b86ab309b80 100644 --- a/svl/source/items/slstitm.cxx +++ b/svl/source/items/slstitm.cxx @@ -234,8 +234,7 @@ void SfxStringListItem::SetString( const XubString& rStr ) xub_StrLen nStart = 0; xub_StrLen nDelimPos; - XubString aStr(rStr); - aStr.ConvertLineEnd(LINEEND_CR); + XubString aStr(convertLineEnd(rStr, LINEEND_CR)); do { nDelimPos = aStr.Search( _CR, nStart ); @@ -277,8 +276,7 @@ XubString SfxStringListItem::GetString() break; } } - aStr.ConvertLineEnd(); - return aStr; + return convertLineEnd(aStr, GetSystemLineEnd()); } //------------------------------------------------------------------------ diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index d2c3e901a449..0aed9791d3c9 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -1764,18 +1764,18 @@ void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter, void SvNumberformat::LoadString( SvStream& rStream, String& rStr ) { CharSet eStream = rStream.GetStreamCharSet(); - ByteString aStr = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStream); + rtl::OString aStr = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStream); sal_Char cStream = NfCurrencyEntry::GetEuroSymbol( eStream ); - if ( aStr.Search( cStream ) == STRING_NOTFOUND ) + if (aStr.indexOf(cStream) == -1) { // simple conversion to unicode - rStr = UniString( aStr, eStream ); + rStr = rtl::OStringToOUString(aStr, eStream); } else { sal_Unicode cTarget = NfCurrencyEntry::GetEuroSymbol(); - register const sal_Char* p = aStr.GetBuffer(); - register const sal_Char* const pEnd = p + aStr.Len(); - register sal_Unicode* pUni = rStr.AllocBuffer( aStr.Len() ); + register const sal_Char* p = aStr.getStr(); + register const sal_Char* const pEnd = p + aStr.getLength(); + register sal_Unicode* pUni = rStr.AllocBuffer(aStr.getLength()); while ( p < pEnd ) { if ( *p == cStream ) diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index c2462ba38c78..fba0c250d665 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -436,7 +436,6 @@ DdePoke::DdePoke( DdeConnection& d, const String& i, const String& rData, long n ) : DdeTransaction( d, i, n ) { -// ByteString aByteStr( rData, osl_getThreadTextEncoding() ); aDdeData = DdeData( (void*) rData.GetBuffer(), sizeof(sal_Unicode) * (rData.Len()), CF_TEXT ); nType = XTYP_POKE; } @@ -456,7 +455,6 @@ DdePoke::DdePoke( DdeConnection& d, const String& i, const DdeData& rData, DdeExecute::DdeExecute( DdeConnection& d, const String& rData, long n ) : DdeTransaction( d, String(), n ) { -// ByteString aByteStr( rData, osl_getThreadTextEncoding() ); aDdeData = DdeData( (void*)rData.GetBuffer(), sizeof(sal_Unicode) * (rData.Len() + 1), CF_TEXT ); nType = XTYP_EXECUTE; } |