Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Detlef Hüttemann wrote:
Is the only way to do it the -headless approach? Or can I use some
software components as a library in my own application?

Hi Detlef,

so perhaps the LibreOfficeKit approach would suit your usecase - it's
a reasonably smallish C/C++ API around a fully headless LibreOffice,
currently used in some document viewers, and also for LibreOffice
Online.

It already provides functions to initialize, load, and process
documents - adding another callback under the LOK_USE_UNSTABLE_API
section in include/LibreOfficeKit/LibreOfficeKit.hxx shouldn't be too
hard, see e.g. commit 1a74c6333a79ccf0579b33ebc42ce2ccc23ccadb for a
smallish example of how to get something out of the LibreOffice core.

Example code how to retrieve a cell's value:

in sc/qa/unit/functions_test.cxx, the FunctionsTest::load() -

* DoHardRecalc()
* GetDocument().GetValue(col,row,sheet,out_val)

For something enterprise-ready, you'd probably want to run LibreOffice
in a separate process or something, to keep it at arm's length from
your webserver & php interpreter.

HTH,

-- Thorsten

Attachment: signature.asc
Description: Digital signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.