diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-10-27 11:51:28 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-10-27 12:37:45 +0200 |
commit | a3cb93b3917608f5b329321caea8d699b80b1ddf (patch) | |
tree | 6f46725c4e90dfb2e09f9b6e993fa071fd1ff76e /cppcanvas | |
parent | 39a2401807e67f41e96f51f747cb10c54700d793 (diff) |
remove GetSwapFloat nonsense from all 3 EMF readers
SvStream::ReadFloat already does that, and SvStream is initialised
to SvStreamEndian::LITTLE by default.
Change-Id: I5859e43014533bcebef9d4b8f0678c516193b92e
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/inc/implrenderer.hxx | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 15b610306304..e61f3407169a 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -133,20 +133,6 @@ namespace cppcanvas eDy = eDx*f.eM12 + eDy*f.eM22 + f.eDy; } -#ifdef OSL_BIGENDIAN -// little endian <-> big endian switch -static float GetSwapFloat( SvStream& rSt ) -{ - float fTmp; - sal_Int8* pPtr = (sal_Int8*)&fTmp; - rSt.ReadSChar( pPtr[3] ); - rSt.ReadSChar( pPtr[2] ); - rSt.ReadSChar( pPtr[1] ); - rSt.ReadSChar( pPtr[0] ); - return fTmp; -} -#endif - friend SvStream& ReadXForm( SvStream& rIn, XForm& rXForm ) { if ( sizeof( float ) != 4 ) @@ -156,17 +142,8 @@ static float GetSwapFloat( SvStream& rSt ) } else { -#ifdef OSL_BIGENDIAN - rXForm.eM11 = GetSwapFloat( rIn ); - rXForm.eM12 = GetSwapFloat( rIn ); - rXForm.eM21 = GetSwapFloat( rIn ); - rXForm.eM22 = GetSwapFloat( rIn ); - rXForm.eDx = GetSwapFloat( rIn ); - rXForm.eDy = GetSwapFloat( rIn ); -#else rIn.ReadFloat( rXForm.eM11 ).ReadFloat( rXForm.eM12 ).ReadFloat( rXForm.eM21 ).ReadFloat( rXForm.eM22 ) .ReadFloat( rXForm.eDx ).ReadFloat( rXForm.eDy ); -#endif } return rIn; } |