diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-28 00:30:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-28 09:20:33 +0100 |
commit | 820a569b8d119ae5a62ceb3f4fab027792902f35 (patch) | |
tree | c26e8b37e2fd24b563142f7e3d192e51e890506a /sw | |
parent | ByteString->rtl::OStringBuffer (diff) | |
download | core-820a569b8d119ae5a62ceb3f4fab027792902f35.tar.gz core-820a569b8d119ae5a62ceb3f4fab027792902f35.zip |
ByteString->rtl::OStringBuffer
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 45 | ||||
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/htmltabw.cxx | 15 |
3 files changed, 34 insertions, 32 deletions
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 2e58fbb37fd0..574f51d1563f 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -910,9 +910,11 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, case RES_POOLCOLL_TABLE: if( pPseudo ) { - rToken.Assign( OOO_STRING_SVTOOLS_HTML_tabledata ); - rToken.Append( ' ' ); - rToken.Append( OOO_STRING_SVTOOLS_HTML_parabreak ); + rToken = rtl::OStringBuffer( + RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_tabledata)) + .append(' ') + .append(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_parabreak)) + .makeStringAndClear(); } else rToken.Assign( OOO_STRING_SVTOOLS_HTML_parabreak ); @@ -920,9 +922,11 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, case RES_POOLCOLL_TABLE_HDLN: if( pPseudo ) { - rToken.Assign( OOO_STRING_SVTOOLS_HTML_tableheader ); - rToken.Append( ' ' ); - rToken.Append( OOO_STRING_SVTOOLS_HTML_parabreak ); + rToken = rtl::OStringBuffer( + RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_tableheader)) + .append(' ') + .append(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_parabreak)) + .makeStringAndClear(); } else rToken.Assign( OOO_STRING_SVTOOLS_HTML_parabreak ); @@ -2522,36 +2526,33 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt, } } - ByteString sOut; + rtl::OStringBuffer sOut; if( pUStr ) - sOut.Append( pUStr ); + sOut.append(pUStr); if( pOStr ) { - if( sOut.Len() ) - sOut += ' '; - - sOut.Append( pOStr ); + if (sOut.getLength()) + sOut.append(' '); + sOut.append(pOStr); } if( pCOStr ) { - if( sOut.Len() ) - sOut += ' '; - - sOut.Append( pCOStr ); + if (sOut.getLength()) + sOut.append(' '); + sOut.append(pCOStr); } if( pBStr ) { - if( sOut.Len() ) - sOut += ' '; - - sOut.Append( pBStr ); + if (sOut.getLength()) + sOut.append(' '); + sOut.append(pBStr); } - if( sOut.Len() ) - rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_text_decoration, sOut ); + if (sOut.getLength()) + rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_text_decoration, sOut.makeStringAndClear() ); else if( bNone ) rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_text_decoration, sCSS1_PV_none ); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 01dcebf74600..f8d8c8ce7728 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -2722,10 +2722,10 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) else pStr = OOO_STRING_SVTOOLS_HTML_AL_right; - ByteString sOut( OOO_STRING_SVTOOLS_HTML_linebreak ); - (((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_clear) += '=') += pStr; + rtl::OStringBuffer sOut(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_linebreak)); + sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_clear).append('=').append(pStr); + HTMLOutFuncs::Out_AsciiTag( rHTMLWrt.Strm(), sOut.getStr() ); - HTMLOutFuncs::Out_AsciiTag( rHTMLWrt.Strm(), sOut.GetBuffer() ); rHTMLWrt.bClearLeft = sal_False; rHTMLWrt.bClearRight = sal_False; diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index ecb6aee99dfd..1c3a9fb14adf 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -831,10 +831,10 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, if( pCaption && pCaption->Len() ) { rWrt.OutNewLine(); // <CAPTION> in neue Zeile - ByteString sOutStr( OOO_STRING_SVTOOLS_HTML_caption ); - (((sOutStr += ' ') += OOO_STRING_SVTOOLS_HTML_O_align) += '=') - += (bTopCaption ? OOO_STRING_SVTOOLS_HTML_VA_top : OOO_STRING_SVTOOLS_HTML_VA_bottom); - HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sOutStr.GetBuffer(), sal_True ); + rtl::OStringBuffer sOutStr(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_caption)); + sOutStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append('=') + .append(bTopCaption ? OOO_STRING_SVTOOLS_HTML_VA_top : OOO_STRING_SVTOOLS_HTML_VA_bottom); + HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sOutStr.getStr(), sal_True ); HTMLOutFuncs::Out_String( rWrt.Strm(), *pCaption, rWrt.eDestEnc, &rWrt.aNonConvertableCharacters ); HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_caption, sal_False ); } @@ -1197,9 +1197,10 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_center, sal_True ); else { - ByteString sOut( OOO_STRING_SVTOOLS_HTML_division ); - (((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_align) += '=') += OOO_STRING_SVTOOLS_HTML_AL_right; - HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sOut.GetBuffer(), + rtl::OStringBuffer sOut(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_division)); + sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append('=') + .append(OOO_STRING_SVTOOLS_HTML_AL_right); + HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sOut.getStr(), sal_True ); } rHTMLWrt.IncIndentLevel(); // Inhalt von <CENTER> einruecken |