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

List:       koffice-devel
Subject:    Re: KWord's ASCII import filter
From:       Nicolas Goutte <nicog () snafu ! de>
Date:       2001-12-05 21:36:55
[Download RAW message or body]

On Wednesday 05 December 2001 11:59, Clarence Dang wrote:
> Hi Nicolas!
>
> I'm actually quite surprised by the quality of ASCII filters (import and
> export).
> They are marked as "good" but they have a few problems.  This is

At the begin of the status rating, all working filters were marked as "good". 
The ratings for the ASCII filters were never changed, as there was never a 
maintainer for them (and there is still nobody.)

> probably because the ASCII import and export filters are written by
> completely different people...
> It would be good if someone who had worked on one of the ASCII filters,
> worked on the other one so that users can finally import an ASCII
> document and export it back out, without changing its contents.
> Hence, I'm pleased to see that you want to work on the import filter,
> being the author of the export filter.

Thank you!

>
> I've haven't experienced any of the problems you describe (except with
> carriage returns).

Well, you have. ;-) You have hit the "a paragraph ends with an empty line" 
rule with your example.

> But instead, have found other problems: I imported kwordin.txt
> (attached) and it did it incorrectly as described in the file.  Upon
> exporting (using KOffice 1.1), I got kwordout.txt, which almost doesn't
> even resemble kwordin.txt.  Please fix these problems (no, I'm not
> volunteering :)).

In general, the problem is that the filter tries to be smart. But it is smart 
only in one way, so it fails on most text files that I have tested. I know of 
no way how it could be smart enough to read all text files correctly. It is 
therefore that I plan a dialog so the user can help the filter. 

The first part of your example (up to the empty line) is exactly the problem 
of the rule that a paragraph ends with an empty line. Therefore the whole 
first block is treated as one paragraph.

As for the second block, I suppose that the filter found that it was a list. 
However, the default list for KWord is without bullet.

Anyway, for now, the list detection of the ASCII filter is disabled.

And yes, empty lines are added nearly everywhere. It is planned to replace 
these (by the layout option of space after the paragraph.)

>
> Thankyou!
> Clarence
>
> On 2/12/2001, Nicolas Goutte wrote:
> > I have looked at the code of KWord's ASCII import filter and found that
> > it could be improved a little. If nobody is working on this, I will do it
> > slowly.
> >
> > A few problems, I have found:
> > - Carriage Returns are not recognised (but the export filter can generate
> > them on demand of the user.)
> > - only locale encoding (the export filter can also do UTF-8)
> > - a paragraph ends with an empty line (however, the export filter uses a
> > line per paragraph)
> > - use of static arrays despite QT offering dynamic arrays
> >
>> (...)
> >
> > At first, I would like to add a dialog for the encoding and the strategy
> > to end a paragraph. However, there is a new problem. Will users accept
> > that they have a dialog each time that they click on a text file in
> > Konqueror?
> >
>> (...)
> >
> > Have a nice day/evening/night!
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://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