summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-01-16 12:40:11 +0200
committerMichael Stahl <mstahl@redhat.com>2014-01-22 22:00:39 +0000
commitd803483f6a5938b0d0708b8db74b30c511dd8e31 (patch)
tree6f75da8815e03744e6ff94f3502a93c896e07bf0 /svtools
parentdd34ecba1048549d122a759cd5c7f743f5899d73 (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 'svtools')
-rw-r--r--svtools/source/graphic/grfattr.cxx2
-rw-r--r--svtools/source/misc/imap.cxx18
-rw-r--r--svtools/source/svhtml/htmlout.cxx80
-rw-r--r--svtools/source/svrtf/rtfout.cxx28
4 files changed, 64 insertions, 64 deletions
diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx
index 1e328c918811..2514ed73b65c 100644
--- a/svtools/source/graphic/grfattr.cxx
+++ b/svtools/source/graphic/grfattr.cxx
@@ -106,7 +106,7 @@ SvStream& WriteGraphicAttr( SvStream& rOStm, const GraphicAttr& rAttr )
const sal_uInt32 nTmp32 = 0;
rOStm.WriteUInt32( nTmp32 ).WriteUInt32( nTmp32 );
- rOStm << rAttr.mfGamma;
+ rOStm.WriteDouble( rAttr.mfGamma );
rOStm.WriteUInt32( rAttr.mnMirrFlags ).WriteUInt16( rAttr.mnRotate10 );
rOStm.WriteInt16( rAttr.mnContPercent ).WriteInt16( rAttr.mnLumPercent ).WriteInt16( rAttr.mnRPercent ).WriteInt16( rAttr.mnGPercent ).WriteInt16( rAttr.mnBPercent );
rOStm.WriteUChar( rAttr.mbInvert ).WriteUChar( rAttr.mcTransparency ).WriteUInt16( (sal_uInt16) rAttr.meDrawMode );
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 5afe6a7ffb68..34244ac7a6ae 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -82,15 +82,15 @@ void IMapObject::Write( SvStream& rOStm, const OUString& rBaseURL ) const
IMapCompat* pCompat;
const rtl_TextEncoding eEncoding = osl_getThreadTextEncoding();
- rOStm << GetType();
- rOStm << GetVersion();
- rOStm << ( (sal_uInt16) eEncoding );
+ rOStm.WriteUInt16( GetType() );
+ rOStm.WriteUInt16( GetVersion() );
+ rOStm.WriteUInt16( (sal_uInt16) eEncoding );
const OString aRelURL = OUStringToOString(
URIHelper::simpleNormalizedMakeRelative(rBaseURL, aURL), eEncoding);
write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, aRelURL);
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aAltText, eEncoding);
- rOStm << bActive;
+ rOStm.WriteUChar( bActive );
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aTarget, eEncoding);
pCompat = new IMapCompat( rOStm, STREAM_WRITE );
@@ -293,7 +293,7 @@ void IMapCircleObject::WriteIMapObject( SvStream& rOStm ) const
sal_uInt32 nTmp = nRadius;
WritePair( rOStm, aCenter );
- rOStm << nTmp;
+ rOStm.WriteUInt32( nTmp );
}
@@ -432,7 +432,7 @@ void IMapPolygonObject::ImpConstruct( const Polygon& rPoly, sal_Bool bPixel )
void IMapPolygonObject::WriteIMapObject( SvStream& rOStm ) const
{
WritePolygon( rOStm, aPoly );
- rOStm << bEllipse; // >= Version 2
+ rOStm.WriteUChar( bEllipse ); // >= Version 2
WriteRectangle( rOStm, aEllipse ); // >= Version 2
}
@@ -947,11 +947,11 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
// write MagicCode
- rOStm << IMAPMAGIC;
- rOStm << GetVersion();
+ rOStm.WriteCharPtr( IMAPMAGIC );
+ rOStm.WriteUInt16( GetVersion() );
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aImageName, eEncoding);
write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, OString()); //dummy
- rOStm << nCount;
+ rOStm.WriteUInt16( nCount );
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aImageName, eEncoding);
pCompat = new IMapCompat( rOStm, STREAM_WRITE );
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index 22cb1a2d6b04..626325b59f8d 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -514,7 +514,7 @@ SvStream& HTMLOutFuncs::Out_AsciiTag( SvStream& rStream, const sal_Char *pStr,
sal_Char sStt[3] = "</";
if( bOn )
sStt[1] = 0;
- return (rStream << sStt << pStr << '>');
+ return (rStream.WriteCharPtr( sStt ).WriteCharPtr( pStr ).WriteChar( '>' ));
}
SvStream& HTMLOutFuncs::Out_Char( SvStream& rStream, sal_Unicode c,
@@ -522,7 +522,7 @@ SvStream& HTMLOutFuncs::Out_Char( SvStream& rStream, sal_Unicode c,
OUString *pNonConvertableChars )
{
OString sOut = lcl_ConvertCharToHTML( c, rContext, pNonConvertableChars );
- rStream << sOut.getStr();
+ rStream.WriteCharPtr( sOut.getStr() );
return rStream;
}
@@ -545,7 +545,7 @@ SvStream& HTMLOutFuncs::FlushToAscii( SvStream& rStream,
OString sOut = lcl_FlushToAscii( rContext );
if (!sOut.isEmpty())
- rStream << sOut.getStr();
+ rStream.WriteCharPtr( sOut.getStr() );
return rStream;
}
@@ -568,17 +568,17 @@ SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nL
*pStr += 39;
nHex >>= 4;
}
- return rStream << pStr;
+ return rStream.WriteCharPtr( pStr );
}
SvStream& HTMLOutFuncs::Out_Color( SvStream& rStream, const Color& rColor,
rtl_TextEncoding )
{
- rStream << "\"#";
+ rStream.WriteCharPtr( "\"#" );
if( rColor.GetColor() == COL_AUTO )
{
- rStream << "000000";
+ rStream.WriteCharPtr( "000000" );
}
else
{
@@ -586,7 +586,7 @@ SvStream& HTMLOutFuncs::Out_Color( SvStream& rStream, const Color& rColor,
Out_Hex( rStream, rColor.GetGreen(), 2 );
Out_Hex( rStream, rColor.GetBlue(), 2 );
}
- rStream << '\"';
+ rStream.WriteChar( '\"' );
return rStream;
}
@@ -617,9 +617,9 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
.append(' ')
.append(OOO_STRING_SVTOOLS_HTML_O_name)
.append("=\"");
- rStream << sOut.makeStringAndClear().getStr();
+ rStream.WriteCharPtr( sOut.makeStringAndClear().getStr() );
Out_String( rStream, rOutName, eDestEnc, pNonConvertableChars );
- rStream << "\">";
+ rStream.WriteCharPtr( "\">" );
for( sal_uInt16 i=0U; i<rIMap.GetIMapObjectCount(); i++ )
{
@@ -701,16 +701,16 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
if( pShape )
{
if( pDelim )
- rStream << pDelim;
+ rStream.WriteCharPtr( pDelim );
if( pIndentArea )
- rStream << pIndentArea;
+ rStream.WriteCharPtr( pIndentArea );
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_area)
.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_shape)
.append('=').append(pShape).append(' ')
.append(OOO_STRING_SVTOOLS_HTML_O_coords).append("=\"")
.append(aCoords).append("\" ");
- rStream << sOut.makeStringAndClear().getStr();
+ rStream.WriteCharPtr( sOut.makeStringAndClear().getStr() );
OUString aURL( pObj->GetURL() );
if( !aURL.isEmpty() && pObj->IsActive() )
@@ -718,19 +718,19 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
aURL = URIHelper::simpleNormalizedMakeRelative(
rBaseURL, aURL );
sOut.append(OOO_STRING_SVTOOLS_HTML_O_href).append("=\"");
- rStream << sOut.makeStringAndClear().getStr();
- Out_String( rStream, aURL, eDestEnc, pNonConvertableChars ) << '\"';
+ rStream.WriteCharPtr( sOut.makeStringAndClear().getStr() );
+ Out_String( rStream, aURL, eDestEnc, pNonConvertableChars ).WriteChar( '\"' );
}
else
- rStream << OOO_STRING_SVTOOLS_HTML_O_nohref;
+ rStream.WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_nohref );
const OUString& rObjName = pObj->GetName();
if( !rObjName.isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name)
.append("=\"");
- rStream << sOut.makeStringAndClear().getStr();
- Out_String( rStream, rObjName, eDestEnc, pNonConvertableChars ) << '\"';
+ rStream.WriteCharPtr( sOut.makeStringAndClear().getStr() );
+ Out_String( rStream, rObjName, eDestEnc, pNonConvertableChars ).WriteChar( '\"' );
}
const OUString& rTarget = pObj->GetTarget();
@@ -738,8 +738,8 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_target)
.append("=\"");
- rStream << sOut.makeStringAndClear().getStr();
- Out_String( rStream, rTarget, eDestEnc, pNonConvertableChars ) << '\"';
+ rStream.WriteCharPtr( sOut.makeStringAndClear().getStr() );
+ Out_String( rStream, rTarget, eDestEnc, pNonConvertableChars ).WriteChar( '\"' );
}
OUString rDesc( pObj->GetAltText() );
@@ -750,8 +750,8 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_alt)
.append("=\"");
- rStream << sOut.makeStringAndClear().getStr();
- Out_String( rStream, rDesc, eDestEnc, pNonConvertableChars ) << '\"';
+ rStream.WriteCharPtr( sOut.makeStringAndClear().getStr() );
+ Out_String( rStream, rDesc, eDestEnc, pNonConvertableChars ).WriteChar( '\"' );
}
const SvxMacroTableDtor& rMacroTab = pObj->GetMacroTable();
@@ -759,16 +759,16 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
Out_Events( rStream, rMacroTab, pEventTable,
bOutStarBasic, eDestEnc, pNonConvertableChars );
- rStream << '>';
+ rStream.WriteChar( '>' );
}
}
}
if( pDelim )
- rStream << pDelim;
+ rStream.WriteCharPtr( pDelim );
if( pIndentMap )
- rStream << pIndentMap;
+ rStream.WriteCharPtr( pIndentMap );
Out_AsciiTag( rStream, OOO_STRING_SVTOOLS_HTML_map, sal_False );
return rStream;
@@ -798,7 +798,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
sOut.append(' ')
.append(OOO_STRING_SVTOOLS_HTML_O_language)
.append("=\"");
- rStrm << sOut.makeStringAndClear().getStr();
+ rStrm.WriteCharPtr( sOut.makeStringAndClear().getStr() );
Out_String( rStrm, rLanguage, eDestEnc, pNonConvertableChars );
sOut.append('\"');
}
@@ -806,7 +806,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
if( !rSrc.isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_src).append("=\"");
- rStrm << sOut.makeStringAndClear().getStr();
+ rStrm.WriteCharPtr( sOut.makeStringAndClear().getStr() );
Out_String( rStrm, URIHelper::simpleNormalizedMakeRelative(rBaseURL, rSrc), eDestEnc, pNonConvertableChars );
sOut.append('\"');
}
@@ -815,7 +815,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_sdlibrary)
.append("=\"");
- rStrm << sOut.makeStringAndClear().getStr();
+ rStrm.WriteCharPtr( sOut.makeStringAndClear().getStr() );
Out_String( rStrm, *pSBLibrary, eDestEnc, pNonConvertableChars );
sOut.append('\"');
}
@@ -824,23 +824,23 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_sdmodule)
.append("=\"");
- rStrm << sOut.makeStringAndClear().getStr();
+ rStrm.WriteCharPtr( sOut.makeStringAndClear().getStr() );
Out_String( rStrm, *pSBModule, eDestEnc, pNonConvertableChars );
sOut.append('\"');
}
sOut.append('>');
- rStrm << sOut.makeStringAndClear().getStr();
+ rStrm.WriteCharPtr( sOut.makeStringAndClear().getStr() );
if( !rSource.isEmpty() || pSBLibrary || pSBModule )
{
- rStrm << SAL_NEWLINE_STRING;
+ rStrm.WriteCharPtr( SAL_NEWLINE_STRING );
if( JAVASCRIPT != eScriptType )
{
- rStrm << "<!--"
- << SAL_NEWLINE_STRING;
+ rStrm.WriteCharPtr( "<!--" )
+ .WriteCharPtr( SAL_NEWLINE_STRING );
}
if( STARBASIC == eScriptType )
@@ -851,7 +851,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
.append(OOO_STRING_SVTOOLS_HTML_SB_library)
.append(' ')
.append(OUStringToOString(*pSBLibrary, eDestEnc));
- rStrm << sOut.makeStringAndClear().getStr() << SAL_NEWLINE_STRING;
+ rStrm.WriteCharPtr( sOut.makeStringAndClear().getStr() ).WriteCharPtr( SAL_NEWLINE_STRING );
}
if( pSBModule )
@@ -860,7 +860,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
.append(OOO_STRING_SVTOOLS_HTML_SB_module)
.append(' ')
.append(OUStringToOString(*pSBModule, eDestEnc));
- rStrm << sOut.makeStringAndClear().getStr() << SAL_NEWLINE_STRING;
+ rStrm.WriteCharPtr( sOut.makeStringAndClear().getStr() ).WriteCharPtr( SAL_NEWLINE_STRING );
}
}
@@ -869,16 +869,16 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
// we write the module in ANSI-charset, but with
// the system new line.
const OString sSource(OUStringToOString(rSource, eDestEnc));
- rStrm << sSource.getStr() << SAL_NEWLINE_STRING;
+ rStrm.WriteCharPtr( sSource.getStr() ).WriteCharPtr( SAL_NEWLINE_STRING );
}
- rStrm << SAL_NEWLINE_STRING;
+ rStrm.WriteCharPtr( SAL_NEWLINE_STRING );
if( JAVASCRIPT != eScriptType )
{
// MIB/MM: if it is not StarBasic, a // could be wrong.
// As the comment is removed during reading, it is not helping us....
- rStrm << (STARBASIC == eScriptType ? "' -->" : "// -->")
- << SAL_NEWLINE_STRING;
+ rStrm.WriteCharPtr( STARBASIC == eScriptType ? "' -->" : "// -->" )
+ .WriteCharPtr( SAL_NEWLINE_STRING );
}
}
@@ -912,9 +912,9 @@ SvStream& HTMLOutFuncs::Out_Events( SvStream& rStrm,
{
OStringBuffer sOut;
sOut.append(' ').append(pStr).append("=\"");
- rStrm << sOut.makeStringAndClear().getStr();
+ rStrm.WriteCharPtr( sOut.makeStringAndClear().getStr() );
- Out_String( rStrm, pMacro->GetMacName(), eDestEnc, pNonConvertableChars ) << '\"';
+ Out_String( rStrm, pMacro->GetMacName(), eDestEnc, pNonConvertableChars ).WriteChar( '\"' );
}
}
i++;
diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx
index 682e99c72d1e..12839ed064cf 100644
--- a/svtools/source/svrtf/rtfout.cxx
+++ b/svtools/source/svrtf/rtfout.cxx
@@ -36,13 +36,13 @@ SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c,
// written
break;
case 0xA0:
- rStream << "\\~";
+ rStream.WriteCharPtr( "\\~" );
break;
case 0xAD:
- rStream << "\\-";
+ rStream.WriteCharPtr( "\\-" );
break;
case 0x2011:
- rStream << "\\_";
+ rStream.WriteCharPtr( "\\_" );
break;
case '\n':
pStr = OOO_STRING_SVTOOLS_RTF_LINE;
@@ -87,11 +87,11 @@ SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c,
case '\\':
case '}':
case '{':
- rStream << '\\' << (sal_Char)c;
+ rStream.WriteChar( '\\' ).WriteChar( (sal_Char)c );
break;
default:
if (c >= ' ' && c <= '~')
- rStream << (sal_Char)c;
+ rStream.WriteChar( (sal_Char)c );
else
{
//If we can't convert to the dest encoding, or if
@@ -121,18 +121,18 @@ SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c,
{
// #i47831# add an additional whitespace, so that
// "document whitespaces" are not ignored.;
- rStream << "\\uc"
- << OString::number(nLen).getStr() << " ";
+ rStream.WriteCharPtr( "\\uc" )
+ .WriteCharPtr( OString::number(nLen).getStr() ).WriteCharPtr( " " );
*pUCMode = nLen;
}
- rStream << "\\u"
- << OString::number(
- static_cast<sal_Int32>(c)).getStr();
+ rStream.WriteCharPtr( "\\u" )
+ .WriteCharPtr( OString::number(
+ static_cast<sal_Int32>(c)).getStr() );
}
for (sal_Int32 nI = 0; nI < nLen; ++nI)
{
- rStream << "\\'";
+ rStream.WriteCharPtr( "\\'" );
Out_Hex(rStream, sConverted[nI], 2);
}
}
@@ -142,7 +142,7 @@ SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c,
}
if (pStr)
- rStream << pStr << ' ';
+ rStream.WriteCharPtr( pStr ).WriteChar( ' ' );
return rStream;
}
@@ -154,7 +154,7 @@ SvStream& RTFOutFuncs::Out_String( SvStream& rStream, const OUString& rStr,
for (sal_Int32 n = 0; n < rStr.getLength(); ++n)
Out_Char(rStream, rStr[n], &nUCMode, eDestEnc, bWriteHelpFile);
if (nUCMode != 1)
- rStream << "\\uc1"<< " "; // #i47831# add an additional whitespace, so that "document whitespaces" are not ignored.;
+ rStream.WriteCharPtr( "\\uc1" ).WriteCharPtr( " " ); // #i47831# add an additional whitespace, so that "document whitespaces" are not ignored.;
return rStream;
}
@@ -175,7 +175,7 @@ SvStream& RTFOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLe
*pStr += 39;
nHex >>= 4;
}
- return rStream << pStr;
+ return rStream.WriteCharPtr( pStr );
}