diff options
author | Yegor Kozlov <yegor@apache.org> | 2009-06-27 10:25:23 +0000 |
---|---|---|
committer | Yegor Kozlov <yegor@apache.org> | 2009-06-27 10:25:23 +0000 |
commit | 0b2d3cf6938806e4086bfb4766e95572d5bd9134 (patch) | |
tree | 28965f19b8df9a692bf47bfe69e6e7dd509dbfd7 /src/scratchpad/testcases | |
parent | d90f75b05ef03a1909e7dbf6676f57608b127ab6 (diff) | |
download | poi-0b2d3cf6938806e4086bfb4766e95572d5bd9134.tar.gz poi-0b2d3cf6938806e4086bfb4766e95572d5bd9134.zip |
fixed typo in SlideShow.removeSlide which prevened deletion of slide's notes, see Bugzilla 47261
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@788948 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad/testcases')
-rwxr-xr-x | src/scratchpad/testcases/org/apache/poi/hslf/data/47261.ppt | bin | 183296 -> 378368 bytes | |||
-rw-r--r-- | src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java | 11 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/data/47261.ppt b/src/scratchpad/testcases/org/apache/poi/hslf/data/47261.ppt Binary files differindex be472de7c9..7a26a7981e 100755 --- a/src/scratchpad/testcases/org/apache/poi/hslf/data/47261.ppt +++ b/src/scratchpad/testcases/org/apache/poi/hslf/data/47261.ppt diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java index 4ffeb87894..dd1ccd0b4e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java @@ -279,15 +279,18 @@ public final class TestAddingSlides extends TestCase { Slide[] slides = ppt.getSlides(); Document doc = ppt.getDocumentRecord(); assertNotNull(doc.getSlideSlideListWithText()); - assertEquals(1, ppt.getSlides().length); + assertEquals(14, ppt.getSlides().length); int notesId = slides[0].getSlideRecord().getSlideAtom().getNotesID(); assertTrue(notesId > 0); assertNotNull(doc.getNotesSlideListWithText()); - //the SLWT container for notes has one entry which will deleted - assertEquals(1, doc.getNotesSlideListWithText().getSlideAtomsSets().length); + assertEquals(14, doc.getNotesSlideListWithText().getSlideAtomsSets().length); - ppt.removeSlide(0); + //remove all slides, corresponding notes should be removed too + for (int i = 0; i < slides.length; i++) { + ppt.removeSlide(0); + } assertEquals(0, ppt.getSlides().length); + assertEquals(0, ppt.getNotes().length); assertNull(doc.getSlideSlideListWithText()); assertNull(doc.getNotesSlideListWithText()); |