summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-01-14 13:52:54 +0200
committerMichael Stahl <mstahl@redhat.com>2014-01-16 16:08:34 +0100
commitc648d0872058941ed18499a8bf1993037d9b5532 (patch)
tree47121b3eff267e34480335130106ca1c33be6fd9 /svtools/source
parent70f360f34a9f6605864644feee3c9b9b6ffb79a1 (diff)
convert SvStream::operator<< overloads to more explicit methods
This is in preparation for more conversion of SvStream::operator<< calls to use more explicit method names. This converts the subclasses that have their own convenience overloads of operator<< to use normal methods. Change-Id: I5efd5d9a24c264cb86d2471303dd5849bf91ba80
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/graphic/grfattr.cxx2
-rw-r--r--svtools/source/graphic/grfmgr.cxx7
-rw-r--r--svtools/source/graphic/provider.cxx2
-rw-r--r--svtools/source/misc/imap.cxx8
-rw-r--r--svtools/source/misc/templatefoldercache.cxx4
-rw-r--r--svtools/source/misc/transfer.cxx8
6 files changed, 16 insertions, 15 deletions
diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx
index fb19ddcb6300..1e328c918811 100644
--- a/svtools/source/graphic/grfattr.cxx
+++ b/svtools/source/graphic/grfattr.cxx
@@ -100,7 +100,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicAttr& rAttr )
// ------------------------------------------------------------------------
-SvStream& operator<<( SvStream& rOStm, const GraphicAttr& rAttr )
+SvStream& WriteGraphicAttr( SvStream& rOStm, const GraphicAttr& rAttr )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 2 );
const sal_uInt32 nTmp32 = 0;
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 8325c3b8d93a..4267ebebc8a1 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -352,7 +352,7 @@ void GraphicObject::Load( SvStream& rIStm )
void GraphicObject::Save( SvStream& rOStm )
{
- rOStm << *this;
+ WriteGraphicObject( rOStm, *this );
}
void GraphicObject::Assign( const SvDataCopyStream& rCopyStream )
@@ -1129,12 +1129,13 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj )
return rIStm;
}
-SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj )
+SvStream& WriteGraphicObject( SvStream& rOStm, const GraphicObject& rGraphicObj )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
const sal_Bool bLink = rGraphicObj.HasLink();
- rOStm << rGraphicObj.GetGraphic() << rGraphicObj.GetAttr();
+ WriteGraphic( rOStm, rGraphicObj.GetGraphic() );
+ WriteGraphicAttr( rOStm, rGraphicObj.GetAttr() );
rOStm.WriteUChar( bLink );
if( bLink )
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 09a8b999ddff..00250e838eda 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -837,7 +837,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
SvMemoryStream aMemStrm;
aMemStrm.SetVersion( SOFFICE_FILEFORMAT_CURRENT );
if( 0 == strcmp( pFilterShortName, MIMETYPE_VCLGRAPHIC ) )
- aMemStrm << aGraphic;
+ WriteGraphic( aMemStrm, aGraphic );
else
{
rFilter.ExportGraphic( aGraphic, aPath, aMemStrm,
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 06d588a56589..5afe6a7ffb68 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -182,7 +182,7 @@ void IMapRectangleObject::ImpConstruct( const Rectangle& rRect, sal_Bool bPixel
void IMapRectangleObject::WriteIMapObject( SvStream& rOStm ) const
{
- rOStm << aRect;
+ WriteRectangle( rOStm, aRect );
}
@@ -292,7 +292,7 @@ void IMapCircleObject::WriteIMapObject( SvStream& rOStm ) const
{
sal_uInt32 nTmp = nRadius;
- rOStm << aCenter;
+ WritePair( rOStm, aCenter );
rOStm << nTmp;
}
@@ -431,9 +431,9 @@ void IMapPolygonObject::ImpConstruct( const Polygon& rPoly, sal_Bool bPixel )
void IMapPolygonObject::WriteIMapObject( SvStream& rOStm ) const
{
- rOStm << aPoly;
+ WritePolygon( rOStm, aPoly );
rOStm << bEllipse; // >= Version 2
- rOStm << aEllipse; // >= Version 2
+ WriteRectangle( rOStm, aEllipse ); // >= Version 2
}
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index a1a7b29a7139..231e41cc653e 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -56,7 +56,7 @@ namespace svt
//= helpers
//=====================================================================
//---------------------------------------------------------------------
- SvStream& operator << ( SvStream& _rStorage, const util::DateTime& _rDate )
+ SvStream& WriteDateTime( SvStream& _rStorage, const util::DateTime& _rDate )
{
sal_uInt16 hundredthSeconds = static_cast< sal_uInt16 >( _rDate.NanoSeconds / Time::nanoPerCenti );
_rStorage.WriteUInt16( hundredthSeconds );
@@ -353,7 +353,7 @@ namespace svt
void operator() ( const TemplateContent& _rContent ) const
{
// store the info about this content
- m_rStorage << _rContent.getModDate();
+ WriteDateTime( m_rStorage, _rContent.getModDate() );
// store the info about the children
// the number
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index f4006c6517ee..31fb53d72aeb 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -114,13 +114,13 @@ SvStream& operator>>( SvStream& rIStm, TransferableObjectDescriptor& rObjDesc )
// -----------------------------------------------------------------------------
-SvStream& operator<<( SvStream& rOStm, const TransferableObjectDescriptor& rObjDesc )
+SvStream& WriteTransferableObjectDescriptor( SvStream& rOStm, const TransferableObjectDescriptor& rObjDesc )
{
const sal_uInt32 nFirstPos = rOStm.Tell(), nViewAspect = rObjDesc.mnViewAspect;
const sal_uInt32 nSig1 = TOD_SIG1, nSig2 = TOD_SIG2;
rOStm.SeekRel( 4 );
- rOStm << rObjDesc.maClassName;
+ WriteSvGlobalName( rOStm, rObjDesc.maClassName );
rOStm.WriteUInt32( nViewAspect );
//#fdo39428 Remove SvStream operator<<(long)
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(rObjDesc.maSize.Width()) );
@@ -831,7 +831,7 @@ sal_Bool TransferableHelper::SetGraphic( const Graphic& rGraphic, const DataFlav
aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
aMemStm.SetCompressMode( COMPRESSMODE_NATIVE );
- aMemStm << rGraphic;
+ WriteGraphic( aMemStm, rGraphic );
maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
}
@@ -860,7 +860,7 @@ sal_Bool TransferableHelper::SetTransferableObjectDescriptor( const Transferable
SvMemoryStream aMemStm( 1024, 1024 );
- aMemStm << rDesc;
+ WriteTransferableObjectDescriptor( aMemStm, rDesc );
maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Tell() );
return( maAny.hasValue() );