summaryrefslogtreecommitdiff
path: root/editeng
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 /editeng
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 'editeng')
-rw-r--r--editeng/source/items/bulitem.cxx2
-rw-r--r--editeng/source/items/flditem.cxx4
-rw-r--r--editeng/source/items/frmitems.cxx22
-rw-r--r--editeng/source/items/numitem.cxx6
-rw-r--r--editeng/source/items/textitem.cxx7
5 files changed, 21 insertions, 20 deletions
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index 1c681c4342a0..e9bfaf37baa6 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -38,7 +38,7 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont )
{
sal_uInt16 nTemp;
- rStream << rFont.GetColor();
+ WriteColor( rStream, rFont.GetColor() );
nTemp = (sal_uInt16)rFont.GetFamily(); rStream.WriteUInt16( nTemp );
nTemp = (sal_uInt16)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet());
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 96de48e1be4a..47d68f0e0aa2 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -342,10 +342,10 @@ SvStream& SvxFieldItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) co
{
// SvxFieldData not enough, because not registered on ClassMgr.
SvxURLField aDummyData;
- aPStrm << &aDummyData;
+ WriteSvPersistBase( aPStrm , &aDummyData );
}
else
- aPStrm << pField;
+ WriteSvPersistBase( aPStrm, pField );
return rStrm;
}
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 6b8c60a5d2d4..bd88e973aa0d 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -106,7 +106,7 @@ namespace
/// Store a border line to a stream.
SvStream& StoreBorderLine(SvStream &stream, const SvxBorderLine &l, sal_uInt16 version)
{
- stream << l.GetColor();
+ WriteColor( stream, l.GetColor() );
stream.WriteUInt16( l.GetOutWidth() )
.WriteUInt16( l.GetInWidth() )
.WriteUInt16( l.GetDistance() );
@@ -1512,9 +1512,9 @@ SvStream& SvxShadowItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
{
rStrm.WriteSChar( (sal_Int8) GetLocation() )
.WriteUInt16( (sal_uInt16) GetWidth() )
- .WriteUChar( (sal_Bool)(aShadowColor.GetTransparency() > 0) )
- << GetColor()
- << GetColor();
+ .WriteUChar( (sal_Bool)(aShadowColor.GetTransparency() > 0) );
+ WriteColor( rStrm, GetColor() );
+ WriteColor( rStrm, GetColor() );
rStrm.WriteSChar( (sal_Int8)(aShadowColor.GetTransparency() > 0 ? 0 : 1) ); //BRUSH_NULL : BRUSH_SOLID
return rStrm;
}
@@ -2612,8 +2612,8 @@ SvStream& SvxBoxInfoItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
const SvxBorderLine* l = pLine[ i ];
if( l )
{
- rStrm.WriteChar( (char) i )
- << l->GetColor();
+ rStrm.WriteChar( (char) i );
+ WriteColor( rStrm, l->GetColor() );
rStrm.WriteInt16( (short) l->GetOutWidth() )
.WriteInt16( (short) l->GetInWidth() )
.WriteInt16( (short) l->GetDistance() );
@@ -3257,14 +3257,14 @@ SvStream& SvxLineItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) co
{
if( pLine )
{
- rStrm << pLine->GetColor();
+ WriteColor( rStrm, pLine->GetColor() );
rStrm.WriteInt16( (short)pLine->GetOutWidth() )
.WriteInt16( (short)pLine->GetInWidth() )
.WriteInt16( (short)pLine->GetDistance() );
}
else
{
- rStrm << Color();
+ WriteColor( rStrm, Color() );
rStrm.WriteInt16( (short)0 ).WriteInt16( (short)0 ).WriteInt16( (short)0 );
}
return rStrm;
@@ -3901,8 +3901,8 @@ SfxPoolItem* SvxBrushItem::Create( SvStream& rStream, sal_uInt16 nVersion ) cons
SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 /*nItemVersion*/ ) const
{
rStream.WriteUChar( (sal_Bool)sal_False );
- rStream << aColor;
- rStream << aColor;
+ WriteColor( rStream, aColor );
+ WriteColor( rStream, aColor );
rStream.WriteSChar( (sal_Int8)(aColor.GetTransparency() > 0 ? 0 : 1) ); //BRUSH_NULL : BRUSH_SOLID
sal_uInt16 nDoLoad = 0;
@@ -3916,7 +3916,7 @@ SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 /*nItemVersion*/ )
rStream.WriteUInt16( nDoLoad );
if ( pImpl->pGraphicObject && maStrLink.isEmpty() )
- rStream << pImpl->pGraphicObject->GetGraphic();
+ WriteGraphic( rStream, pImpl->pGraphicObject->GetGraphic() );
if ( !maStrLink.isEmpty() )
{
OSL_FAIL("No BaseURL!");
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 719970fa6082..47bf1e061af5 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -283,16 +283,16 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
if(pBulletFont)
{
rStream.WriteUInt16( (sal_uInt16)1 );
- rStream << *pBulletFont;
+ WriteFont( rStream, *pBulletFont );
}
else
rStream.WriteUInt16( (sal_uInt16)0 );
- rStream << aGraphicSize;
+ WritePair( rStream, aGraphicSize );
Color nTempColor = nBulletColor;
if(COL_AUTO == nBulletColor.GetColor())
nTempColor = COL_BLACK;
- rStream << nTempColor;
+ WriteColor( rStream, nTempColor );
rStream.WriteUInt16( nBulletRelSize );
rStream.WriteUInt16( (sal_uInt16)IsShowSymbol() );
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 7089b026b364..d1832368662a 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -2006,9 +2006,9 @@ SvStream& SvxColorItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
{
if( VERSION_USEAUTOCOLOR == nItemVersion &&
COL_AUTO == mColor.GetColor() )
- rStrm << Color( COL_BLACK );
+ WriteColor( rStrm, Color( COL_BLACK ) );
else
- rStrm << mColor;
+ WriteColor( rStrm, mColor );
return rStrm;
}
@@ -2082,7 +2082,8 @@ SfxPoolItem* SvxCharSetColorItem::Clone( SfxItemPool * ) const
SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm.WriteUChar( (sal_uInt8)GetSOStoreTextEncoding(GetCharSet()) ) << GetValue();
+ rStrm.WriteUChar( (sal_uInt8)GetSOStoreTextEncoding(GetCharSet()) );
+ WriteColor( rStrm, GetValue() );
return rStrm;
}