summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-11-17 15:00:53 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-11-17 17:54:56 +0100
commit97f084b10caa971ee08730c80a3c3cde85c9475e (patch)
tree79da4316799dbc3cf5c7fbc836311e38099a7350 /tools
parent5e06a0809ed8f2f9fe9bc9d9720b8096e4572f5d (diff)
Fix vcl_svm_test after making tools::Long 64-bit on _WIN64
Just don't rely on details of Point implementation. Change-Id: I0cd0d6b7cacbf2751803a854d78e4b099ccf197f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105978 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/poly.cxx43
1 files changed, 8 insertions, 35 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 5a4a79be984c..a88a9fd9ec00 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1621,24 +1621,12 @@ SvStream& ReadPolygon( SvStream& rIStream, tools::Polygon& rPoly )
rPoly.mpImplPolygon->ImplSetSize( nPoints, false );
- // Determine whether we need to write through operators
-#if (SAL_TYPES_SIZEOFLONG) == 4
-#ifdef OSL_BIGENDIAN
- if ( rIStream.GetEndian() == SvStreamEndian::BIG )
-#else
- if ( rIStream.GetEndian() == SvStreamEndian::LITTLE )
-#endif
- rIStream.ReadBytes(rPoly.mpImplPolygon->mxPointAry.get(), nPoints*sizeof(Point));
- else
-#endif
+ for (i = 0; i < nPoints; i++)
{
- for( i = 0; i < nPoints; i++ )
- {
- sal_Int32 nTmpX(0), nTmpY(0);
- rIStream.ReadInt32( nTmpX ).ReadInt32( nTmpY );
- rPoly.mpImplPolygon->mxPointAry[i].setX( nTmpX );
- rPoly.mpImplPolygon->mxPointAry[i].setY( nTmpY );
- }
+ sal_Int32 nTmpX(0), nTmpY(0);
+ rIStream.ReadInt32(nTmpX).ReadInt32(nTmpY);
+ rPoly.mpImplPolygon->mxPointAry[i].setX(nTmpX);
+ rPoly.mpImplPolygon->mxPointAry[i].setY(nTmpY);
}
return rIStream;
@@ -1652,25 +1640,10 @@ SvStream& WritePolygon( SvStream& rOStream, const tools::Polygon& rPoly )
// Write number of points
rOStream.WriteUInt16( nPoints );
- // Determine whether we need to write through operators
-#if (SAL_TYPES_SIZEOFLONG) == 4
-#ifdef OSL_BIGENDIAN
- if ( rOStream.GetEndian() == SvStreamEndian::BIG )
-#else
- if ( rOStream.GetEndian() == SvStreamEndian::LITTLE )
-#endif
- {
- if ( nPoints )
- rOStream.WriteBytes(rPoly.mpImplPolygon->mxPointAry.get(), nPoints*sizeof(Point));
- }
- else
-#endif
+ for (i = 0; i < nPoints; i++)
{
- for( i = 0; i < nPoints; i++ )
- {
- rOStream.WriteInt32( rPoly.mpImplPolygon->mxPointAry[i].X() )
- .WriteInt32( rPoly.mpImplPolygon->mxPointAry[i].Y() );
- }
+ rOStream.WriteInt32(rPoly.mpImplPolygon->mxPointAry[i].X())
+ .WriteInt32(rPoly.mpImplPolygon->mxPointAry[i].Y());
}
return rOStream;