summaryrefslogtreecommitdiff
path: root/tools/source/generic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-25 05:27:36 +0200
committerNoel Grandin <noel@peralex.com>2014-09-26 15:25:40 +0200
commitd46b16e1e495c153f70633d2da5c2bb0aba85cc9 (patch)
tree79134004da6c8e06ef5d1a007c4d35340c463794 /tools/source/generic
parent8f684e21de081350f0ce1f0bd0420f4775c5388d (diff)
remove unnecessary casts's
left over from our conversion of the SvStream output operators to more specific methods Change-Id: I63f18be8e940098c2acbbc73ee49ede3a949fcb2
Diffstat (limited to 'tools/source/generic')
-rw-r--r--tools/source/generic/fract.cxx4
-rw-r--r--tools/source/generic/gen.cxx13
-rw-r--r--tools/source/generic/poly.cxx7
3 files changed, 10 insertions, 14 deletions
diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx
index 897491d1f101..cfc68b12a583 100644
--- a/tools/source/generic/fract.cxx
+++ b/tools/source/generic/fract.cxx
@@ -498,8 +498,8 @@ SvStream& ReadFraction( SvStream& rIStream, Fraction& rFract )
SvStream& WriteFraction( SvStream& rOStream, const Fraction& rFract )
{
//fdo#39428 SvStream no longer supports operator<<(long)
- rOStream.WriteInt32( sal::static_int_cast<sal_Int32>(rFract.nNumerator) );
- rOStream.WriteInt32( sal::static_int_cast<sal_Int32>(rFract.nDenominator) );
+ rOStream.WriteInt32( rFract.nNumerator );
+ rOStream.WriteInt32( rFract.nDenominator );
return rOStream;
}
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 723f9137c15e..23eb1f59ef2e 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -38,8 +38,7 @@ SvStream& WritePair( SvStream& rOStream, const Pair& rPair )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "Pair::<< - Solar-Version not set on rOStream" );
- //39428 SvStream no longer supports operator<<(long)
- rOStream.WriteInt32( sal::static_int_cast<sal_Int32>(rPair.nA) ).WriteInt32( sal::static_int_cast<sal_Int32>(rPair.nB) );
+ rOStream.WriteInt32( rPair.nA ).WriteInt32( rPair.nB );
return rOStream;
}
@@ -173,7 +172,6 @@ SvStream& ReadRectangle( SvStream& rIStream, Rectangle& rRect )
{
DBG_ASSERTWARNING( rIStream.GetVersion(), "Rectangle::>> - Solar-Version not set on rIStream" );
- //fdo#39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmpL(0), nTmpT(0), nTmpR(0), nTmpB(0);
rIStream.ReadInt32( nTmpL ).ReadInt32( nTmpT ).ReadInt32( nTmpR ).ReadInt32( nTmpB );
@@ -190,11 +188,10 @@ SvStream& WriteRectangle( SvStream& rOStream, const Rectangle& rRect )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "Rectangle::<< - Solar-Version not set on rOStream" );
- //fdo#39428 SvStream no longer supports operator<<(long)
- rOStream.WriteInt32( sal::static_int_cast<sal_Int32>(rRect.nLeft) )
- .WriteInt32( sal::static_int_cast<sal_Int32>(rRect.nTop) )
- .WriteInt32( sal::static_int_cast<sal_Int32>(rRect.nRight) )
- .WriteInt32( sal::static_int_cast<sal_Int32>(rRect.nBottom) );
+ rOStream.WriteInt32( rRect.nLeft )
+ .WriteInt32( rRect.nTop )
+ .WriteInt32( rRect.nRight )
+ .WriteInt32( rRect.nBottom );
return rOStream;
}
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index aaa780f29982..c31f13c41c47 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1598,9 +1598,8 @@ SvStream& WritePolygon( SvStream& rOStream, const Polygon& rPoly )
{
for( i = 0; i < nPoints; i++ )
{
- //fdo#39428 SvStream no longer supports operator<<(long)
- rOStream.WriteInt32( sal::static_int_cast<sal_Int32>( rPoly.mpImplPolygon->mpPointAry[i].X() ) )
- .WriteInt32( sal::static_int_cast<sal_Int32>( rPoly.mpImplPolygon->mpPointAry[i].Y() ) );
+ rOStream.WriteInt32( rPoly.mpImplPolygon->mpPointAry[i].X() )
+ .WriteInt32( rPoly.mpImplPolygon->mpPointAry[i].Y() );
}
}
}
@@ -1633,7 +1632,7 @@ void Polygon::ImplWrite( SvStream& rOStream ) const
{
bool bHasPolyFlags = mpImplPolygon->mpFlagAry != NULL;
WritePolygon( rOStream, *this );
- rOStream.WriteUChar(sal_uInt8(bHasPolyFlags));
+ rOStream.WriteUChar(bHasPolyFlags);
if ( bHasPolyFlags )
rOStream.Write( mpImplPolygon->mpFlagAry, mpImplPolygon->mnPoints );