[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Wannabe-developer requests some help;
From:       Werner Trobin <trobin () kde ! org>
Date:       2004-10-10 7:49:43
Message-ID: 200410100949.43599.trobin () kde ! org
[Download RAW message or body]

On Saturday 09 October 2004 14:15, HLV Kwint wrote:
> Hi, I'm Hans Kwint, living in the Netherlands, and new to this list.

Hi!

> I'd like to help KOffice, and I have thought out a practical task for myself 
> already, concerning KWord-filters (If you are not concerned at all with 
> KWord filters, I think you can skip this post). I'll explain in the next 
> paragraph:
>  
> Yesterday I read a discussion concerning the language of openoffice filters. 
> There was a 'problem', the filters converting the openoffice-format to the 
> MS-word format were documented in Deutsch (German), and poorly written (they 
> are a mess?) if some people in the discussion are right.

They are :-(
 
> It's a good idea to have some nice MS-filters, I think, since the rest of 
> the world isn't convinced they should stick to OASIS-formats (everybody 
> knows MS policies I think).
> So the thing I'd like to do, is (I'll begin small), get the source of those 
> openoffice-filters, and translate the German comments to English to start 
> with. After I translated the comments, maybe I know something about how the 
> filters are built up.

Well, I'm the developer of wv2 (the MS Word filter KOffice uses right now) and 
I'm from Austria, so the German comments are okay for me, but I still have 
problems to understand their code. I think it's partly because they use OOo 
terminology, partly because they directly convert the file to the internal 
representation (a lot of the central conversion steps are spread all over the 
codebase), and partly because the code is a bit strange.

> So, (I don't know in which programming language those filters are made up), 

C++, with a C-ish touch -- or the other way round, I don't know :-)

> maybe I can then try to to structurize them a bit (pretty amibious maybe, 
> but one has to have some ambitions I think).
> Hopefully, if I understand a bit of the thing, I can try to write a filter 
> for koffice based upon that openoffice filter. However, I don't know if we 
> can just use that filter without restrictions, but since openoffice is 
> open-source, I think it's better to use their filter instead of 'reinventing 
> the wheel'.

Directly using their filter doesn't seem to be possible without copying half 
of OOo's core and the text processing part. Starting yet another new 
filter... hmm, I'd like to invite you to have a look at the wv2 (note the 
"2", this is the C++ version) codebase 
(http://sourceforge.net/projects/wvware/) first. To understand how KOffice 
uses wv2 please also have a look at filters/kword/msword.

wv2 might not be the cleanest possible way to read MS Word files, but it 
should be easier to understand wv2 than the OOo filter. If you have questions 
about the code, please send private mail to me.

> After that, the most ambitious part, I'd like to help making a filter from 
> OASIS format to MS-word format. I think this is something KOffice users 
> defenitly want.

I strongly advice not to do that. Writing such a filter is a *lot* of work and 
you'll get an incredible amount of hard-to-find bugs due to Word 
inconsistencies between different versions. The "right" way to export files 
to MS Word is to use the Rich Text Format (RTF). The latest version of the 
RTF specification is 100% feature compatible to the .doc format, even MS Word 
itself uses RTF if you choose "Save as Word 6" or so.
 
> Now my problems:
> 1) I don't know how to get the openoffice filters, whith those German 
> comments. Off course, I could join an openoffice-mailing list too, or 
> install openoffice, but maybe an easier way is available? Does somebody have 
> contacts whith the openoffice developers?

They've got a read-only CVS access, please read 
http://sw.openoffice.org/servlets/ProjectSource#commandlinecvs

The filter is located in 
http://sw.openoffice.org/source/browse/sw/sw/source/filter/ww8/
i.e. the CVS directory is sw/sw/source/filter/ww8/

Ciao,
Werner
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic