So, I have a *very* preliminary patch to make AbiWord
use libgsf and libgoffice. It may eat your documents,
drink your milk straight from the carton, or use your
work computer to browse for pr0n, so please be
careful.
Libgsf is a useful library that abstracts out
filesystem calls. It does some useful bits like
providing the same interface for in-memory vs. on-disk
vs. remote vs. object stream (bonobo, istream, etc)
files. It also adds significant robustness behind the
scenes, like not overwriting your destination file
until saving is complete, ensuring that fread/fwrite
succeed, etc.
Goffice - I'm using ~4 helper functions that probably
belong in libgsf.
So, what does this patch do?
*) All of src/wp/impexp/xp/* and src/wp/impexp/unix/*
have been updated. This means that for all "builtin"
file and image formats, reading and writing still
(appears to) work. I've done some minimal testing on
all of them.
*) AbiWord can load and save remote files. I've only
tested HTTP and SFTP shares, but in theory, it's sound
and extensible.
I've tested this on the command line and from the file
dialog. AbiWord --to=file.rtf
http://foo.bar.com/file.doc should work, for instance.
That said, there are known bugs, limitiations, and
regressions, and the patch isn't the cleanest it could
be. These include (but are probably not limited to):
1) XML formats load the entire stream into memory,
which can consume a lot of RAM
2) The GTK+ file chooser is broken in several ways:
2.a) Image preview is broken
2.b) Sanity checking for directories vs. files is
broken
2.c) Sanity checking for overwriting pre-existing
files
3) HTML output, when writing separate images, CSS,
etc. is broken. This shouldn't be too bad to fix.
4) Haven't converted the plugins.
5) Haven't done enough testing to be comfortable with
anything.
6) Haven't converted MacOS or Win32, or integrated
things into their build systems. The OS-specific parts
that aren't build-system related should be minimal -
basically some hooks to convert the file dialog's path
into a URI.
7) Should probably use goffice's mime-type detection
rather than piggy-backing on our pre-existing stuff.
8) We probably fopen files too liberally, which may
lead to slowdowns
9) Did I introduce 100 memory leaks?
10) ...
I intend to continue working on this patch, and would
love assistance. I'll post a follow-up email to
discuss that.
Apply this patch against HEAD:
http://www.abisource.com/~dom/abi-gsf.patch
Put this into your ac-helpers directory:
http://www.abisource.com/~dom/abi-gsf.m4
Best,
Dom
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on Mon Feb 20 20:56:16 2006
This archive was generated by hypermail 2.1.8 : Mon Feb 20 2006 - 20:56:16 CET