Hello,
for a Java developer there is no chance to implement XUnoTunnel in a
working way. The interface returns a handle on the actual implementation
object (in C++) which is then used to call non-API functions.
Couldn't you just insert a normal text field and feed that from your
outside source?
Regards, Steffen
[email protected] wrote:
Ok, thanks for your reply. So lets be more precise...
I'm trying to develop my first extension.
This extension should providing a text field (similar to what does
com.sun.star.text.textfield.User) but provides data from an outside source.
I provide new services for some objets and try to insert them into a text
document.
My extension provides a service (lets call it MyFunnyTextField). The
implementation object implements the com.sun.star.text.XTextField,
com.sun.star.util.XUpdatable, com.sun.star.text.XDependentTextField interfaces
(although I'm not quite sure if I need all of these) and supports the
com.sun.star.text.TextContent service. I can create it by using the general
service factory (it does not work with the text document factory, I don't know
why and also don't know how to register in it, but that's another issue).
Unfortunately, I get this error: object does not implement XUnoTunnel.
Once the object implementing MyFunnyTextField is created, I get the Text of the document and
"insertTextContent" my newly created object. I get an exception with the message
"object does not implement XUnoTunnel". I looked at the dev guide and tried to implement
this interface, but as I develop in Java, I could not figure out how to do it.
As this interface seems to be a kind to not-so-nice tricky thing, is there any
workaround?
As it is said in the dev guide: "Using this interface is a result of an
unsatisfactory interface design, because it indicates that some functionality only works
when non-UNO functions are used. In general, these objects cannot be replaced by a
different implementation, because they undermine the general UNO interface concept."
So my question is: should I continue trying to provide an implementation of
XUnoTunnel, should I rework the OpenOffice source code to get rid of XUnoTunnel
(which I'm not sure to be feasible) or should I better give up now?
Hope it helps understanding my issue.
Christophe
__________________________________________________________________________________________________
Ne pleurez pas si votre Webmail ferme ! Récupérez votre historique sur Yahoo!
Mail ! http://fr.docs.yahoo.com/mail/transfert_mails.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Steffen Grund <[email protected]> Sun Microsystems
Software Engineer - StarOffice Nagelsweg 55
Phone: +49 40 23646 647 D-20097 Hamburg
Fax: +49 40 23646 550 http://www.sun.com/staroffice
-----------------------------------------------------------------------
Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1,
D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]