Kaydet (Commit) 86b32152 authored tarafından Michael Stahl's avatar Michael Stahl

vcl: "sgv" filter: replace more byteswapping with SvStream methods

Change-Id: Ibc34bb75a77b0dcba491e2c297b59bfb352ca2ef
üst 2562d39d
...@@ -29,14 +29,6 @@ ...@@ -29,14 +29,6 @@
#include "sgvspln.hxx" #include "sgvspln.hxx"
#include <unotools/ucbstreamhelper.hxx> #include <unotools/ucbstreamhelper.hxx>
#if defined OSL_BIGENDIAN
#define SWAPPOINT(p) { \
p.x=OSL_SWAPWORD(p.x); \
p.y=OSL_SWAPWORD(p.y); }
#endif
// Restrictions: // Restrictions:
// - area patterns are matched to the available ones in Starview. // - area patterns are matched to the available ones in Starview.
...@@ -802,10 +794,11 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) ...@@ -802,10 +794,11 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
ReadPolyType( rInp, aPoly ); ReadPolyType( rInp, aPoly );
if (!rInp.GetError()) { if (!rInp.GetError()) {
aPoly.EckP=new PointType[aPoly.nPoints]; aPoly.EckP=new PointType[aPoly.nPoints];
rInp.Read(aPoly.EckP, 4*aPoly.nPoints); for (int i = 0; i < aPoly.nPoints; ++i)
#if defined OSL_BIGENDIAN {
for(short i=0;i<aPoly.nPoints;i++) SWAPPOINT(aPoly.EckP[i]); rInp.ReadInt16(aPoly.EckP[i].x);
#endif rInp.ReadInt16(aPoly.EckP[i].y);
}
if (!rInp.GetError()) aPoly.Draw(rOut); if (!rInp.GetError()) aPoly.Draw(rOut);
delete[] aPoly.EckP; delete[] aPoly.EckP;
} }
...@@ -815,10 +808,11 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) ...@@ -815,10 +808,11 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
ReadSplnType( rInp, aSpln ); ReadSplnType( rInp, aSpln );
if (!rInp.GetError()) { if (!rInp.GetError()) {
aSpln.EckP=new PointType[aSpln.nPoints]; aSpln.EckP=new PointType[aSpln.nPoints];
rInp.Read(aSpln.EckP, 4*aSpln.nPoints); for (int i = 0; i < aSpln.nPoints; ++i)
#if defined OSL_BIGENDIAN {
for(short i=0;i<aSpln.nPoints;i++) SWAPPOINT(aSpln.EckP[i]); rInp.ReadInt16(aSpln.EckP[i].x);
#endif rInp.ReadInt16(aSpln.EckP[i].y);
}
if (!rInp.GetError()) aSpln.Draw(rOut); if (!rInp.GetError()) aSpln.Draw(rOut);
delete[] aSpln.EckP; delete[] aSpln.EckP;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment