diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-27 20:37:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-28 09:55:03 +0000 |
commit | 6f33482f8f4329b6c9874397bdb67c1b958b69c2 (patch) | |
tree | ba19bc4bff6ddbd87354f90a61615cf5f4892c5a /basic/source/runtime/methods1.cxx | |
parent | c95a10ca2079cdc33d09189aef0a8788eab274ff (diff) |
ByteString->rtl::OUStringToOString
Diffstat (limited to 'basic/source/runtime/methods1.cxx')
-rw-r--r-- | basic/source/runtime/methods1.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
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 ); |