diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-22 23:43:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-23 09:02:24 +0100 |
commit | fee307d452753efbcb3d450e6a5dcd945ba41463 (patch) | |
tree | 0ab62d23800a21951280546b5971d49b2d75f458 /svtools | |
parent | 17b8373171e52e6ce4c5ecf5074082f76cb36118 (diff) |
deugly HTMLOutFuncs::ConvertStringToHTML
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/htmlout.hxx | 4 | ||||
-rw-r--r-- | svtools/source/svhtml/htmlout.cxx | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/svtools/inc/svtools/htmlout.hxx b/svtools/inc/svtools/htmlout.hxx index e0099626094c..588e6658d42e 100644 --- a/svtools/inc/svtools/htmlout.hxx +++ b/svtools/inc/svtools/htmlout.hxx @@ -68,9 +68,9 @@ struct HTMLOutFuncs static const sal_Char sNewLine[]; // \015\012 #endif - SVT_DLLPUBLIC static void ConvertStringToHTML( const String& sSrc, ByteString& rDest, + SVT_DLLPUBLIC static rtl::OString ConvertStringToHTML( const String& sSrc, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, - String *pNonConvertableChars = 0); + String *pNonConvertableChars = 0 ); SVT_DLLPUBLIC static SvStream& Out_AsciiTag( SvStream&, const sal_Char* pStr, sal_Bool bOn = sal_True, diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 25fd6dfb165e..da7ff07fc92e 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -515,16 +515,16 @@ rtl::OString lcl_FlushToAscii( HTMLOutContext& rContext ) return aDest.makeStringAndClear(); } -void HTMLOutFuncs::ConvertStringToHTML( const String& rSrc, - ByteString& rDest, - rtl_TextEncoding eDestEnc, - String *pNonConvertableChars ) +rtl::OString HTMLOutFuncs::ConvertStringToHTML( const String& rSrc, + rtl_TextEncoding eDestEnc, String *pNonConvertableChars ) { HTMLOutContext aContext( eDestEnc ); + rtl::OStringBuffer aDest; for( sal_uInt32 i=0UL, nLen = rSrc.Len(); i < nLen; i++ ) - rDest += ByteString(lcl_ConvertCharToHTML( + aDest.append(lcl_ConvertCharToHTML( rSrc.GetChar( (xub_StrLen)i ), aContext, pNonConvertableChars)); - rDest += ByteString(lcl_FlushToAscii( aContext )); + aDest.append(lcl_FlushToAscii(aContext)); + return aDest.makeStringAndClear(); } SvStream& HTMLOutFuncs::Out_AsciiTag( SvStream& rStream, const sal_Char *pStr, @@ -972,12 +972,12 @@ rtl::OString HTMLOutFuncs::CreateTableDataOptionsValNum( append(';'); // Language fuer Format 0 if ( nFormat ) { - ByteString aNumStr; + rtl::OString aNumStr; LanguageType nLang; const SvNumberformat* pFormatEntry = rFormatter.GetEntry( nFormat ); if ( pFormatEntry ) { - ConvertStringToHTML( pFormatEntry->GetFormatstring(), aNumStr, + aNumStr = ConvertStringToHTML( pFormatEntry->GetFormatstring(), eDestEnc, pNonConvertableChars ); nLang = pFormatEntry->GetLanguage(); } |