diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-09 00:11:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-09 09:32:39 +0100 |
commit | d0fecfb842d02fc027043e610bdf33f60ea109a2 (patch) | |
tree | cbc0195b8a9a29104512d8db1581dbd19c41c067 /tools | |
parent | bca5c1a4d0aa762f37d9f3f6976d3d17865f33a6 (diff) |
remove ByteString::Convert
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/string.hxx | 2 | ||||
-rw-r--r-- | tools/source/string/strcvt.cxx | 31 |
2 files changed, 0 insertions, 33 deletions
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index fc7c755dec72..a8726b5b53da 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -255,8 +255,6 @@ public: ByteString& Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTarget, sal_Bool bReplace = sal_True ); - static sal_Char Convert( sal_Char c, rtl_TextEncoding eSource, - rtl_TextEncoding eTarget ); static sal_Char ConvertFromUnicode( sal_Unicode c, rtl_TextEncoding eTextEncoding, sal_Bool bReplace = sal_True ); diff --git a/tools/source/string/strcvt.cxx b/tools/source/string/strcvt.cxx index b64b51451a44..3023a1011885 100644 --- a/tools/source/string/strcvt.cxx +++ b/tools/source/string/strcvt.cxx @@ -384,37 +384,6 @@ ByteString& ByteString::Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTar return *this; } -// ======================================================================= - -char ByteString::Convert( char c, - rtl_TextEncoding eSource, rtl_TextEncoding eTarget ) -{ - // TextEncoding Dontknow kann nicht konvertiert werden - if ( (eSource == RTL_TEXTENCODING_DONTKNOW) || (eTarget == RTL_TEXTENCODING_DONTKNOW) ) - return '\0'; - - // Wenn Source und Target gleich sind, muss nicht konvertiert werden - if ( eSource == eTarget ) - return c; - - // TextEncoding Symbol nur nach Unicode oder von Unicode wandeln, ansonsten - // wollen wir die Zeichencodes beibehalten - if ( (eSource == RTL_TEXTENCODING_SYMBOL) && - (eTarget != RTL_TEXTENCODING_UTF7) && - (eTarget != RTL_TEXTENCODING_UTF8) ) - return '\0'; - if ( (eTarget == RTL_TEXTENCODING_SYMBOL) && - (eSource != RTL_TEXTENCODING_UTF7) && - (eSource != RTL_TEXTENCODING_UTF8) ) - return '\0'; - - sal_uChar* pConvertTab = ImplGet1ByteConvertTab( eSource, eTarget, true ); - if ( pConvertTab ) - return (char)pConvertTab[(sal_uChar)c]; - else - return '\0'; -} - // ----------------------------------------------------------------------- char ByteString::ConvertFromUnicode( sal_Unicode c, rtl_TextEncoding eTextEncoding, sal_Bool bReplace ) |