1

Topic: How to preempt the data in LibreOffice *.ods

It is necessary from the program on a C ++/QT to preempt the data in a file with tables LibreOffice. There is a fish (template) in whom on several sheets preparations of tables - the document title are labeled, any signatures-statements, a table cap. From the program which considers, it is necessary in the tables allocated on different sheets, to interpose a line and to fill with their data.
Downloaded SDK for LibreOffice, looked there at examples for a C ++ - at all did not understand that they there do and what for. The documentation - the same, a side view, there descriptions of any left classes and absolutely the abstract data types. It seems that this SDK works somehow absolutely differently.
Looked at a forum - there is a pair of examples, but they are based on usage OLE, it is necessary to me, that all it was twisted under Linux.
Colleagues, direct - how this SDK to use?

2

Re: How to preempt the data in LibreOffice *.ods

gamych;
Is old 2007. The closed project on With ++ Pineapple , source codes on sf.net .
Developers of pineapple suggested to do a report template *.ods with the interposed keywords.
The order following:
You unpack a template as ZIP archive.
You steam out XML.
You replace keywords with tabular data.
You pack XML in ZIP archive.
You open in LibreOffice
The key file see aootemplate.cpp
There are nuances of implementation if I will interesting tell further...

3

Re: How to preempt the data in LibreOffice *.ods

sereginseregin, thanks are finite, but somehow it  looks. Is specially for this purpose SDK, what for in files to climb?
I  , in SDK on a C ++ indeed am not enough examples, but it is a lot of examples on Java. Them it is necessary to look, they through the same interfaces work, as  so to understand, as in what sequence to do, it is possible and on  for examples. And further already a trick.

4

Re: How to preempt the data in LibreOffice *.ods

gamych wrote:

Is specially for this purpose SDK, what for in files to climb?

There is a standard of the description of interiors OpenDocument, there normal XML, for this purpose and is made, that  a file independently.
Labor input of operation with xml or sdk will be identical. But for xml full ready standard libraries though as the text, directly work, and sdk in the project  it is necessary, still questions on  and additional adjustment at the user.
We and standard OpenDocument especially did not use, only in absolutely difficult cases assorted. And so climbed in ods directly, looked as our tags in XML were saved, further the code of generation upon . Any binding to Open-Libre-Microsoft to office. That at the user costs, that it and opens the report.

5

Re: How to preempt the data in LibreOffice *.ods

sereginseregin wrote:

Labour input of operation with xml or sdk will be identical.

Strongly I doubt. To a mine already surrenders that through SDK is easier and, the main thing, is more evident the code, than directly XML . Still it is fine on , JAXB strongly simplifies, but on pluses to form immediately document, looking constantly in the circuit... .
Then of this code on anybody you will not get rid for attending.
More shortly, solved and I do through SDK. Forgive, if did not justify waitings smile

6

Re: How to preempt the data in LibreOffice *.ods

gamych wrote:

it is passed...
Strongly I doubt. To a mine already surrenders that through SDK is easier and, the main thing, is more evident the code, than directly XML .

I did not say that each report it is necessary in XML to look.
Just here the is necessary sdk - some data sets, this function itself on a template the data scatter enough one universal function in which you transfer file name with a template. Rivet to itself such reports without reflecting at all about XML.
In Aananase on With ++ similar function is already implemented, take their implementation as ready sdk. E a current some nuances with standard OpenDocument which probably  it is necessary.
...
Solves everyone certainly!