On 03/24/10 13:23, Andrea Chiumenti wrote:
try { XMultiServiceFactory xDocFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, xDoc); Object xMetafield = xDocFactory.createInstance("com.sun.star.text.textfield.MetadataField"); XText xMetafieldText = (XText)UnoRuntime.queryInterface(XText.class, xMetafield); xMetafieldText.setString(""); // clear the field: delete all content <--------------------------- LINE 110 XTextCursor xCursor = xMetafieldText.createTextCursor(); xMetafieldText.insertString(xCursor, "evviva", true);} catch (java.lang.Exception e) { e.printStackTrace(); } --->>>>>>> com.sun.star.uno.RuntimeException: at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method) at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:178) at $Proxy18.setString(Unknown Source) at it.wingstech.gam.Saver.dispatch(Saver.java:110) What is it ?
Looks like the (C++) implementation of service com.sun.star.text.textfield.MetadataField throws a com.sun.star.uno.RuntimeException (with an empty explanatory Message) when you call its setString method. (That is, it looks like the JNI UNO bridge just transports the exception back from the called side, rather than the JNI UNO bridge having internal problems and generating the exception itself.) Maybe some metadata domain expert can step in.
and is it correct that I'm not able to resolve com.sun.star.text.textfield.MetadataField from java ?
What do you mean by that? -Stephan --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
