On 09/05/14 22:27, Jonny wrote: > Hi, > > I am using some tools to generate odf-documents. In order to convert > them to pdf I'm using writer, but I need to run the function > tools->update->all for updating TOC. > > I thought that I would write a python script for doing this but I would > like to call the libraries directly and not via UNO. My script would > look something like: > > import libreoffice > > document = libreoffice.Writer('path/to/my/document.odt') > document.update('all') > document.save() > document.close() > > What I need is some guidance to in which libraries the functionallity > for open, update and save are located. I have been digging around in the > code without success. If someone has an idea it would save me a lot of time.
the problem is that that's all implemented in C++, but worry not, you can just use UNO to call the C++ code :) to do this first get the indexes from the document and then use the update method, as described here: https://wiki.openoffice.org/wiki/Documentation/DevGuide/Text/Indexes_and_Index_Marks _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice