Hi. I have a problem with updating my toc. I have a template-file which i
fill with chapters. In this template there is a toc included. Now after
filling the document i want to update the toc. Therefore i tried following
code:

192     private void refreshIndex() throws Exception
193     {
194             XMultiServiceFactory xMSF =
(XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class,
this.ooDoc);
195             Object oContentIndex =
xMSF.createInstance("com.sun.star.text.ContentIndex");
196             XDocumentIndex xDocIndex =
(XDocumentIndex)UnoRuntime.queryInterface(XDocumentIndex.class,
oContentIndex);
197             xDocIndex.update();
198     }

I got the following Exception:

Exception in thread "main" com.sun.star.uno.RuntimeException: 
        at
com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:187)
        at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:153)
        at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:349)
        at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:318)
        at
com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:106)
        at
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:657)
        at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:159)
        at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:141)
        at $Proxy30.update(Unknown Source)
        at org.saxsys.excelchecker.DOCWriter.refreshIndex(DOCWriter.java:197)
        at org.saxsys.excelchecker.DOCWriter.createDocument(DOCWriter.java:93)
        at org.saxsys.excelchecker.Main.<init>(Main.java:93)
        at org.saxsys.excelchecker.Main.main(Main.java:23)

What's the problem with it? 

Hardie
-- 
View this message in context: 
http://www.nabble.com/automatic-chapter-numbering-tp19546775p20090891.html
Sent from the openoffice - api dev mailing list archive at Nabble.com.


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

Reply via email to