mirror of https://github.com/apache/poi.git
Add disabled unit test for bug #54916
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1496696 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
853ac73ce1
commit
0339745131
|
@ -16,18 +16,20 @@
|
||||||
==================================================================== */
|
==================================================================== */
|
||||||
package org.apache.poi.xslf;
|
package org.apache.poi.xslf;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import java.net.URI;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.poi.POITestCase;
|
||||||
import org.apache.poi.POIXMLDocumentPart;
|
import org.apache.poi.POIXMLDocumentPart;
|
||||||
import org.apache.poi.openxml4j.opc.PackagePart;
|
import org.apache.poi.openxml4j.opc.PackagePart;
|
||||||
|
import org.apache.poi.xslf.usermodel.DrawingParagraph;
|
||||||
|
import org.apache.poi.xslf.usermodel.DrawingTextBody;
|
||||||
import org.apache.poi.xslf.usermodel.XMLSlideShow;
|
import org.apache.poi.xslf.usermodel.XMLSlideShow;
|
||||||
import org.apache.poi.xslf.usermodel.XSLFRelation;
|
import org.apache.poi.xslf.usermodel.XSLFRelation;
|
||||||
import org.apache.poi.xslf.usermodel.XSLFSlide;
|
import org.apache.poi.xslf.usermodel.XSLFSlide;
|
||||||
import org.apache.poi.xslf.usermodel.XSLFSlideLayout;
|
import org.apache.poi.xslf.usermodel.XSLFSlideLayout;
|
||||||
|
|
||||||
import java.net.URI;
|
public class TestXSLFBugs extends POITestCase {
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class TestXSLFBugs extends TestCase {
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public void test51187() throws Exception {
|
public void test51187() throws Exception {
|
||||||
|
@ -106,4 +108,42 @@ public class TestXSLFBugs extends TestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A slideshow can have more than one rID pointing to a given
|
||||||
|
* slide, eg presentation.xml rID1 -> slide1.xml, but slide1.xml
|
||||||
|
* rID2 -> slide3.xml
|
||||||
|
*/
|
||||||
|
public void DISABLEDtest54916() throws Exception {
|
||||||
|
XMLSlideShow ss = XSLFTestDataSamples.openSampleDocument("OverlappingRelations.pptx");
|
||||||
|
XSLFSlide slide;
|
||||||
|
|
||||||
|
// Should find 4 slides
|
||||||
|
assertEquals(4, ss.getSlides().length);
|
||||||
|
|
||||||
|
// Check the text, to see we got them in order
|
||||||
|
slide = ss.getSlides()[0];
|
||||||
|
assertContains("POI cannot read this", getSlideText(slide));
|
||||||
|
|
||||||
|
slide = ss.getSlides()[1];
|
||||||
|
assertContains("POI can read this", getSlideText(slide));
|
||||||
|
assertContains("Has a relationship to another slide", getSlideText(slide));
|
||||||
|
|
||||||
|
slide = ss.getSlides()[2];
|
||||||
|
assertContains("POI can read this", getSlideText(slide));
|
||||||
|
|
||||||
|
slide = ss.getSlides()[3];
|
||||||
|
assertContains("POI can read this", getSlideText(slide));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String getSlideText(XSLFSlide slide) {
|
||||||
|
StringBuffer text = new StringBuffer();
|
||||||
|
for(DrawingTextBody textBody : slide.getCommonSlideData().getDrawingText()) {
|
||||||
|
for (DrawingParagraph p : textBody.getParagraphs()) {
|
||||||
|
text.append(p.getText());
|
||||||
|
text.append("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return text.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue