From d0fecfb842d02fc027043e610bdf33f60ea109a2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 9 Aug 2011 00:11:18 +0100 Subject: remove ByteString::Convert --- tools/inc/tools/string.hxx | 2 -- tools/source/string/strcvt.cxx | 31 ------------------------------- 2 files changed, 33 deletions(-) (limited to 'tools') 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 ) -- cgit