summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-01-30 13:46:42 +0200
committerMichael Stahl <mstahl@redhat.com>2014-02-04 22:50:39 +0000
commit186b4ebc99a2e80740fee51f9d0276886a003617 (patch)
treea86a4ff5fe3cd36add7053212ef37531540be253 /svtools
parent95a7e952552adb834f92d1477f83938e7c8d0204 (diff)
convert specialised SvStream::operator>> methods to ReadXXX methods
as preparation for converting the SvStream::operator>> methods on primitive types Change-Id: I62f134bced15c687d6e0d46924f56e8d1c3d95b9 Reviewed-on: https://gerrit.libreoffice.org/7798 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfattr.cxx2
-rw-r--r--svtools/source/graphic/grfmgr.cxx10
-rw-r--r--svtools/source/misc/imap.cxx8
-rw-r--r--svtools/source/misc/transfer.cxx10
4 files changed, 16 insertions, 14 deletions
diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx
index 2514ed73b65c..95b92d782968 100644
--- a/svtools/source/graphic/grfattr.cxx
+++ b/svtools/source/graphic/grfattr.cxx
@@ -73,7 +73,7 @@ sal_Bool GraphicAttr::operator==( const GraphicAttr& rAttr ) const
// ------------------------------------------------------------------------
-SvStream& operator>>( SvStream& rIStm, GraphicAttr& rAttr )
+SvStream& ReadGraphicAttr( SvStream& rIStm, GraphicAttr& rAttr )
{
VersionCompat aCompat( rIStm, STREAM_READ );
sal_uInt32 nTmp32;
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 41049c7afb0f..ae5a73400729 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -214,7 +214,7 @@ void GraphicObject::ImplAutoSwapIn()
if( pIStm )
{
- (*pIStm) >> maGraphic;
+ ReadGraphic( *pIStm, maGraphic );
mbAutoSwapped = ( maGraphic.GetType() != GRAPHIC_NONE );
delete pIStm;
}
@@ -347,7 +347,7 @@ sal_Bool GraphicObject::operator==( const GraphicObject& rGraphicObj ) const
void GraphicObject::Load( SvStream& rIStm )
{
- rIStm >> *this;
+ ReadGraphicObject( rIStm, *this );
}
void GraphicObject::Save( SvStream& rOStm )
@@ -1144,14 +1144,16 @@ IMPL_LINK_NOARG(GraphicObject, ImplAutoSwapOutHdl)
return 0L;
}
-SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj )
+SvStream& ReadGraphicObject( SvStream& rIStm, GraphicObject& rGraphicObj )
{
VersionCompat aCompat( rIStm, STREAM_READ );
Graphic aGraphic;
GraphicAttr aAttr;
sal_Bool bLink;
- rIStm >> aGraphic >> aAttr >> bLink;
+ ReadGraphic( rIStm, aGraphic );
+ ReadGraphicAttr( rIStm, aAttr );
+ rIStm >> bLink;
rGraphicObj.SetGraphic( aGraphic );
rGraphicObj.SetAttr( aAttr );
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index d38995ef69af..b989171e5e04 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -194,7 +194,7 @@ void IMapRectangleObject::WriteIMapObject( SvStream& rOStm ) const
void IMapRectangleObject::ReadIMapObject( SvStream& rIStm )
{
- rIStm >> aRect;
+ ReadRectangle( rIStm, aRect );
}
@@ -307,7 +307,7 @@ void IMapCircleObject::ReadIMapObject( SvStream& rIStm )
{
sal_uInt32 nTmp;
- rIStm >> aCenter;
+ ReadPair( rIStm, aCenter );
rIStm >> nTmp;
nRadius = nTmp;
@@ -445,13 +445,13 @@ void IMapPolygonObject::WriteIMapObject( SvStream& rOStm ) const
void IMapPolygonObject::ReadIMapObject( SvStream& rIStm )
{
- rIStm >> aPoly;
+ ReadPolygon( rIStm, aPoly );
// Version >= 2 has additional ellipses information
if ( nReadVersion >= 2 )
{
rIStm >> bEllipse;
- rIStm >> aEllipse;
+ ReadRectangle( rIStm, aEllipse );
}
}
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index fe15173ff927..e587d7d1ee59 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -383,7 +383,7 @@ Any SAL_CALL TransferableHelper::getTransferData( const DataFlavor& rFlavor ) th
SvMemoryStream* pSrcStm = new SvMemoryStream( (char*) aSeq.getConstArray(), aSeq.getLength(), STREAM_WRITE | STREAM_TRUNC );
GDIMetaFile aMtf;
- *pSrcStm >> aMtf;
+ ReadGDIMetaFile( *pSrcStm, aMtf );
delete pSrcStm;
Graphic aGraphic( aMtf );
@@ -413,7 +413,7 @@ Any SAL_CALL TransferableHelper::getTransferData( const DataFlavor& rFlavor ) th
SvMemoryStream* pSrcStm = new SvMemoryStream( (char*) aSeq.getConstArray(), aSeq.getLength(), STREAM_WRITE | STREAM_TRUNC );
GDIMetaFile aMtf;
- *pSrcStm >> aMtf;
+ ReadGDIMetaFile( *pSrcStm, aMtf );
delete pSrcStm;
SvMemoryStream aDstStm( 65535, 65535 );
@@ -1793,7 +1793,7 @@ sal_Bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIM
if( GetSotStorageStream( rFlavor, xStm ) )
{
- *xStm >> rMtf;
+ ReadGDIMetaFile( *xStm, rMtf );
bRet = ( xStm->GetError() == ERRCODE_NONE );
}
@@ -1888,7 +1888,7 @@ sal_Bool TransferableDataHelper::GetGraphic( const ::com::sun::star::datatransfe
if( GetSotStorageStream( rFlavor, xStm ) )
{
- *xStm >> rGraphic;
+ ReadGraphic( *xStm, rGraphic );
bRet = ( xStm->GetError() == ERRCODE_NONE );
}
}
@@ -2143,7 +2143,7 @@ sal_Bool TransferableDataHelper::GetFileList(
bRet = sal_True;
}
else
- bRet = ( ( *xStm >> rFileList ).GetError() == ERRCODE_NONE );
+ bRet = ( ( ReadFileList( *xStm, rFileList ) ).GetError() == ERRCODE_NONE );
}
}
}