Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/odk/examples/cpp/lokconvert/   (LibreOffice 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 <input_file_path> <output_file_path>\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 in Prozent
C=97 H=100 G=98

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-06-06) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.