summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/html/htmlexp.cxx12
-rw-r--r--svtools/inc/svtools/htmlout.hxx4
-rw-r--r--svtools/source/svhtml/htmlout.cxx16
-rw-r--r--sw/source/filter/html/wrthtml.cxx7
4 files changed, 18 insertions, 21 deletions
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 1aa0ce363681..84c734e7fd13 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1136,9 +1136,8 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
xub_StrLen nFonts = rFontItem.GetFamilyName().GetTokenCount( ';' );
if ( nFonts == 1 )
{
- ByteString aTmpStr;
- HTMLOutFuncs::ConvertStringToHTML( rFontItem.GetFamilyName(),
- aTmpStr, eDestEnc, &aNonConvertibleChars );
+ rtl::OString aTmpStr = HTMLOutFuncs::ConvertStringToHTML(
+ rFontItem.GetFamilyName(), eDestEnc, &aNonConvertibleChars);
aStr.append(aTmpStr);
}
else
@@ -1146,10 +1145,9 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
const String& rList = rFontItem.GetFamilyName();
for ( xub_StrLen j = 0, nPos = 0; j < nFonts; j++ )
{
- ByteString aTmpStr;
- HTMLOutFuncs::ConvertStringToHTML(
- rList.GetToken( 0, ';', nPos ), aTmpStr, eDestEnc,
- &aNonConvertibleChars );
+ rtl::OString aTmpStr = HTMLOutFuncs::ConvertStringToHTML(
+ rList.GetToken( 0, ';', nPos ), eDestEnc,
+ &aNonConvertibleChars);
aStr.append(aTmpStr);
if ( j < nFonts-1 )
aStr.append(',');
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();
}
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 9817e8fd17eb..4a7cd31ed9a0 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -300,10 +300,9 @@ sal_uLong SwHTMLWriter::WriteStream()
"Export gelinkter Bereiche am Dok-Anfang ist nicht implemntiert" );
// nur das Tag fuer die Section merken
- ByteString aName;
- HTMLOutFuncs::ConvertStringToHTML(
- pSNd->GetSection().GetSectionName(),
- aName, eDestEnc, &aNonConvertableCharacters );
+ rtl::OString aName = HTMLOutFuncs::ConvertStringToHTML(
+ pSNd->GetSection().GetSectionName(), eDestEnc,
+ &aNonConvertableCharacters );
rtl::OStringBuffer sOut;
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_division)