views:

32

answers:

1

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.

+1  A: 

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.

  • The #includes pretty much just reference QObjects, so be sure that Qt is installed.
  • The RTF classes you're looking for seem to subclass KDE objects. This means you may have to go through significant work to separate the base code from KDE if you can't have KDE as a dependency for your project.

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.

Willi Ballenthin