diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java index 86bf79d38..b977fdbe1 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java @@ -58,6 +58,6 @@ public class TestSlideChangeNotes extends TestCase { slideOne.setNotes(notesOne); - assertEquals(notesOne.getSheetNumber(), sa.getNotesID()); + assertEquals(notesOne._getSheetNumber(), sa.getNotesID()); } } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java index 9bb5efa4a..3dab026ec 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java @@ -42,7 +42,8 @@ public class TestSlides extends TestCase { Slide s1 = ppt.createSlide(); assertTrue(ppt.getSlides().length == 1); - assertEquals(3, s1.getSheetNumber()); + assertEquals(3, s1._getSheetRefId()); + assertEquals(256, s1._getSheetNumber()); assertEquals(1, s1.getSlideNumber()); //serialize and read again @@ -64,12 +65,14 @@ public class TestSlides extends TestCase { Slide s1 = ppt.createSlide(); assertTrue(ppt.getSlides().length == 1); - assertEquals(3, s1.getSheetNumber()); + assertEquals(3, s1._getSheetRefId()); + assertEquals(256, s1._getSheetNumber()); assertEquals(1, s1.getSlideNumber()); Slide s2 = ppt.createSlide(); assertTrue(ppt.getSlides().length == 2); - assertEquals(4, s2.getSheetNumber()); + assertEquals(4, s2._getSheetRefId()); + assertEquals(257, s2._getSheetNumber()); assertEquals(2, s2.getSlideNumber()); //serialize and read again @@ -91,17 +94,20 @@ public class TestSlides extends TestCase { Slide s1 = ppt.createSlide(); assertTrue(ppt.getSlides().length == 1); - assertEquals(3, s1.getSheetNumber()); + assertEquals(3, s1._getSheetRefId()); + assertEquals(256, s1._getSheetNumber()); assertEquals(1, s1.getSlideNumber()); Slide s2 = ppt.createSlide(); assertTrue(ppt.getSlides().length == 2); - assertEquals(4, s2.getSheetNumber()); + assertEquals(4, s2._getSheetRefId()); + assertEquals(257, s2._getSheetNumber()); assertEquals(2, s2.getSlideNumber()); Slide s3 = ppt.createSlide(); assertTrue(ppt.getSlides().length == 3); - assertEquals(5, s3.getSheetNumber()); + assertEquals(5, s3._getSheetRefId()); + assertEquals(258, s3._getSheetNumber()); assertEquals(3, s3.getSlideNumber()); //serialize and read again diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestCounts.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestCounts.java index e204303a8..afc1cf699 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestCounts.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestCounts.java @@ -49,25 +49,31 @@ public class TestCounts extends TestCase { assertEquals(1, slides[0].getSlideNumber()); assertEquals(2, slides[1].getSlideNumber()); - // The internal IDs are 4 and 6 - assertEquals(4, slides[0].getSheetNumber()); - assertEquals(6, slides[1].getSheetNumber()); + // The ref IDs are 4 and 6 + assertEquals(4, slides[0]._getSheetRefId()); + assertEquals(6, slides[1]._getSheetRefId()); + + // These are slides 1+2 -> 256+257 + assertEquals(256, slides[0]._getSheetNumber()); + assertEquals(257, slides[1]._getSheetNumber()); } public void testNotesCount() throws Exception { Notes[] notes = ss.getNotes(); - // Two sheets -> two notes, plus the notes on the slide master - assertEquals(3, notes.length); + // Two sheets -> two notes + // Note: there are also notes on the slide master + //assertEquals(3, notes.length); // When we do slide masters + assertEquals(2, notes.length); // First is for master - assertEquals(-2147483648, notes[0].getSlideInternalNumber()); + //assertEquals(-2147483648, notes[0]._getSheetNumber()); // When we do slide masters // Next two are for the two slides - assertEquals(256, notes[1].getSlideInternalNumber()); - assertEquals(257, notes[2].getSlideInternalNumber()); + assertEquals(256, notes[0]._getSheetNumber()); + assertEquals(257, notes[1]._getSheetNumber()); - // They go between the slides - assertEquals(5, notes[1].getSheetNumber()); - assertEquals(7, notes[2].getSheetNumber()); + // They happen to go between the two slides in Ref terms + assertEquals(5, notes[0]._getSheetRefId()); + assertEquals(7, notes[1]._getSheetRefId()); } } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java index e4d6590be..0b2322cd0 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java @@ -41,7 +41,7 @@ public class TestNotesText extends TestCase { } public void testNotesOne() throws Exception { - Notes notes = ss.getNotes()[1]; + Notes notes = ss.getNotes()[0]; String[] expectText = new String[] {"These are the notes for page 1"}; assertEquals(expectText.length, notes.getTextRuns().length); @@ -51,7 +51,7 @@ public class TestNotesText extends TestCase { } public void testNotesTwo() throws Exception { - Notes notes = ss.getNotes()[2]; + Notes notes = ss.getNotes()[1]; String[] expectText = new String[] {"These are the notes on page two, again lacking formatting"}; assertEquals(expectText.length, notes.getTextRuns().length); for(int i=0; i