View | Details | Raw Unified | Return to bug 46627
Collapse All | Expand All

(-)../../poi-3.2-FINAL.orig/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java (+9 lines)
Lines 517-522 Link Here
517
		// Add in the new image
517
		// Add in the new image
518
		lst[lst.length - 1] = img;
518
		lst[lst.length - 1] = img;
519
		_pictures = lst;
519
		_pictures = lst;
520
521
		if( lst.length > 1 ) {
522
			PictureData prev = lst[lst.length - 2];
523
			int offset = prev.getOffset() + prev.getRawData().length + 8;
524
			lst[lst.length - 1].setOffset( offset );
525
		}
526
		else {
527
			lst[lst.length - 1].setOffset( 0 );
528
		}
520
	}
529
	}
521
530
522
	/* ******************* fetching methods follow ********************* */
531
	/* ******************* fetching methods follow ********************* */
(-)../../poi-3.2-FINAL.orig/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java (-4 / +4 lines)
Lines 730-736 Link Here
730
730
731
        PictureData pict = PictureData.create(format);
731
        PictureData pict = PictureData.create(format);
732
        pict.setData(data);
732
        pict.setData(data);
733
        pict.setOffset(offset);
733
        _hslfSlideShow.addPicture(pict);
734
734
735
        EscherBSERecord bse = new EscherBSERecord();
735
        EscherBSERecord bse = new EscherBSERecord();
736
        bse.setRecordId(EscherBSERecord.RECORD_ID);
736
        bse.setRecordId(EscherBSERecord.RECORD_ID);
Lines 746-759 Link Here
746
        else if (format == Picture.PICT) bse.setBlipTypeWin32((byte)Picture.WMF);
746
        else if (format == Picture.PICT) bse.setBlipTypeWin32((byte)Picture.WMF);
747
747
748
        bse.setRef(0);
748
        bse.setRef(0);
749
        bse.setOffset(offset);
749
        bse.setOffset(pict.getOffset());
750
        bse.setRemainingData( new byte[0] );
750
751
751
        bstore.addChildRecord(bse);
752
        bstore.addChildRecord(bse);
753
752
        int count = bstore.getChildRecords().size();
754
        int count = bstore.getChildRecords().size();
753
        bstore.setOptions((short)( (count << 4) | 0xF ));
755
        bstore.setOptions((short)( (count << 4) | 0xF ));
754
756
755
        _hslfSlideShow.addPicture(pict);
756
757
        return count;
757
        return count;
758
    }
758
    }
759
759

Return to bug 46627