diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-05-23 17:00:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-05-23 17:00:28 +0100 |
commit | 4b15c7678e0ee4095e82f5336784e8cb7c32c165 (patch) | |
tree | c8f898216e918cf3513a0c718b6a6ebbda41fcd1 /lotuswordpro/source/filter/lwpfilehdr.cxx | |
parent | b31d06f2ffd2a578cc887966ec79ac4fe1487877 (diff) |
fix endianness sufficiently to pass unit tests
Diffstat (limited to 'lotuswordpro/source/filter/lwpfilehdr.cxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpfilehdr.cxx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwpfilehdr.cxx b/lotuswordpro/source/filter/lwpfilehdr.cxx index 532aa53166a2..d2d87ac6064c 100644 --- a/lotuswordpro/source/filter/lwpfilehdr.cxx +++ b/lotuswordpro/source/filter/lwpfilehdr.cxx @@ -70,17 +70,25 @@ LwpFileHeader::LwpFileHeader() sal_uInt32 LwpFileHeader::Read(LwpSvStream *pStrm) { sal_uInt32 len = 0; - len += pStrm->Read(&m_nAppRevision, sizeof(m_nAppRevision)); - len += pStrm->Read(&m_nFileRevision, sizeof(m_nFileRevision)); - len += pStrm->Read(&m_nAppReleaseNo, sizeof(m_nAppReleaseNo)); - len += pStrm->Read(&m_nRequiredAppRevision, sizeof(m_nRequiredAppRevision)); - len += pStrm->Read(&m_nRequiredFileRevision, sizeof(m_nRequiredFileRevision)); + *pStrm >> m_nAppRevision; + len += sizeof(m_nAppRevision); + *pStrm >> m_nFileRevision; + len += sizeof(m_nFileRevision); + *pStrm >> m_nAppReleaseNo; + len += sizeof(m_nAppReleaseNo); + *pStrm >> m_nRequiredAppRevision; + len += sizeof(m_nRequiredAppRevision); + *pStrm >> m_nRequiredFileRevision; + len += sizeof(m_nRequiredFileRevision); len += m_cDocumentID.Read(pStrm); if (m_nFileRevision < 0x000B) m_nRootIndexOffset = BAD_OFFSET; else - len += pStrm->Read(&m_nRootIndexOffset, sizeof(m_nRootIndexOffset)); - return(len); + { + *pStrm >> m_nRootIndexOffset; + len += sizeof(m_nRootIndexOffset); + } + return len; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |