Re: frt - r27479 - abiword/trunk/plugins/openxml/imp/xp

From: Firat Kiyak <firatkiyak_at_gmail.com>
Date: Sun Aug 02 2009 - 22:42:48 CEST

Hi Kamran,

I agree on that we should still try to import the broken file and let
the user know that the file is broken. I think this is the default
behavior on Word 2007 as well. I still think that having a fully
implemented validity checker will be useful for importer and later for
exporter as well, so here is what I will do:

1. Implement validity checker in full, but relax it so that we still
accept the broken documents
2. Instead of rejecting broken files, I will generate warning messages for users
3. We should link the OpenXML importer to the UI so that warning
messages propagate to users.
4. I need to improve the defense in the OpenXML importer and make sure
we don't have any assumptions about the input file leading to crashes
or bad things.

By implementing a strict validity checker, I was planning to avoid
step 4, but I think we will need it. Thanks,

Firat

On Sun, Aug 2, 2009 at 12:49 AM, sum1abi@gmail.com <sum1abi@gmail.com> wrote:
>
> On Sun, Aug 2, 2009 at 2:54 AM, <cvs@abisource.com> wrote:
> >
> > Author: frt
> > Date: 2009-08-02 08:54:03 +0200 (Sun, 02 Aug 2009)
> > New Revision: 27479
> >
> > Modified:
> >   abiword/trunk/plugins/openxml/imp/xp/OXMLi_ListenerState_Valid.cpp
> >   abiword/trunk/plugins/openxml/imp/xp/OXMLi_ListenerState_Valid.h
> >   abiword/trunk/plugins/openxml/imp/xp/OXMLi_StreamListener.cpp
> >   abiword/trunk/plugins/openxml/imp/xp/OXMLi_Types.h
> > Log:
> > OpenXML importer added checks for some valid keywords (main document story, paragraphs)
> >
>
> Hi Firat,
>
> I'm not sure this sort of validation is a good idea for (at least) two reasons:
>
> - AbiWord has been producing invalid files for a while (Bug 12180).
> If you only accept invalid input, you're going to break compatibility
> with old files.
>
> - Office programs should handle a wide variety of input.  It doesn't
> serve the needs of users to reject technically invalid documents that
> could be imported otherwise.  In fact, a lot of work has been done
> during 2.7.x to make AbiWord accept broken files.
>
>
> I don't think the importer should _require_ strict validity.  Instead,
> the code would probably be most helpful as a means of warning users of
> broken files (and accepting them regardless), and also as a way to
> help developers validate files that AbiWord produces.  Beyond that, I
> see it causing more problems than it solves.
Received on Sun Aug 2 22:43:14 2009

This archive was generated by hypermail 2.1.8 : Sun Aug 02 2009 - 22:43:14 CEST