word rtf filter go in loop with a corrupted document

Costantino Giuliodori costantino.giuliodori at gmail.com
Thu Dec 27 10:23:36 GMT 2012


I am in the position of having to verify the correctness of a series of RTF
documents that have been handled by other procedures, so I looked to
calligra.

I noticed that when the document is corrupted due to the lack of
delimiter control
word or the closure of the group filter, the rtf word filter goes in loop
(attending that the , without indicating to the user that the document is
corrupt, unlike OpenOffice which indicates a generic "I / O error " or
Microsoft
word that is unable to read the file and suggests that it might be damaged.

An example of corrupted document can be found at the address
http://www.norme.marche.it/attiweb/ViewDoc.aspx?docnum=272075

Looking for the first time at Calligra sources seems that the problem is
that the Tokenizer::fetchToken in rtf-qt does not notify the end of the
stream, and that this condition is not handeld by the Reader::parseFile too.

I'm a newbie in qt and kde, so I would like to know what do you think and
what do you suggest to manage this behavior.

I wanted to thank you: for a complex project such as an office suite, looking
at the sources for the first time I have not been lost. I think it is a
good indicator of good design.

Great work!

-- 
Costantino Giuliodori
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20121227/bef31479/attachment.htm>


More information about the calligra-devel mailing list