update ooo310-m15
[ooovba.git] / applied_patches / 0391-userform-image-import-fix.diff
blob09db612eae5bd3fd869e8f1fd08f92812085fac2
1 diff --git svx/source/msfilter/msocximex.cxx svx/source/msfilter/msocximex.cxx
2 index 164073d..b4a46ce 100644
3 --- svx/source/msfilter/msocximex.cxx
4 +++ svx/source/msfilter/msocximex.cxx
5 @@ -4449,32 +4449,31 @@ sal_Bool OCX_UserForm::Read(SvStorageStream *pS)
6 pS->Read(pIcon,nIconLen);
9 + ReadAlign( pS, pS->Tell() - nStart, 4);
10 + if (pBlockFlags[2] & 0x10)
11 + {
12 + //Font Stuff..
13 + pS->SeekRel(0x1a);
14 + sal_uInt8 nFontLen;
15 + *pS >> nFontLen;
16 + pS->SeekRel(nFontLen);
17 + }
18 if (nPicture)
20 pS->Read(pPictureHeader,20);
21 *pS >> nPictureLen;
22 long imagePos = pS->Tell();
23 + // great embedded object
24 mxGrfObj = lcl_readGraphicObject( pS );
25 if( mxGrfObj.is() )
27 sImageUrl = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( GRAPHOBJ_URLPREFIX ) );
28 sImageUrl = sImageUrl + mxGrfObj->getUniqueID();
30 - // make sure the stream position should be pointing after the image
31 + // make sure the stream position should be pointing after the image.
32 pS->Seek( imagePos + nPictureLen );
35 - ReadAlign( pS, pS->Tell() - nStart, 4);
37 - if (pBlockFlags[2] & 0x10)
38 - {
39 - //Font Stuff..
40 - pS->SeekRel(0x1a);
41 - sal_uInt8 nFontLen;
42 - *pS >> nFontLen;
43 - pS->SeekRel(nFontLen);
44 - }
46 sal_Int16 numTrailingRecs = 0;
47 *pS >> numTrailingRecs;
48 // seems to be no. of trailing records,