Here is the code i used for slides 1,4,5,7. The basicly same thing happens also on the slides 9 and 10, (slides that have a table). You can see the screen shots.
slide1.JPG (97.5 KB)
Slide4.JPG (84.0 KB)
Slide7.JPG (120.6 KB)
Slide5.JPG (86.8 KB)
code :
@Test
public void slide1() {
String path = "_TBK_2014.ppt";
Presentation presentation = new Presentation(path);
ISlideCollection slides = presentation.getSlides();
ISlide slide = slides.get_Item(0);
IShapeCollection shapes = slide.getShapes();
AutoShape autoShape = (AutoShape) shapes.get_Item(1);
IParagraph paragraph = autoShape.getTextFrame().getParagraphs().get_Item(0);
IPortion portion = paragraph.getPortions().get_Item(0);
System.out.println(portion.getText());
assertEquals(
"Регионална здравна инспекция Враца осъществява държавната здравна политика на територията на област Враца и държавен здравен контрол за спазване на изискванията за защита на лицата от въздействието на йонизиращи лъчения на територията на следните области: Враца, Видин, Монтана, Плевен и Ловеч",
portion.getText());
IPortionFormatEffectiveData portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(255, 255, 204), portionFormatEffective.getFillFormat().getSolidFillColor());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
}
@Test
public void slide4() {
String path = "_TBK_2014.ppt";
Presentation presentation = new Presentation(path);
ISlideCollection slides = presentation.getSlides();
ISlide slide = slides.get_Item(3);
IShapeCollection shapes = slide.getShapes();
Table table = (Table) shapes.get_Item(2);
ICell cell = table.get_Item(0, 0);
IParagraph paragraph = cell.getTextFrame().getParagraphs().get_Item(1);
IPortion portion = paragraph.getPortions().get_Item(0);
assertEquals("Област", portion.getText());
IPortionFormatEffectiveData portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertEquals(28, portionFormatEffective.getFontHeight(), 0);
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
cell = table.get_Item(1, 0);
paragraph = cell.getTextFrame().getParagraphs().get_Item(1);
portion = paragraph.getPortions().get_Item(0);
assertEquals("Година", portion.getText());
portionFormatEffective = portion.createPortionFormatEffective();
portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertEquals(28, portionFormatEffective.getFontHeight(), 0);
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
}
@Test
public void slide5() {
String path = "_TBK_2014.ppt";
Presentation presentation = new Presentation(path);
ISlideCollection slides = presentation.getSlides();
ISlide slide = slides.get_Item(4);
IShapeCollection shapes = slide.getShapes();
Table table = (Table) shapes.get_Item(2);
ICell cell = table.get_Item(0, 0);
IParagraph paragraph = cell.getTextFrame().getParagraphs().get_Item(1);
IPortion portion = paragraph.getPortions().get_Item(0);
assertEquals("Област", portion.getText());
IPortionFormatEffectiveData portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
cell = table.get_Item(1, 0);
paragraph = cell.getTextFrame().getParagraphs().get_Item(1);
portion = paragraph.getPortions().get_Item(0);
assertEquals("Година", portion.getText());
portionFormatEffective = portion.createPortionFormatEffective();
portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
}
@Test
public void slide7() {
String path = "_TBK_2014.ppt";
Presentation presentation = new Presentation(path);
ISlideCollection slides = presentation.getSlides();
ISlide slide = slides.get_Item(6);
IShapeCollection shapes = slide.getShapes();
Table table = (Table) shapes.get_Item(1);
ICell cell = table.get_Item(0, 0);
IParagraph paragraph = cell.getTextFrame().getParagraphs().get_Item(2);
IPortion portion = paragraph.getPortions().get_Item(0);
assertEquals("Област", portion.getText());
IPortionFormatEffectiveData portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234),
portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana",
portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
paragraph = cell.getTextFrame().getParagraphs().get_Item(3);
portion = paragraph.getPortions().get_Item(0);
assertEquals("Враца", portion.getText());
portionFormatEffective = portion.createPortionFormatEffective();
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
cell = table.get_Item(0, 1);
paragraph = cell.getTextFrame().getParagraphs().get_Item(0);
portion = paragraph.getPortions().get_Item(0);
assertEquals("1.Бел.ТБК", portion.getText());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
paragraph = cell.getTextFrame().getParagraphs().get_Item(3);
portion = paragraph.getPortions().get_Item(0);
assertEquals("2.Извън бел.ТБК", portion.getText());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
paragraph = cell.getTextFrame().getParagraphs().get_Item(5);
portion = paragraph.getPortions().get_Item(0);
assertEquals("3.Акт.ТБК-всичко", portion.getText());
assertEquals(new Color(234, 234, 234), portionFormatEffective.getFillFormat().getSolidFillColor());
assertEquals("Verdana", portionFormatEffective.getLatinFont().getFontName());
assertNotNull(portionFormatEffective.getEffectFormat().getOuterShadowEffect());
}
Note: All assertion fail but it should not.
I used slides 18.6