[Libreoffice-commits] core.git: cppcanvas/source vcl/source

Douglas Mencken dougmencken at gmail.com
Tue Feb 25 05:43:54 PST 2014


 cppcanvas/source/inc/implrenderer.hxx |    7 +++++--
 vcl/source/filter/wmf/enhwmf.cxx      |    7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 63de81621a8d075d1df00d54798e06271083110e
Author: Douglas Mencken <dougmencken at gmail.com>
Date:   Mon Feb 24 11:47:03 2014 -0500

    Update little-to-big endian GetSwapFloat functions
    
    rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0] results in error:
      no match for 'operator>>' in 'rSt >> *(pPtr + 3u)'
    
    Change-Id: I1820bac8c72f7633ab01a17bf5d073b988e1b58c
    Reviewed-on: https://gerrit.libreoffice.org/8207
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx
index 1762645..4f043b9b 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -137,12 +137,15 @@ namespace cppcanvas
             }
 
 #ifdef OSL_BIGENDIAN
-// currently unused
+// little endian <-> big endian switch
 static float GetSwapFloat( SvStream& rSt )
 {
         float   fTmp;
         sal_Int8* pPtr = (sal_Int8*)&fTmp;
-        rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0];        // Little Endian <-> Big Endian switch
+        rSt.ReadSChar( pPtr[3] );
+        rSt.ReadSChar( pPtr[2] );
+        rSt.ReadSChar( pPtr[1] );
+        rSt.ReadSChar( pPtr[0] );
         return fTmp;
 }
 #endif
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 9023c50..f2df15d 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -155,12 +155,15 @@ using namespace std;
 
 
 #ifdef OSL_BIGENDIAN
-// currently unused
+// little endian <-> big endian switch
 static float GetSwapFloat( SvStream& rSt )
 {
     float   fTmp;
     sal_Int8* pPtr = (sal_Int8*)&fTmp;
-    rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0];    // little endian <-> big endian switch
+    rSt.ReadSChar( pPtr[3] );
+    rSt.ReadSChar( pPtr[2] );
+    rSt.ReadSChar( pPtr[1] );
+    rSt.ReadSChar( pPtr[0] );
     return fTmp;
 }
 #endif


More information about the Libreoffice-commits mailing list