RFC: ideas for a simple OpenDocument API

Kevin Krammer kevin.krammer at gmx.at
Fri Dec 22 20:16:54 GMT 2006


Hi folks,

I'd like to get some comments on an idea that keeps popping up in my head:

having a (very) simple API for creating basic documents and retrieving some 
information from documents.

Simple in the sense that a developer should not have to know about format 
internals. The API can be limited to a subset of features the format would be 
capable off, e.g. creation of a spread sheet document could just support 
tables with simple cell types, not support cell borders, etc

Simple also in the sense that it does not have to be roundtrip capable, i.e. 
reading and writing the document might loose more advanced stuff

Simple also in the sense of convenience functions (warning, pseudo code 
ahead):

ODF::SpreadSheet ODF::SpreadSheet::fromQTableModel(QAbtractTableModel* model)

QDF::TextDocument ODF::TextDocument::fromQTextDocument(QTextDocument* 
document)

or the other way around

QTextDocument* ODF::TextDocument::toQTextDocument()

Use cases:

- Use import from/export to spreadsheet additionally to CSV

- Copy&Paste selections from KatePart *including* syntax highlighting

- Copy&Paste from browser when selection contains formatting/colors

- Copy&Paste from browser when selections contains tables

- Copy&Paste from browser when selection contains images

- Dumping all meta data of a selection of files into a list of tables

- Creating presentation slide show from a selection of image files

More or less having it available for Import/Export, Drag&Drop, Copy&Paste 
whenever applicable.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20061222/a7736ece/attachment.sig>


More information about the kde-core-devel mailing list