summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/core/graphichelper.cxx2
-rw-r--r--svx/source/gallery2/galmisc.cxx2
-rw-r--r--svx/source/gallery2/galtheme.cxx14
-rw-r--r--svx/source/items/chrtitem.cxx2
-rw-r--r--svx/source/items/e3ditem.cxx6
-rw-r--r--svx/source/table/tablertfexporter.cxx38
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx2
-rw-r--r--svx/source/xoutdev/xattr.cxx12
-rw-r--r--svx/source/xoutdev/xattr2.cxx12
9 files changed, 45 insertions, 45 deletions
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index 217989f891fd..8cec8a55248f 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -163,7 +163,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString&
SfxMedium aOut( sPath, STREAM_WRITE | STREAM_SHARE_DENYNONE);
if( aOut.GetOutStream() && !aOut.GetOutStream()->GetError())
{
- *aOut.GetOutStream() << *aIn.GetInStream();
+ aOut.GetOutStream()->WriteStream( *aIn.GetInStream() );
if ( 0 == aIn.GetError() )
{
aOut.Close();
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index fca950f8660f..0632722b0781 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -555,7 +555,7 @@ sal_Bool GalleryTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pU
if( pUserObject )
{
- *rxOStm << *static_cast< SotStorageStream* >( pUserObject );
+ rxOStm->WriteStream( *static_cast< SotStorageStream* >( pUserObject ) );
bRet = ( rxOStm->GetError() == ERRCODE_NONE );
}
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 8d4f6fb4c704..3567a0e56075 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -319,7 +319,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, sal_uIntPt
if( pOStm )
{
- *pOStm << nNextNumber;
+ pOStm->WriteUInt32( nNextNumber );
delete pOStm;
}
@@ -1294,9 +1294,9 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
sal_uInt32 nCount = GetObjectCount();
sal_Bool bRel;
- rOStm << (sal_uInt16) 0x0004;
+ rOStm.WriteUInt16( (sal_uInt16) 0x0004 );
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, GetRealName(), RTL_TEXTENCODING_UTF8);
- rOStm << nCount << (sal_uInt16) osl_getThreadTextEncoding();
+ rOStm.WriteUInt32( nCount ).WriteUInt16( (sal_uInt16) osl_getThreadTextEncoding() );
for( sal_uInt32 i = 0; i < nCount; i++ )
{
@@ -1346,19 +1346,19 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
<< m_aDestDir << "' in '" << aPath << "'");
}
- rOStm << bRel;
+ rOStm.WriteUChar( bRel );
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aPath, RTL_TEXTENCODING_UTF8);
- rOStm << pObj->nOffset << (sal_uInt16) pObj->eObjKind;
+ rOStm.WriteUInt32( pObj->nOffset ).WriteUInt16( (sal_uInt16) pObj->eObjKind );
}
// more recently, a 512-byte reserve buffer is written,
// to recognize them two sal_uIntPtr-Ids will be written.
- rOStm << COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) << COMPAT_FORMAT( 'E', 'S', 'R', 'V' );
+ rOStm.WriteUInt32( COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) ).WriteUInt32( COMPAT_FORMAT( 'E', 'S', 'R', 'V' ) );
const long nReservePos = rOStm.Tell();
VersionCompat* pCompat = new VersionCompat( rOStm, STREAM_WRITE, 2 );
- rOStm << (sal_uInt32) GetId() << IsThemeNameFromResource(); // From version 2 and up
+ rOStm.WriteUInt32( (sal_uInt32) GetId() ).WriteUChar( IsThemeNameFromResource() ); // From version 2 and up
delete pCompat;
diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx
index 5ec07a2463d9..6398e4baecb2 100644
--- a/svx/source/items/chrtitem.cxx
+++ b/svx/source/items/chrtitem.cxx
@@ -289,7 +289,7 @@ SfxPoolItem* SvxDoubleItem::Create(SvStream& rIn, sal_uInt16 /*nVersion*/) const
SvStream& SvxDoubleItem::Store(SvStream& rOut, sal_uInt16 /*nItemVersion*/) const
{
- rOut << fVal;
+ rOut.WriteDouble( fVal );
return rOut;
}
diff --git a/svx/source/items/e3ditem.cxx b/svx/source/items/e3ditem.cxx
index 517e9e41589b..2a3a14051cec 100644
--- a/svx/source/items/e3ditem.cxx
+++ b/svx/source/items/e3ditem.cxx
@@ -102,9 +102,9 @@ SvStream& SvxB3DVectorItem::Store(SvStream &rStream, sal_uInt16 /*nItemVersion*/
// ## if (nItemVersion)
double fValue;
- fValue = aVal.getX(); rStream << fValue;
- fValue = aVal.getY(); rStream << fValue;
- fValue = aVal.getZ(); rStream << fValue;
+ fValue = aVal.getX(); rStream.WriteDouble( fValue );
+ fValue = aVal.getY(); rStream.WriteDouble( fValue );
+ fValue = aVal.getZ(); rStream.WriteDouble( fValue );
return rStream;
}
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index c9c1de6bd333..5c643ad9dd84 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -85,8 +85,8 @@ long HundMMToTwips( long nIn )
sal_uLong SdrTableRtfExporter::Write()
{
- mrStrm << '{' << OOO_STRING_SVTOOLS_RTF_RTF;
- mrStrm << OOO_STRING_SVTOOLS_RTF_ANSI << SAL_NEWLINE_STRING;
+ mrStrm.WriteChar( '{' ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_RTF );
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ANSI ).WriteCharPtr( SAL_NEWLINE_STRING );
Reference< XTableColumns > xColumns( mxTable->getColumns() );
const sal_Int32 nColCount = xColumns->getCount();
@@ -125,7 +125,7 @@ sal_uLong SdrTableRtfExporter::Write()
OSL_FAIL("SdrTableRtfExporter::Write(), exception caught!");
}
- mrStrm << '}' << SAL_NEWLINE_STRING;
+ mrStrm.WriteChar( '}' ).WriteCharPtr( SAL_NEWLINE_STRING );
return mrStrm.GetError();
}
@@ -134,8 +134,8 @@ void SdrTableRtfExporter::WriteRow( const Reference< XPropertySet >& xRowSet, sa
sal_Int32 nRowHeight = 0;
xRowSet->getPropertyValue( msSize ) >>= nRowHeight;
- mrStrm << OOO_STRING_SVTOOLS_RTF_TROWD << OOO_STRING_SVTOOLS_RTF_TRGAPH << "30" << OOO_STRING_SVTOOLS_RTF_TRLEFT << "-30";
- mrStrm << OOO_STRING_SVTOOLS_RTF_TRRH << OString::number(nRowHeight).getStr();
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TROWD ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRGAPH ).WriteCharPtr( "30" ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRLEFT ).WriteCharPtr( "-30" );
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRRH ).WriteCharPtr( OString::number(nRowHeight).getStr() );
const sal_Int32 nColCount = mxTable->getColumnCount();
for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
@@ -145,11 +145,11 @@ void SdrTableRtfExporter::WriteRow( const Reference< XPropertySet >& xRowSet, sa
if( !xCell.is() )
continue;
- mrStrm << OOO_STRING_SVTOOLS_RTF_CELLX << OString::number(aColumnStart[nCol]).getStr();
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_CELLX ).WriteCharPtr( OString::number(aColumnStart[nCol]).getStr() );
if ( (nCol & 0x0F) == 0x0F )
- mrStrm << SAL_NEWLINE_STRING; // Zeilen nicht zu lang werden lassen
+ mrStrm.WriteCharPtr( SAL_NEWLINE_STRING ); // Zeilen nicht zu lang werden lassen
}
- mrStrm << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << OOO_STRING_SVTOOLS_RTF_INTBL << SAL_NEWLINE_STRING;
+ mrStrm.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 = mrStrm.Tell();
for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
@@ -157,11 +157,11 @@ void SdrTableRtfExporter::WriteRow( const Reference< XPropertySet >& xRowSet, sa
WriteCell( nCol, nRow );
if ( mrStrm.Tell() - nStrmPos > 255 )
{
- mrStrm << SAL_NEWLINE_STRING;
+ mrStrm.WriteCharPtr( SAL_NEWLINE_STRING );
nStrmPos = mrStrm.Tell();
}
}
- mrStrm << OOO_STRING_SVTOOLS_RTF_ROW << SAL_NEWLINE_STRING;
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ROW ).WriteCharPtr( SAL_NEWLINE_STRING );
}
@@ -171,7 +171,7 @@ void SdrTableRtfExporter::WriteCell( sal_Int32 nCol, sal_Int32 nRow )
if( !xCell.is() || xCell->isMerged() )
{
- mrStrm << OOO_STRING_SVTOOLS_RTF_CELL;
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_CELL );
return ;
}
@@ -218,32 +218,32 @@ void SdrTableRtfExporter::WriteCell( sal_Int32 nCol, sal_Int32 nRow )
case SDRTEXTHORZADJUST_LEFT:
default: pChar = OOO_STRING_SVTOOLS_RTF_QL; break;
}
- mrStrm << pChar;
+ mrStrm.WriteCharPtr( pChar );
if ( rWeightItem.GetWeight() >= WEIGHT_BOLD )
{ // bold
bResetAttr = true;
- mrStrm << OOO_STRING_SVTOOLS_RTF_B;
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_B );
}
if ( rPostureItem.GetPosture() != ITALIC_NONE )
{ // italic
bResetAttr = true;
- mrStrm << OOO_STRING_SVTOOLS_RTF_I;
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_I );
}
if ( rUnderlineItem.GetLineStyle() != UNDERLINE_NONE )
{ // underline
bResetAttr = true;
- mrStrm << OOO_STRING_SVTOOLS_RTF_UL;
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_UL );
}
- mrStrm << ' ';
+ mrStrm.WriteChar( ' ' );
RTFOutFuncs::Out_String( mrStrm, aContent );
- mrStrm << OOO_STRING_SVTOOLS_RTF_CELL;
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_CELL );
if ( bResetPar )
- mrStrm << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_INTBL;
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_PARD ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_INTBL );
if ( bResetAttr )
- mrStrm << OOO_STRING_SVTOOLS_RTF_PLAIN;
+ mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_PLAIN );
}
} }
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 57344500d64c..e698b97881a7 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -1053,7 +1053,7 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes
// copy temp stream to XOutputStream
SvOutputStream aOutputStream( aSettings.mxOutputStream );
aStream.Seek(0);
- aOutputStream << aStream;
+ aOutputStream.WriteStream( aStream );
}
else
{
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 1cfe73891633..92c94d2ec87c 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -1198,8 +1198,8 @@ namespace
for(sal_uInt32 b(0L); b < nPointCount; b++)
{
const basegfx::B2DPoint aPoint(aCandidate.getB2DPoint(b));
- rOut << aPoint.getX();
- rOut << aPoint.getY();
+ rOut.WriteDouble( aPoint.getX() );
+ rOut.WriteDouble( aPoint.getY() );
if(bControlPoints)
{
@@ -1209,12 +1209,12 @@ namespace
if(bEdgeIsCurve)
{
const basegfx::B2DVector aControlVectorA(aCandidate.getPrevControlPoint(b));
- rOut << aControlVectorA.getX();
- rOut << aControlVectorA.getY();
+ rOut.WriteDouble( aControlVectorA.getX() );
+ rOut.WriteDouble( aControlVectorA.getY() );
const basegfx::B2DVector aControlVectorB(aCandidate.getNextControlPoint(b));
- rOut << aControlVectorB.getX();
- rOut << aControlVectorB.getY();
+ rOut.WriteDouble( aControlVectorB.getX() );
+ rOut.WriteDouble( aControlVectorB.getY() );
}
}
}
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index c931ae99437f..1a3bb726cc0e 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -273,12 +273,12 @@ SfxPoolItem* AffineMatrixItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/ ) cons
SvStream& AffineMatrixItem::Store(SvStream &rStream, sal_uInt16 /*nItemVersion*/ ) const
{
- rStream << maMatrix.m00;
- rStream << maMatrix.m01;
- rStream << maMatrix.m02;
- rStream << maMatrix.m10;
- rStream << maMatrix.m11;
- rStream << maMatrix.m12;
+ rStream.WriteDouble( maMatrix.m00 );
+ rStream.WriteDouble( maMatrix.m01 );
+ rStream.WriteDouble( maMatrix.m02 );
+ rStream.WriteDouble( maMatrix.m10 );
+ rStream.WriteDouble( maMatrix.m11 );
+ rStream.WriteDouble( maMatrix.m12 );
return rStream;
}