Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/odk/examples/cpp/lokconvert/   (Office von Apache Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 1 kB image not shown  

Quelle  lokconvert.cxx   Sprache: C

 
#include <iostream>
#include "LibreOfficeKit/LibreOfficeKit.hxx"

int main(int argc, char* argv[])
{
    if (argc < 3)
    {
        std::cout << "Usage: lokconvert \n";
        return 1;
    }
    const char* input = argv[1];
    const char* output = argv[2];

    lok::Office* llo = NULL;
    try
    {
        const char* lo_bin_dir = std::getenv("OO_SDK_URE_BIN_DIR");
        llo = lok::lok_cpp_init(lo_bin_dir);
        if (!llo)
        {
            std::cerr << "Error: could not initialise LibreOfficeKit\n";
            return 1;
        }

        lok::Document* lodoc = llo->documentLoad(input, NULL /* options */);
        if (!lodoc)
        {
            std::cerr << "Error: could not load document: " << llo->getError() << "\n";
            return 1;
        }

        if (!lodoc->saveAs(output, "pdf", NULL /* options */))
        {
            std::cerr << "Error: could not export document: " << llo->getError() << "\n";
            return 1;
        }
    }
    catch (const std::exception& e)
    {
        std::cerr << "Error: LibreOfficeKit exception: " << e.what() << "\n";
        return 1;
    }

    std::cerr << "Success!\n";
    return 0;
}

Messung V0.5
C=93 H=96 G=94

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.