diff options
author | jp <jp@openoffice.org> | 2001-03-27 12:58:34 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2001-03-27 12:58:34 +0000 |
commit | 08dea1be70f6a2f6a6c7e0e50340edde82465a48 (patch) | |
tree | 18f2ce04bf82b78adfd7cfd0870a6a2d7c48feb2 /svtools/source/urlobj | |
parent | bbcf466fcb8b95a880010ce4f0a73612dc625f99 (diff) |
Bug #85372#: use alignment of 4
Diffstat (limited to 'svtools/source/urlobj')
-rw-r--r-- | svtools/source/urlobj/inetimg.cxx | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx index 83c8ea8ebc11..ce0d0a4304fa 100644 --- a/svtools/source/urlobj/inetimg.cxx +++ b/svtools/source/urlobj/inetimg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: inetimg.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: jp $ $Date: 2001-02-02 13:54:21 $ + * last change: $Author: jp $ $Date: 2001-03-27 13:58:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -307,11 +307,32 @@ sal_Bool INetImage::Read( SvStream& rIStm, ULONG nFormat ) */ rtl_TextEncoding eSysCSet = gsl_getSystemTextEncoding(); sal_Int32 nVal, nAnchorOffset, nAltOffset, nFilePos; + int nLen; ByteString sData; +/* + rIStm >> nLen; + rIStm.SeekRel( -sizeof( int )); + sal_Char* pBuf = new sal_Char[ nLen ]; + rIStm.Read( pBuf, nLen ); + ImageData_Impl* pImgData = (ImageData_Impl*)pBuf; + + const sal_Char* pStart = (const sal_Char*)pImgData; + aImageURL = String( (const sal_Char*)&(pImgData->pImageURL[0]), + eSysCSet ); + if( pImgData->iAltOffset ) + aAlternateText = String( (pStart + pImgData->iAltOffset), eSysCSet ); + if( pImgData->iAnchorOffset ) + aTargetURL = String( (pStart + pImgData->iAnchorOffset), eSysCSet ); + + aSizePixel.Width() = pImgData->iWidth; + aSizePixel.Height() = pImgData->iHeight; + delete pBuf; +*/ + nFilePos = rIStm.Tell(); - // skip over iSize, bIsMao - rIStm.SeekRel( sizeof( int ) + sizeof( BOOL ) ); + // skip over iSize (int), bIsMao ( BOOL ) alignment of 4 !!!! + rIStm.SeekRel( 8 ); rIStm >> nVal; aSizePixel.Width() = nVal; rIStm >> nVal; aSizePixel.Height() = nVal; // skip over iHSpace, iVSpace, iBorder, iLowResOffset @@ -337,7 +358,7 @@ sal_Bool INetImage::Read( SvStream& rIStm, ULONG nFormat ) } else if( aTargetURL.Len() ) aTargetURL.Erase(); - +/**/ bRet = 0 == rIStm.GetError(); } break; |