summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-06-03 23:28:10 +0200
committerMichael Stahl <mstahl@redhat.com>2016-06-06 14:49:30 +0200
commit3e9aa8b2b29f5222d93ace0e02207fe3bd7d853f (patch)
tree5621a4d074c87c4e675516b358533547675d4d0f
parent4849f342b6969abb777d91a1fa77ec120f861c48 (diff)
lotuswordpro: fix some endian issues
Change-Id: I224c2d894071d6ec7d0afd5e2780a42b842aa32e
-rw-r--r--lotuswordpro/source/filter/lwpsdwfileloader.cxx2
-rw-r--r--lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx26
2 files changed, 14 insertions, 14 deletions
diff --git a/lotuswordpro/source/filter/lwpsdwfileloader.cxx b/lotuswordpro/source/filter/lwpsdwfileloader.cxx
index b30097a96d97..ac2687ad7e9e 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 de653c52402f..6d134a042438 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;