Lines 21-26
Link Here
|
21 |
import java.io.IOException; |
21 |
import java.io.IOException; |
22 |
import java.util.List; |
22 |
import java.util.List; |
23 |
|
23 |
|
|
|
24 |
import org.apache.poi.sl.usermodel.PictureData; |
24 |
import org.apache.poi.xslf.XSLFTestDataSamples; |
25 |
import org.apache.poi.xslf.XSLFTestDataSamples; |
25 |
import org.junit.jupiter.api.Test; |
26 |
import org.junit.jupiter.api.Test; |
26 |
|
27 |
|
Lines 70-73
Link Here
|
70 |
ppt.close(); |
71 |
ppt.close(); |
71 |
ppt2.close(); |
72 |
ppt2.close(); |
72 |
} |
73 |
} |
|
|
74 |
|
75 |
@Test |
76 |
void testImportBlip() { |
77 |
XMLSlideShow ppt = new XMLSlideShow(); |
78 |
|
79 |
XSLFSlide sourceSlide1 = ppt.createSlide(); |
80 |
XSLFSlide sourceSlide2 = ppt.createSlide(); |
81 |
|
82 |
XSLFSlide targetSlide = ppt.createSlide(); |
83 |
|
84 |
XSLFPictureShape sourcePictureShape1 = sourceSlide1.createPicture(ppt.addPicture(new byte[1], PictureData.PictureType.JPEG)); |
85 |
XSLFPictureShape sourcePictureShape2 = sourceSlide2.createPicture(ppt.addPicture(new byte[2], PictureData.PictureType.JPEG)); |
86 |
|
87 |
String sourceRelationId1 = sourceSlide1.getRelationId(sourcePictureShape1.getPictureData()); |
88 |
String sourceRelationId2 = sourceSlide2.getRelationId(sourcePictureShape2.getPictureData()); |
89 |
|
90 |
String targetRelationId1 = targetSlide.importBlip(sourceRelationId1, sourceSlide1); |
91 |
String targetRelationId2 = targetSlide.importBlip(sourceRelationId2, sourceSlide2); |
92 |
|
93 |
assertNotEquals(targetRelationId1, targetRelationId2); |
94 |
} |
95 |
|
73 |
} |
96 |
} |