[Libreoffice] SDK LibreOffice How to get document as object?
Michael Stahl
mstahl at redhat.com
Mon Nov 14 05:38:30 PST 2011
On 08/11/11 20:53, Clemens A. Schulz wrote:
> Hi Michael,
>
>> On Tue, 2011-11-08 at 15:55 +0100, webmaster at csz-online.de wrote:
>>> I'm currently working on some data format exportation tests with the
>>> LibreOffice SDK and Java. I want to develop an addon, which can export
>>> the current opened file in another dataformat.
>>
>> Sounds fun :-) if it is a generally useful one, I'd strongly recommend
>> doing it as native C++ in the core - it'll be very substantially faster,
>> and of course we can then ship it with the core product.
>
> I do not want to write this dataformat to just one file. So perhaps
> these filters won't do it. In my case these scenarios are more applicable:
>
> * One opened text document should be stored into several files
> (different information in different files).
> * One opened text document should be stored to another place than a
> local file (raw-data upload on a server, stored into some other
> dataformat encapsulated or even stored in a database).
>
> Hope this will help you to better understand my requirements. I even do
> not know if it IS possible or not? Perhaps there is no interface for
> this kind of data-processing.
the main thing that implementing and registering an ExportFilter gives
you is that the user can select it in the File->Save dialog.
if you don't need that, then i guess it should be sufficient to just
iterate over the document with the UNO API and serialize that however
you need, and put whatever UI suits you on top of that.
this could be helpful:
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Text/Iterating_over_Text
More information about the LibreOffice
mailing list