try {
page = pageService.getPresentationPage(i);
} catch (PresentationException e) {
continue;
}
IDrawPage drawPage = page.getDrawPage();
for (IShape shape : drawPage.getShapes()) {
XNamed xNamed = (XNamed) UnoRuntime.queryInterface(
XNamed.class, shape.getXShape());
String name = xNamed.getName();
if (!integrationID.equals(name))
continue;
IShapeFactory shapeFactory = drawPage.getShapeFactory();
ITextShape textShape = shapeFactory.createTextShape(1, 1,
undoString);
replaceShape(shape, textShape);
steps += 2;
}