From 6f33482f8f4329b6c9874397bdb67c1b958b69c2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 27 Nov 2011 20:37:42 +0000 Subject: ByteString->rtl::OUStringToOString --- basic/source/runtime/methods1.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'basic/source/runtime/methods1.cxx') diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 23431c9c1cfa..f4bc91f44661 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -997,8 +997,8 @@ sal_Bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, { // without any length information! without end-identifier! // What does that mean for Unicode?! Choosing conversion to ByteString... - ByteString aByteStr( rStr, osl_getThreadTextEncoding() ); - *pStrm << (const char*)aByteStr.GetBuffer(); + rtl::OString aByteStr(rtl::OUStringToOString(rStr, osl_getThreadTextEncoding())); + *pStrm << (const char*)aByteStr.getStr(); } } break; @@ -1252,8 +1252,9 @@ RTLFUNC(Environ) } String aResult; // should be ANSI but that's not possible under Win16 in the DLL - ByteString aByteStr( rPar.Get(1)->GetString(), osl_getThreadTextEncoding() ); - const char* pEnvStr = getenv( aByteStr.GetBuffer() ); + rtl::OString aByteStr(rtl::OUStringToOString(rPar.Get(1)->GetString(), + osl_getThreadTextEncoding())); + const char* pEnvStr = getenv(aByteStr.getStr()); if ( pEnvStr ) aResult = String::CreateFromAscii( pEnvStr ); rPar.Get(0)->PutString( aResult ); -- cgit