Hi Stephan,
> As far as I know it isn't possible to set a hyperlink for a text inside
> a shape.
> This doesn't seem to work via UI so it is unlikely that it would work
> via API :-)
Maybe I should explain more what I am trying to do. I have an impress
document and have added a com.sun.star.drawing.TextShape to it (This is
the "xShape" in my example). Within the text of that shape, I would like
to create a hyperlink. From the UI, when I am in a text box in
OpenOffice.org, it looks like I can choose "Insert -> Hyperlink". So it
seems that I should be able to do this in the code as well. Am I taking
the wrong approach?
Here is a little more context for my sample code:
XMultiServiceFactory xFactory =
(XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class,
xDrawDoc);
Object xObj = xFactory.createInstance("com.sun.star.drawing.TextShape");
xShape = (XShape)UnoRuntime.queryInterface(XShape.class, xObj);
XText xText = (XText)UnoRuntime.queryInterface(XText.class, xShape);
XTextCursor xTextCursor = xText.createTextCursor();
XPropertySet propCursor = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
propCursor.setPropertyValue("HyperLinkURL", "http://www.openoffice.org");
Thanks,
Ann
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]