diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-07 23:33:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-08 13:04:48 +0100 |
commit | d3ad51015c1e75cf72143867ae1031639bb256ad (patch) | |
tree | f8bc24815fe6f4fff0e393891c39db39cc32f22f /tools/source | |
parent | 5e6c0fb9ce04ec3f0115aa459e981372fa7e13be (diff) |
drop deprecated ByteString::ConvertToUnicode
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/string/strcvt.cxx | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/tools/source/string/strcvt.cxx b/tools/source/string/strcvt.cxx index c7519bdc6df5..71aef08f4711 100644 --- a/tools/source/string/strcvt.cxx +++ b/tools/source/string/strcvt.cxx @@ -416,14 +416,6 @@ char ByteString::Convert( char c, return '\0'; } -// ======================================================================= - -sal_Unicode ByteString::ConvertToUnicode( char c, rtl_TextEncoding eTextEncoding ) -{ - sal_Size nLen = 1; - return ConvertToUnicode( &c, &nLen, eTextEncoding ); -} - // ----------------------------------------------------------------------- char ByteString::ConvertFromUnicode( sal_Unicode c, rtl_TextEncoding eTextEncoding, sal_Bool bReplace ) @@ -439,42 +431,6 @@ char ByteString::ConvertFromUnicode( sal_Unicode c, rtl_TextEncoding eTextEncodi // ----------------------------------------------------------------------- -sal_Unicode ByteString::ConvertToUnicode( const char* pChar, sal_Size* pLen, rtl_TextEncoding eTextEncoding ) -{ - // TextEncoding Dontknow wird nicht konvertiert - if ( eTextEncoding == RTL_TEXTENCODING_DONTKNOW ) - return 0; - - rtl_TextToUnicodeConverter hConverter; - sal_uInt32 nInfo; - sal_Size nSrcBytes; - sal_Size nDestChars; - sal_Unicode nConvChar; - hConverter = rtl_createTextToUnicodeConverter( eTextEncoding ); - nDestChars = rtl_convertTextToUnicode( hConverter, 0, - (const sal_Char*)pChar, *pLen, - &nConvChar, 1, - RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_DEFAULT | - RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT | - RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT | - RTL_TEXTTOUNICODE_FLAGS_FLUSH, - &nInfo, &nSrcBytes ); - rtl_destroyTextToUnicodeConverter( hConverter ); - - if ( nDestChars == 1 ) - { - *pLen = nSrcBytes; - return nConvChar; - } - else - { - *pLen = 0; - return 0; - } -} - -// ----------------------------------------------------------------------- - sal_Size ByteString::ConvertFromUnicode( sal_Unicode c, char* pBuf, sal_Size nBufLen, rtl_TextEncoding eTextEncoding, sal_Bool bReplace ) { |