diff options
author | Noel Grandin <noel@peralex.com> | 2014-01-16 12:40:11 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-01-22 22:00:39 +0000 |
commit | d803483f6a5938b0d0708b8db74b30c511dd8e31 (patch) | |
tree | 6f75da8815e03744e6ff94f3502a93c896e07bf0 /sc | |
parent | dd34ecba1048549d122a759cd5c7f743f5899d73 (diff) |
convert more SvStream::operator<< calls
.. to more explicit SvStream::Write* calls
This was done using another run of the clang rewriter, and then
a lot of hand tweaking to fix all the places where the rewriter
did not play nice with various macros.
Change-Id: I7bcab93851c8dfb59cde6bc76290c6484d88fb18
Reviewed-on: https://gerrit.libreoffice.org/7494
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xestream.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/html/htmlexp.cxx | 66 | ||||
-rw-r--r-- | sc/source/filter/html/htmlexp2.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/rtf/rtfexp.cxx | 50 | ||||
-rw-r--r-- | sc/source/ui/app/drwtrans.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/transobj.cxx | 2 |
6 files changed, 65 insertions, 65 deletions
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 2ad9bef43254..77c6295d93d1 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -205,7 +205,7 @@ XclExpStream& XclExpStream::operator<<( double fValue ) if (mbUseEncrypter && HasValidEncrypter()) mxEncrypter->Encrypt(mrStrm, fValue); else - mrStrm << fValue; + mrStrm.WriteDouble( fValue ); return *this; } diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index a6450cdabec2..999b8a3d9e76 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -317,8 +317,8 @@ Size ScHTMLExport::MMToPixel( const Size& rSize ) sal_uLong ScHTMLExport::Write() { - rStrm << '<' << OOO_STRING_SVTOOLS_HTML_doctype << ' ' << OOO_STRING_SVTOOLS_HTML_doctype40 << '>' - << SAL_NEWLINE_STRING << SAL_NEWLINE_STRING; + rStrm.WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_doctype ).WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_doctype40 ).WriteChar( '>' ) + .WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( SAL_NEWLINE_STRING ); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_html ); WriteHeader(); OUT_LF(); @@ -365,19 +365,19 @@ void ScHTMLExport::WriteHeader() // CSS1 StyleSheet PageDefaults( bAll ? 0 : aRange.aStart.Tab() ); IncIndent(1); - rStrm << "<" << OOO_STRING_SVTOOLS_HTML_style << " " << OOO_STRING_SVTOOLS_HTML_O_type << "=\"text/css\">"; + rStrm.WriteCharPtr( "<" ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_style ).WriteCharPtr( " " ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_type ).WriteCharPtr( "=\"text/css\">" ); - rStrm << sMyBegComment; OUT_LF(); - rStrm << OOO_STRING_SVTOOLS_HTML_body << "," << OOO_STRING_SVTOOLS_HTML_division << "," << OOO_STRING_SVTOOLS_HTML_table << "," - << OOO_STRING_SVTOOLS_HTML_thead << "," << OOO_STRING_SVTOOLS_HTML_tbody << "," << OOO_STRING_SVTOOLS_HTML_tfoot << "," - << OOO_STRING_SVTOOLS_HTML_tablerow << "," << OOO_STRING_SVTOOLS_HTML_tableheader << "," - << OOO_STRING_SVTOOLS_HTML_tabledata << "," << OOO_STRING_SVTOOLS_HTML_parabreak << " { " << sFontFamily; + rStrm.WriteCharPtr( sMyBegComment ); OUT_LF(); + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_HTML_body ).WriteCharPtr( "," ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_division ).WriteCharPtr( "," ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_table ).WriteCharPtr( "," ) + .WriteCharPtr( OOO_STRING_SVTOOLS_HTML_thead ).WriteCharPtr( "," ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_tbody ).WriteCharPtr( "," ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_tfoot ).WriteCharPtr( "," ) + .WriteCharPtr( OOO_STRING_SVTOOLS_HTML_tablerow ).WriteCharPtr( "," ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_tableheader ).WriteCharPtr( "," ) + .WriteCharPtr( OOO_STRING_SVTOOLS_HTML_tabledata ).WriteCharPtr( "," ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_parabreak ).WriteCharPtr( " { " ).WriteCharPtr( sFontFamily ); sal_Int32 nFonts = comphelper::string::getTokenCount(aHTMLStyle.aFontFamilyName, ';'); if ( nFonts == 1 ) { - rStrm << '\"'; + rStrm.WriteChar( '\"' ); OUT_STR( aHTMLStyle.aFontFamilyName ); - rStrm << '\"'; + rStrm.WriteChar( '\"' ); } else { // Fontlist, VCL: Semicolon as separator @@ -385,17 +385,17 @@ void ScHTMLExport::WriteHeader() const OUString& rList = aHTMLStyle.aFontFamilyName; for ( sal_Int32 j = 0, nPos = 0; j < (sal_Int32) nFonts; j++ ) { - rStrm << '\"'; + rStrm.WriteChar( '\"' ); OUT_STR( rList.getToken( 0, ';', nPos ) ); - rStrm << '\"'; + rStrm.WriteChar( '\"' ); if ( j < nFonts-1 ) - rStrm << ", "; + rStrm.WriteCharPtr( ", " ); } } - rStrm << "; " << sFontSize - << GetFontSizeCss( ( sal_uInt16 ) aHTMLStyle.nFontHeight ) << " }"; + rStrm.WriteCharPtr( "; " ).WriteCharPtr( sFontSize ) + .WriteCharPtr( GetFontSizeCss( ( sal_uInt16 ) aHTMLStyle.nFontHeight ) ).WriteCharPtr( " }" ); OUT_LF(); - rStrm << sMyEndComment; + rStrm.WriteCharPtr( sMyEndComment ); IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_style ); IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_head ); @@ -421,11 +421,11 @@ void ScHTMLExport::WriteOverview() if ( !IsEmptyTable( nTab ) ) { pDoc->GetName( nTab, aStr ); - rStrm << "<A HREF=\"#table" - << OString::number(nTab).getStr() - << "\">"; + rStrm.WriteCharPtr( "<A HREF=\"#table" ) + .WriteCharPtr( OString::number(nTab).getStr() ) + .WriteCharPtr( "\">" ); OUT_STR( aStr ); - rStrm << "</A>"; + rStrm.WriteCharPtr( "</A>" ); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_linebreak ); } } @@ -559,7 +559,7 @@ void ScHTMLExport::WriteBody() const SvxBrushItem* pBrushItem = (const SvxBrushItem*)&rSet.Get( ATTR_BACKGROUND ); // default text color black - rStrm << '<' << OOO_STRING_SVTOOLS_HTML_body << ' ' << OOO_STRING_SVTOOLS_HTML_O_text << "=\"#000000\""; + rStrm.WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_body ).WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_text ).WriteCharPtr( "=\"#000000\"" ); if ( bAll && GPOS_NONE != pBrushItem->GetGraphicPos() ) { @@ -604,10 +604,10 @@ void ScHTMLExport::WriteBody() } if( !aLink.isEmpty() ) { - rStrm << ' ' << OOO_STRING_SVTOOLS_HTML_O_background << "=\""; + rStrm.WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_background ).WriteCharPtr( "=\"" ); OUT_STR( URIHelper::simpleNormalizedMakeRelative( aBaseURL, - aLink ) ) << '\"'; + aLink ) ).WriteChar( '\"' ); } } if ( !aHTMLStyle.aBackgroundColor.GetTransparency() ) @@ -619,7 +619,7 @@ void ScHTMLExport::WriteBody() HTMLOutFuncs::Out_Color( rStrm, aHTMLStyle.aBackgroundColor ); } - rStrm << '>'; OUT_LF(); + rStrm.WriteChar( '>' ); OUT_LF(); if ( bAll ) WriteOverview(); @@ -679,9 +679,9 @@ void ScHTMLExport::WriteTables() OUT_HR(); // Write anchor - rStrm << "<A NAME=\"table" - << OString::number(nTab).getStr() - << "\">"; + rStrm.WriteCharPtr( "<A NAME=\"table" ) + .WriteCharPtr( OString::number(nTab).getStr() ) + .WriteCharPtr( "\">" ); TAG_ON( OOO_STRING_SVTOOLS_HTML_head1 ); OUT_STR( aStrOut ); TAG_ON( OOO_STRING_SVTOOLS_HTML_emphasis ); @@ -691,7 +691,7 @@ void ScHTMLExport::WriteTables() TAG_OFF( OOO_STRING_SVTOOLS_HTML_emphasis ); TAG_OFF( OOO_STRING_SVTOOLS_HTML_head1 ); - rStrm << "</A>"; OUT_LF(); + rStrm.WriteCharPtr( "</A>" ); OUT_LF(); } } else @@ -1216,11 +1216,11 @@ bool ScHTMLExport::WriteFieldText( const EditTextObject* pData ) bUrl = sal_True; const SvxURLField* pURLField = (const SvxURLField*)pField; // String aFieldText = rEngine.GetText( aSel ); - rStrm << '<' << OOO_STRING_SVTOOLS_HTML_anchor << ' ' << OOO_STRING_SVTOOLS_HTML_O_href << "=\""; + rStrm.WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_anchor ).WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_href ).WriteCharPtr( "=\"" ); OUT_STR( pURLField->GetURL() ); - rStrm << "\">"; + rStrm.WriteCharPtr( "\">" ); OUT_STR( pURLField->GetRepresentation() ); - rStrm << "</" << OOO_STRING_SVTOOLS_HTML_anchor << '>'; + rStrm.WriteCharPtr( "</" ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_anchor ).WriteChar( '>' ); } } } @@ -1273,7 +1273,7 @@ sal_Bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm, { INetURLObject aCpyURL( aDest ); SvFileStream aCpy( aCpyURL.PathToFileName(), STREAM_WRITE ); - aCpy << aTmp; + aCpy.WriteStream( aTmp ); aCpy.Close(); bRet = SVSTREAM_OK == aCpy.GetError(); @@ -1284,7 +1284,7 @@ sal_Bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm, { SvFileStream aCpy( aMedium.GetPhysicalName(), STREAM_WRITE ); - aCpy << aTmp; + aCpy.WriteStream( aTmp ); } // Take over diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx index ad2e6b7a0901..896d417a34d1 100644 --- a/sc/source/filter/html/htmlexp2.cxx +++ b/sc/source/filter/html/htmlexp2.cxx @@ -227,13 +227,13 @@ void ScHTMLExport::WriteImage( OUString& rLinkName, const Graphic& rGrf, // <IMG SRC="..."[ rImgOptions]> if( !rLinkName.isEmpty() ) { - rStrm << '<' << OOO_STRING_SVTOOLS_HTML_image << ' ' << OOO_STRING_SVTOOLS_HTML_O_src << "=\""; + rStrm.WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_image ).WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_src ).WriteCharPtr( "=\"" ); HTMLOutFuncs::Out_String( rStrm, URIHelper::simpleNormalizedMakeRelative( aBaseURL, - rLinkName ), eDestEnc ) << '\"'; + rLinkName ), eDestEnc ).WriteChar( '\"' ); if ( !rImgOptions.isEmpty() ) - rStrm << rImgOptions.getStr(); - rStrm << '>' << SAL_NEWLINE_STRING << GetIndentStr(); + rStrm.WriteCharPtr( rImgOptions.getStr() ); + rStrm.WriteChar( '>' ).WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( GetIndentStr() ); } } diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx index f5f5d8f64c8b..209531436621 100644 --- a/sc/source/filter/rtf/rtfexp.cxx +++ b/sc/source/filter/rtf/rtfexp.cxx @@ -66,25 +66,25 @@ ScRTFExport::~ScRTFExport() sal_uLong ScRTFExport::Write() { - rStrm << '{' << OOO_STRING_SVTOOLS_RTF_RTF; - rStrm << OOO_STRING_SVTOOLS_RTF_ANSI << SAL_NEWLINE_STRING; + rStrm.WriteChar( '{' ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_RTF ); + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ANSI ).WriteCharPtr( SAL_NEWLINE_STRING ); // Data for ( SCTAB nTab = aRange.aStart.Tab(); nTab <= aRange.aEnd.Tab(); nTab++ ) { if ( nTab > aRange.aStart.Tab() ) - rStrm << OOO_STRING_SVTOOLS_RTF_PAR; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_PAR ); WriteTab( nTab ); } - rStrm << '}' << SAL_NEWLINE_STRING; + rStrm.WriteChar( '}' ).WriteCharPtr( SAL_NEWLINE_STRING ); return rStrm.GetError(); } void ScRTFExport::WriteTab( SCTAB nTab ) { - rStrm << '{' << SAL_NEWLINE_STRING; + rStrm.WriteChar( '{' ).WriteCharPtr( SAL_NEWLINE_STRING ); if ( pDoc->HasTable( nTab ) ) { memset( &pCellX[0], 0, (MAXCOL+2) * sizeof(sal_uLong) ); @@ -101,14 +101,14 @@ void ScRTFExport::WriteTab( SCTAB nTab ) WriteRow( nTab, nRow ); } } - rStrm << '}' << SAL_NEWLINE_STRING; + rStrm.WriteChar( '}' ).WriteCharPtr( SAL_NEWLINE_STRING ); } void ScRTFExport::WriteRow( SCTAB nTab, SCROW nRow ) { - rStrm << OOO_STRING_SVTOOLS_RTF_TROWD << OOO_STRING_SVTOOLS_RTF_TRGAPH << "30" << OOO_STRING_SVTOOLS_RTF_TRLEFT << "-30"; - rStrm << OOO_STRING_SVTOOLS_RTF_TRRH << OString::number(pDoc->GetRowHeight(nRow, nTab)).getStr(); + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TROWD ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRGAPH ).WriteCharPtr( "30" ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRLEFT ).WriteCharPtr( "-30" ); + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRRH ).WriteCharPtr( OString::number(pDoc->GetRowHeight(nRow, nTab)).getStr() ); SCCOL nCol; SCCOL nEndCol = aRange.aEnd.Col(); for ( nCol = aRange.aStart.Col(); nCol <= nEndCol; nCol++ ) @@ -120,12 +120,12 @@ void ScRTFExport::WriteRow( SCTAB nTab, SCROW nRow ) const sal_Char* pChar; if ( rMergeAttr.GetColMerge() != 0 ) - rStrm << OOO_STRING_SVTOOLS_RTF_CLMGF; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_CLMGF ); else { const ScMergeFlagAttr& rMergeFlagAttr = (const ScMergeFlagAttr&) pAttr->GetItem( ATTR_MERGE_FLAG ); if ( rMergeFlagAttr.IsHorOverlapped() ) - rStrm << OOO_STRING_SVTOOLS_RTF_CLMRG; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_CLMRG ); } switch( rVerJustifyItem.GetValue() ) @@ -137,13 +137,13 @@ void ScRTFExport::WriteRow( SCTAB nTab, SCROW nRow ) default: pChar = NULL; break; } if ( pChar ) - rStrm << pChar; + rStrm.WriteCharPtr( pChar ); - rStrm << OOO_STRING_SVTOOLS_RTF_CELLX << OString::number(pCellX[nCol+1]).getStr(); + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_CELLX ).WriteCharPtr( OString::number(pCellX[nCol+1]).getStr() ); if ( (nCol & 0x0F) == 0x0F ) - rStrm << SAL_NEWLINE_STRING; // Do not let lines get too long + rStrm.WriteCharPtr( SAL_NEWLINE_STRING ); // Do not let lines get too long } - rStrm << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << OOO_STRING_SVTOOLS_RTF_INTBL << SAL_NEWLINE_STRING; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_PARD ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_PLAIN ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_INTBL ).WriteCharPtr( SAL_NEWLINE_STRING ); sal_uLong nStrmPos = rStrm.Tell(); for ( nCol = aRange.aStart.Col(); nCol <= nEndCol; nCol++ ) @@ -151,11 +151,11 @@ void ScRTFExport::WriteRow( SCTAB nTab, SCROW nRow ) WriteCell( nTab, nRow, nCol ); if ( rStrm.Tell() - nStrmPos > 255 ) { // Do not let lines get too long - rStrm << SAL_NEWLINE_STRING; + rStrm.WriteCharPtr( SAL_NEWLINE_STRING ); nStrmPos = rStrm.Tell(); } } - rStrm << OOO_STRING_SVTOOLS_RTF_ROW << SAL_NEWLINE_STRING; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ROW ).WriteCharPtr( SAL_NEWLINE_STRING ); } @@ -166,7 +166,7 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol ) const ScMergeFlagAttr& rMergeFlagAttr = (const ScMergeFlagAttr&) pAttr->GetItem( ATTR_MERGE_FLAG ); if ( rMergeFlagAttr.IsHorOverlapped() ) { - rStrm << OOO_STRING_SVTOOLS_RTF_CELL; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_CELL ); return ; } @@ -221,32 +221,32 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol ) case SVX_HOR_JUSTIFY_REPEAT: default: pChar = OOO_STRING_SVTOOLS_RTF_QL; break; } - rStrm << pChar; + rStrm.WriteCharPtr( pChar ); if ( rWeightItem.GetWeight() >= WEIGHT_BOLD ) { // bold bResetAttr = sal_True; - rStrm << OOO_STRING_SVTOOLS_RTF_B; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_B ); } if ( rPostureItem.GetPosture() != ITALIC_NONE ) { // italic bResetAttr = sal_True; - rStrm << OOO_STRING_SVTOOLS_RTF_I; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_I ); } if ( rUnderlineItem.GetLineStyle() != UNDERLINE_NONE ) { // underline bResetAttr = sal_True; - rStrm << OOO_STRING_SVTOOLS_RTF_UL; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_UL ); } - rStrm << ' '; + rStrm.WriteChar( ' ' ); RTFOutFuncs::Out_String( rStrm, aContent ); - rStrm << OOO_STRING_SVTOOLS_RTF_CELL; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_CELL ); if ( bResetPar ) - rStrm << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_INTBL; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_PARD ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_INTBL ); if ( bResetAttr ) - rStrm << OOO_STRING_SVTOOLS_RTF_PLAIN; + rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_PLAIN ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index c1da078cf804..efaa081bb26b 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -593,7 +593,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse if( pSrcStm ) { rxOStm->SetBufferSize( 0xff00 ); - *rxOStm << *pSrcStm; + rxOStm->WriteStream( *pSrcStm ); delete pSrcStm; } diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 5306c954c3db..db0df041e14c 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -466,7 +466,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj if( pSrcStm ) { rxOStm->SetBufferSize( 0xff00 ); - *rxOStm << *pSrcStm; + rxOStm->WriteStream( *pSrcStm ); delete pSrcStm; } |