Simplify #if blocks a little
Change-Id: I2867917e02ef808e4f74175bc146fcbb9bcba7be
This commit is contained in:
parent
8e5f5d3eb5
commit
c62d31f791
@ -1522,14 +1522,14 @@ SvStream& ReadPolygon( SvStream& rIStream, Polygon& rPoly )
|
|||||||
|
|
||||||
{
|
{
|
||||||
// Determine whether we need to write through operators
|
// Determine whether we need to write through operators
|
||||||
#if (SAL_TYPES_SIZEOFLONG) != 4
|
#if (SAL_TYPES_SIZEOFLONG) == 4
|
||||||
if ( true )
|
|
||||||
#else
|
|
||||||
#ifdef OSL_BIGENDIAN
|
#ifdef OSL_BIGENDIAN
|
||||||
if ( rIStream.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN )
|
if ( rIStream.GetNumberFormatInt() == NUMBERFORMAT_INT_BIGENDIAN )
|
||||||
#else
|
#else
|
||||||
if ( rIStream.GetNumberFormatInt() != NUMBERFORMAT_INT_LITTLEENDIAN )
|
if ( rIStream.GetNumberFormatInt() == NUMBERFORMAT_INT_LITTLEENDIAN )
|
||||||
#endif
|
#endif
|
||||||
|
rIStream.Read( rPoly.mpImplPolygon->mpPointAry, nPoints*sizeof(Point) );
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
for( i = 0; i < nPoints; i++ )
|
for( i = 0; i < nPoints; i++ )
|
||||||
@ -1541,8 +1541,6 @@ SvStream& ReadPolygon( SvStream& rIStream, Polygon& rPoly )
|
|||||||
rPoly.mpImplPolygon->mpPointAry[i].Y() = nTmpY;
|
rPoly.mpImplPolygon->mpPointAry[i].Y() = nTmpY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
rIStream.Read( rPoly.mpImplPolygon->mpPointAry, nPoints*sizeof(Point) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rIStream;
|
return rIStream;
|
||||||
@ -1560,14 +1558,17 @@ SvStream& WritePolygon( SvStream& rOStream, const Polygon& rPoly )
|
|||||||
|
|
||||||
{
|
{
|
||||||
// Determine whether we need to write through operators
|
// Determine whether we need to write through operators
|
||||||
#if (SAL_TYPES_SIZEOFLONG) != 4
|
#if (SAL_TYPES_SIZEOFLONG) == 4
|
||||||
if ( true )
|
|
||||||
#else
|
|
||||||
#ifdef OSL_BIGENDIAN
|
#ifdef OSL_BIGENDIAN
|
||||||
if ( rOStream.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN )
|
if ( rOStream.GetNumberFormatInt() == NUMBERFORMAT_INT_BIGENDIAN )
|
||||||
#else
|
#else
|
||||||
if ( rOStream.GetNumberFormatInt() != NUMBERFORMAT_INT_LITTLEENDIAN )
|
if ( rOStream.GetNumberFormatInt() == NUMBERFORMAT_INT_LITTLEENDIAN )
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
if ( nPoints )
|
||||||
|
rOStream.Write( rPoly.mpImplPolygon->mpPointAry, nPoints*sizeof(Point) );
|
||||||
|
}
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
for( i = 0; i < nPoints; i++ )
|
for( i = 0; i < nPoints; i++ )
|
||||||
@ -1577,11 +1578,6 @@ SvStream& WritePolygon( SvStream& rOStream, const Polygon& rPoly )
|
|||||||
.WriteInt32( sal::static_int_cast<sal_Int32>( rPoly.mpImplPolygon->mpPointAry[i].Y() ) );
|
.WriteInt32( sal::static_int_cast<sal_Int32>( rPoly.mpImplPolygon->mpPointAry[i].Y() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( nPoints )
|
|
||||||
rOStream.Write( rPoly.mpImplPolygon->mpPointAry, nPoints*sizeof(Point) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rOStream;
|
return rOStream;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user