Hi,
i have problem with embedded object. I'm using XTextEmbeddedObjectsSupplier in
writter document, to get access to this object. This object give me a list of
all embedded elements in document. Property "Model" should give me a XComponent
object, but sometimes it's null value. Does anybody know why ??
My code:
XTextEmbeddedObjectsSupplier xEmbeddedObjectsSupplier =
(XTextEmbeddedObjectsSupplier) UnoRuntime
.queryInterface(XTextEmbeddedObjectsSupplier.class,
xTextDocument);
String[] names = xEmbeddedObjectsSupplier.getEmbeddedObjects()
.getElementNames();
for (int i = 0; i < names.length; i++) {
Object o = xEmbeddedObjectsSupplier.getEmbeddedObjects()
.getByName(names[i]);
XPropertySet xPropSet = (XPropertySet) UnoRuntime
.queryInterface(XPropertySet.class, o);
XComponent XComponent = (XComponent) UnoRuntime
.queryInterface(XComponent.class, xPropSet
.getPropertyValue("Model"));
}
I think, the problem is with documents created under Ms Office.How to solve it??
----------------------------------------------------------------------
Graj za darmo! Wejdz do swiata wojny wampirow!
Kliknij >>> http://link.interia.pl/f1c8a
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]