Hi,

Stephan Wunderlich wrote:
Hi Christian,

i have an error on using the code, that i found on the mailing list, about the insert of page number:
I have a Class Cast Exception when i declare


XText xText=(XText) xPropertySetStyle.getPropertyValue("FooterText");

Can anyone help me?


A "simple" cast won't work here, you'll have to "query" the desired Interface.

XText xText = (XText) UnoRuntime.queryInterface(XText.class, xPropertySetStyle.getPropertyValue("FooterText"));

just to make it clear, getPropertyValue returns an Any and only the fact that you can use the any directly in queryInterface allows this construct in Java. In other languages you have to extract the value from the any first.


- Juergen


should do what you want.

Hope that helps

Regards

Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to