gpt4 book ai didi

c++ - LibreOffice C++ API 缺少 header

转载 作者:太空宇宙 更新时间:2023-11-04 11:30:14 32 4
gpt4 key购买 nike

我目前正在尝试在 headless 模式下使用 LibreOffice 将文档转换为 pdf。我想使用 LibreOffice C++ API 来完成这项工作,但我的问题是我找不到 LibreOffice C++ 示例中使用的一些 header 。

#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>

我使用的是 Ubuntu 14.04 并安装了 libreoffice-dev 包。

有人可以向我解释如何正确使用 LibreOffice C++ API 吗?

最佳答案

我找到了答案。这些文件必须使用 cppumaker 工具(随 SDK 提供)从 IDL 文件生成。从包含 cppumaker 的文件夹中,我以 root 身份运行了这个命令。

./cppumaker -Gc -O"/usr/include/libreoffice/com/sun/star" /usr/lib/ure/share/misc/types.rdb /usr/lib/libreoffice/program/types/offapi.rdb /usr/lib/libreoffice/program/types/oovbaapi.rdb

关于c++ - LibreOffice C++ API 缺少 header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25056127/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com