Question

J'utilise OpenOffice SDK pour ppt ouvert et analyse syntaxique et PPTX; maintenant je peux ouvrir les fichiers ppt et formes d'extraction.

XShape xShape = (XShape) UnoRuntime.queryInterface(
    XShape.class, xShapes.getByIndex(j));
String type = xShape.getShapeType();

En utilisant le code ci-dessus, je peux obtenir le type de forme et rectangle, ellipse, etc., mais je reçois com.sun.star.drawing.CustomShape.

Y at-il un moyen d'obtenir le type de forme, comme rectangle, ellipse, etc.?

Était-ce utile?

La solution

La seule façon que je pouvais trouver est d'obtenir UINameSingular propriété

XPropertySet xShapeProperties = (XPropertySet) 
    UnoRuntime.queryInterface(XPropertySet.class, xShape);
String uiName = (String) xShapeProperties.getPropertyValue("UINameSingular");
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top