Ariel Constenla-Haile wrote:
> 
> Hello Fhomasp,
> 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
> 

I did try the XMultiServiceFactory first.  However I didn't query it from
the TextDocument.  I used a global variable which got instantiated earlier. 
So thanks, now it works like a charm.


Ariel Constenla-Haile wrote:
> 
> 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
> 

Obviously that has a lot to do with it.  However I just needed to alter the
menubar and merge documents, which works now, thanks to this thread.  Most
of the Objects in the classes are globals and were already instantiated
earlier, which didn't require me to study the whole OOo thoroughly.
When I get the time to do so I will.

Thanks ;-)

-- 
View this message in context: 
http://www.nabble.com/Sections-and-appending-documents-tp22312435p22578997.html
Sent from the openoffice - dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to