Hi,
I’m getting incorrect values for gradient direction of text outline effect.
Here’s the test:
String path = "outlineEffect.pptx";
Presentation presentation = null;
try {
presentation = new Presentation(path);
ISlide slide = presentation.getSlides().get_Item(0);
IShapeCollection shapes = slide.getShapes();
IAutoShape shape = (IAutoShape) shapes.get_Item(0);
IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(2);
IPortionCollection portions = paragraph.getPortions();
IPortion portion = portions.get_Item(0);
assertEquals("text ", portion.getText()); //$NON-NLS-1$
portion = portions.get_Item(1);
ILineFormatEffectiveData lineFormat = portion.createPortionFormatEffective().getLineFormat();
ILineFillFormatEffectiveData fillformat = lineFormat.getFillFormat();
assertEquals(FillType.Gradient, fillformat.getFillType());
assertEquals("Gradient ", portion.getText()); //$NON-NLS-1$
IGradientFormatEffectiveData gradientFormat = lineFormat.getFillFormat().getGradientFormat();
// Gradient direction is From Bottom Left Corner
assertEquals(GradientDirection.FromCorner3, gradientFormat.getGradientDirection());
portion = portions.get_Item(2);
lineFormat = portion.createPortionFormatEffective().getLineFormat();
fillformat = lineFormat.getFillFormat();
assertEquals(FillType.Gradient, fillformat.getFillType());
assertEquals("radial", portion.getText()); //$NON-NLS-1$
gradientFormat = lineFormat.getFillFormat().getGradientFormat();
assertEquals(GradientShape.Radial, gradientFormat.getGradientShape());
// Gradient direction is From Bottom Left Corner
assertEquals(GradientDirection.FromCorner3, gradientFormat.getGradientDirection());
paragraph = shape.getTextFrame().getParagraphs().get_Item(4);
portions = paragraph.getPortions();
portion = portions.get_Item(0);
lineFormat = portion.createPortionFormatEffective().getLineFormat();
fillformat = lineFormat.getFillFormat();
assertEquals(FillType.Gradient, fillformat.getFillType());
assertEquals("Gradient rectangular", portion.getText()); //$NON-NLS-1$
gradientFormat = lineFormat.getFillFormat().getGradientFormat();
assertEquals(GradientShape.Rectangle, gradientFormat.getGradientShape());
// Gradient direction is From Top Right Corner
assertEquals(GradientDirection.FromCorner2, gradientFormat.getGradientDirection());
} finally {
if (presentation != null) {
presentation.dispose();
}
}
Can you check this?
Thanks,
Zeljko
outlineEffect.zip (25.7 KB)