1. 安装 Libreoffice
sudo apt install libreoffice
2. 安装 Libreoffice SDK
sudo apt install libreoffice-dev
3. 配置环境变量(临时)
cd /usr/lib/libreoffice/sdk
./setsdkenv_unix # 选择默认即可
4. 生成C++头文件
sudo ./bin/cppumaker -Gc -O "/usr/lib/libreoffice/sdk/include" "/usr/lib/libreoffice/program/types.rdb" "/usr/lib/libreoffice/program/types/offapi.rdb"