diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-06-03 14:45:59 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-06-06 18:09:11 +0000 |
commit | 62d270116bf34778bf581f21b27fa9cdbff7de0e (patch) | |
tree | 0402df0506ab8f6825ef497f27426f01d2e01850 /tools/source/rc | |
parent | d0bc637426060593046c8d3a4d01d0b05b052cc5 (diff) |
tools: rename SvStream::Read/Write to ReadBytes/WriteBytes
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a
Reviewed-on: https://gerrit.libreoffice.org/25972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'tools/source/rc')
-rw-r--r-- | tools/source/rc/resmgr.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index fb3ed921d168..078ad5bfbcf4 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -489,13 +489,13 @@ bool InternalResMgr::Create() fRes, 0 ) ) != (RSHEADER_TYPE *)-1) */ pStm->SeekRel( - (int)sizeof( lContLen ) ); - pStm->Read( &lContLen, sizeof( lContLen ) ); - // is bigendian, swab to the right endian + pStm->ReadBytes( &lContLen, sizeof( lContLen ) ); + // file is bigendian but SvStreamEndian not set, swab to the right endian lContLen = ResMgr::GetLong( &lContLen ); pStm->SeekRel( -lContLen ); // allocate stored ImpContent data (12 bytes per unit) sal_uInt8* pContentBuf = static_cast<sal_uInt8*>(rtl_allocateMemory( lContLen )); - pStm->Read( pContentBuf, lContLen ); + pStm->ReadBytes( pContentBuf, lContLen ); // allocate ImpContent space (sizeof(ImpContent) per unit, not necessarily 12) pContent = static_cast<ImpContent *>(rtl_allocateMemory( sizeof(ImpContent)*lContLen/12 )); // Shorten to number of ImpContent @@ -590,11 +590,11 @@ void* InternalResMgr::LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId, --pLast; pStm->Seek( pLast->nOffset ); RSHEADER_TYPE aHdr; - pStm->Read( &aHdr, sizeof( aHdr ) ); + pStm->ReadBytes( &aHdr, sizeof( aHdr ) ); nSize = pLast->nOffset + aHdr.GetGlobOff() - nOffCorrection; pStringBlock = static_cast<sal_uInt8*>(rtl_allocateMemory( nSize )); pStm->Seek( pFirst->nOffset ); - pStm->Read( pStringBlock, nSize ); + pStm->ReadBytes( pStringBlock, nSize ); } *pResHandle = pStringBlock; return pStringBlock + pFind->nOffset - nOffCorrection; @@ -604,10 +604,10 @@ void* InternalResMgr::LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId, *pResHandle = nullptr; RSHEADER_TYPE aHeader; pStm->Seek( pFind->nOffset ); - pStm->Read( &aHeader, sizeof( RSHEADER_TYPE ) ); + pStm->ReadBytes( &aHeader, sizeof( RSHEADER_TYPE ) ); void * pRes = rtl_allocateMemory( aHeader.GetGlobOff() ); memcpy( pRes, &aHeader, sizeof( RSHEADER_TYPE ) ); - pStm->Read( static_cast<sal_uInt8*>(pRes) + sizeof( RSHEADER_TYPE ), + pStm->ReadBytes(static_cast<sal_uInt8*>(pRes) + sizeof(RSHEADER_TYPE), aHeader.GetGlobOff() - sizeof( RSHEADER_TYPE ) ); return pRes; } |