首页 文章

LibreOffice C API缺少标头

提问于
浏览
1

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

#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吗?

1 回答

  • 1

    我找到了答案 . 必须使用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
    

相关问题