[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - lotuswordpro/source

Michael Stahl mstahl at redhat.com
Tue Jun 7 07:28:52 UTC 2016


 lotuswordpro/source/filter/lwpsdwfileloader.cxx       |    2 -
 lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx |   26 +++++++++---------
 2 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 7938001b4de0d187a29ab4e6d437bc7de66ba85e
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jun 3 23:28:10 2016 +0200

    lotuswordpro: fix some endian issues
    
    Change-Id: I224c2d894071d6ec7d0afd5e2780a42b842aa32e
    (cherry picked from commit 3e9aa8b2b29f5222d93ace0e02207fe3bd7d853f)
    Reviewed-on: https://gerrit.libreoffice.org/25992
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/lotuswordpro/source/filter/lwpsdwfileloader.cxx b/lotuswordpro/source/filter/lwpsdwfileloader.cxx
index b30097a..ac2687a 100644
--- a/lotuswordpro/source/filter/lwpsdwfileloader.cxx
+++ b/lotuswordpro/source/filter/lwpsdwfileloader.cxx
@@ -84,7 +84,7 @@ void LwpSdwFileLoader::CreateDrawObjects(std::vector< rtl::Reference<XFFrame> >*
     if (BinSignature[0] == 'S' && BinSignature[1] == 'M')
     {
         unsigned short nVersion;
-        m_pStream->Read(&nVersion,2);
+        m_pStream->ReadUInt16(nVersion);
 
         m_pStream->Seek(0);
         if (nVersion<0x0102)
diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
index de653c5..6d134a0 100644
--- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
+++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
@@ -106,7 +106,7 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< rtl::Reference<XFFram
     }
     //version
     unsigned short nVersion;
-    m_pStream->Read(&nVersion,2);
+    m_pStream->ReadUInt16(nVersion);
     if (nVersion<0x0102)
     {
         assert(false);
@@ -116,15 +116,15 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< rtl::Reference<XFFram
     m_pStream->SeekRel(4);
     //record count
     unsigned short nRecCount;
-    m_pStream->Read(&nRecCount,2);
+    m_pStream->ReadUInt16(nRecCount);
     // selCount
     m_pStream->SeekRel(2);
     //boundrect
     unsigned short left,top,right,bottom;
-    m_pStream->Read(&left,2);
-    m_pStream->Read(&top,2);
-    m_pStream->Read(&right,2);
-    m_pStream->Read(&bottom,2);
+    m_pStream->ReadUInt16(left);
+    m_pStream->ReadUInt16(top);
+    m_pStream->ReadUInt16(right);
+    m_pStream->ReadUInt16(bottom);
     // fileSize
     m_pStream->SeekRel(2);
 
@@ -251,7 +251,7 @@ XFDrawGroup* LwpSdwGroupLoaderV0102::CreateDrawGroupObject()
     }
     //version
     unsigned short nVersion;
-    m_pStream->Read(&nVersion,2);
+    m_pStream->ReadUInt16(nVersion);
     if (nVersion<0x0102)
     {
         assert(false);
@@ -261,15 +261,15 @@ XFDrawGroup* LwpSdwGroupLoaderV0102::CreateDrawGroupObject()
     m_pStream->SeekRel(4);
     //record count
     unsigned short nRecCount;
-    m_pStream->Read(&nRecCount,2);
+    m_pStream->ReadUInt16(nRecCount);
     // selCount
     m_pStream->SeekRel(2);
     //boundrect
     unsigned short left,top,right,bottom;
-    m_pStream->Read(&left,2);
-    m_pStream->Read(&top,2);
-    m_pStream->Read(&right,2);
-    m_pStream->Read(&bottom,2);
+    m_pStream->ReadUInt16(left);
+    m_pStream->ReadUInt16(top);
+    m_pStream->ReadUInt16(right);
+    m_pStream->ReadUInt16(bottom);
     // fileSize
     m_pStream->SeekRel(2);
 
@@ -304,7 +304,7 @@ XFFrame* LwpSdwGroupLoaderV0102::CreateDrawObject()
 {
     //record type
     unsigned char recType;
-    m_pStream->Read(&recType,1);
+    m_pStream->ReadUChar(recType);
 
     LwpDrawObj* pDrawObj = nullptr;
     XFFrame* pRetObjct = nullptr;


More information about the Libreoffice-commits mailing list