如何使用KDE的RTF导出功能?
在 stackoverflow.com 我发现一个问题,用户建议使用 this KDE 库,以便导出/导入 RTF 文件。但是,当我下载时,我发现 .cc 和 .h 文件中包含的许多文件丢失了。因此,请提示如何下载所有必要的文件,是否有任何指南提供并举例说明如何使用 RTF 导出示例(或说明)?
顺便说一句,如果您曾经以更好的方式以编程方式完成 RTF 导出,请告诉我如何做到这一点。
In stackoverflow.com I have found a question where a user was suggesting to use this libraries of KDE in order to export-inport RTF files. But, when I downloaded I saw that there are lot of files that are included in the .cc and .h files that are missing. So please give a hint how to download all necessary files and is there any guide that gives and example how to use the RTF exporting example(or instructions)?
BTW if you have ever done RTF exporting programmatically in a better way, please tell me how I can do that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,正如您提到的,该代码是 KDE 项目的一部分。它的代码库非常大,因此在最坏的情况下您必须提供大部分 kdebase-dev。以下链接包含从 SVN 构建 KWord 的教程,它将引入您需要的所有依赖项(然后您可以开始删除它们,因为您发现它们不相关):
http://wiki.koffice.org/index.php?title=Build_KOffice
浏览源代码,我注意到一些事情。
编辑:例如,看起来您可能可以从 ExportFilter.cc 中提取大部分算法,并根据您的需要进行修改。看起来大部分工作是通过 QString 而不是 KDE 方法完成的。
First off, as you mention, that code is part of the KDE project. Its code base is very large, so in the worst case you'd have to provide most of kdebase-dev. The following link contains a tutorial for building KWord from SVN, which will pull in all the dependencies you need (then you can start deleting them as you find they aren't relevant):
http://wiki.koffice.org/index.php?title=Build_KOffice
Browsing the sources, I note a few things.
#include
s pretty much just reference QObjects, so be sure that Qt is installed.edit: Looks like you could probably pull much of the algorithm from ExportFilter.cc, for example, and modify it to your needs. Looks like much of the work is being done via QString rather than KDE methonds.