Lines 412-415
Link Here
|
412 |
assertEquals(tpCC.getTextPropList(), ntpCC.getTextPropList()); |
412 |
assertEquals(tpCC.getTextPropList(), ntpCC.getTextPropList()); |
413 |
assertEquals(tpDC.getTextPropList(), ntpDC.getTextPropList()); |
413 |
assertEquals(tpDC.getTextPropList(), ntpDC.getTextPropList()); |
414 |
} |
414 |
} |
|
|
415 |
|
416 |
/** |
417 |
* Test case for Bug 41015. |
418 |
* |
419 |
* In some cases RichTextRun.getText() threw StringIndexOutOfBoundsException because |
420 |
* of the wrong list of potential paragraph properties defined in StyleTextPropAtom. |
421 |
* |
422 |
*/ |
423 |
public void testBug41015() throws Exception { |
424 |
RichTextRun[] rt; |
425 |
|
426 |
SlideShow ppt = new SlideShow(new HSLFSlideShow(System.getProperty("HSLF.testdata.path") + "/bug-41015.ppt")); |
427 |
Slide sl = ppt.getSlides()[0]; |
428 |
TextRun[] txt = sl.getTextRuns(); |
429 |
assertEquals(2, txt.length); |
430 |
|
431 |
rt = txt[0].getRichTextRuns(); |
432 |
assertEquals(1, rt.length); |
433 |
assertEquals(0, rt[0].getIndentLevel()); |
434 |
assertEquals("sdfsdfsdf", rt[0].getText()); |
435 |
|
436 |
rt = txt[1].getRichTextRuns(); |
437 |
assertEquals(2, rt.length); |
438 |
assertEquals(0, rt[0].getIndentLevel()); |
439 |
assertEquals("Sdfsdfsdf\n" + |
440 |
"Dfgdfg\n" + |
441 |
"Dfgdfgdfg\n", rt[0].getText()); |
442 |
assertEquals(1, rt[1].getIndentLevel()); |
443 |
assertEquals("Sdfsdfs\n" + |
444 |
"Sdfsdf\n", rt[1].getText()); |
445 |
} |
446 |
|
415 |
} |
447 |
} |