Hello Fhomasp,
On Tuesday 17 March 2009, 07:50, Fhomasp wrote:
> Thanks, you've been most helpful.
>
> I do still have a problem with the createInstanceWithContext part.
> factory.createInstanceWithContext("com.sun.star.text.TextSection",component
>Context));
you're mixing things: a css.text.TextSection is to be instantiated at the
document factory, not at the global service manager.
So you're mixing the css.lang.XMultiServiceFactory (implemented by the
css.text.[Generic]TextDocument)
http://api.openoffice.org/docs/common/ref/com/sun/star/lang/XMultiServiceFactory.html
with the css.lang.XMultiComponentFactory
http://api.openoffice.org/docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html
Query css.lang.XMultiServiceFactory from your css.text.TextDocument, and then
invoke css.lang.XMultiServiceFactory.createInstance() which only takes an
string, no css.uno.XComponentContext
http://api.openoffice.org/docs/common/ref/com/sun/star/lang/XMultiServiceFactory.html#createInstance
> I think the problem might be related to the environment of the application.
no, the problem is that you started coding without even studying the basics
first.
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide
Regards
--
Ariel Constenla-Haile
La Plata, Argentina
"Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter."
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]