On 02/10/14 10:21, Semen Gubarev wrote: > Hello, > I trying to create simple executable application for connect to OpenOffice > 4.1.1 and create table in writer. > I successfully create connection with OpenOffice and do some work (like > insert texts), but I can't create a table. > I have a problem with creation "com.sun.star.text.XTextTable" interface > > some example of cpp code: > Reference< XMultiServiceFactory > xMutiServiceFactory = > ooConnect("uno:socket,host=localhost,port=2002;urp; > StarOffice.ServiceManager"); > > Reference< XInterface > _xInterface = xMutiServiceFactory-> > createInstance(OUString::createFromAscii("com.sun.star.text.XTextTable")); > if (!_xInterface.is()) { //here I always get false! (also I > tring to get "com.sun.star.text.TextTable" the same truble > return 0; > } > > what can be wrong? >
Do you know the Developers Guide? I recommend the DevGuide [1] as reference and to get some basic knowledge about the API. You can also check the SDK and the samples in the SDK. There exist Java samples that insert a table in a text document. The problem here is that some services are only available in the context of a text document and that a text document have it own service factory. The easiest way is to check the samples in the SDK. Juergen [1] https://wiki.openoffice.org/wiki/Documentation/DevGuide --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org