Commit (STABLE): Re: commit: New method to repair importer mistakes.

From: J.M. Maurer <j.m.maurer_at_student.utwente.nl>
Date: Tue Mar 01 2005 - 01:17:26 CET

Backported, except the fv_View change.

Marc

Backport: Fix horrible regression on document import. (martin)

CVS:
----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: Tag: ABI-2-2-0-STABLE
CVS: ./src/text/ptbl/xp/pd_Document.cpp
CVS: ./src/text/ptbl/xp/pd_Document.h
CVS:
----------------------------------------------------------------------

Op ma, 28-02-2005 te 11:31 +1100, schreef
msevior@physics.unimelb.edu.au:
>>
>>>
>>> Martin,
>>>
>>> the new function prevents us to import quite a lot Word documents.
>>> See e.g. bugzilla #8474.
>>> We add lots of bogus empty blocks <p></p> now, e.g. in a table between
>>> the cells.
>>> You can easily see this by running abiword -t abw 8474.doc
>>> and inspection of the resulting abw file.
>>>
>>> As this is a major regression in 2.2.4, maybe we should back this
>>> out.
>>>
>>
>> HI Robert,
>> Thanks very much for working this. I will fix it right away.
>>
>> Martin
>>
>
>CVS: ----------------------------------------------------------------------
>CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
>CVS:
>CVS: Committing in .
>CVS:
>CVS: Modified Files:
>CVS: src/text/fmt/xp/fv_View.cpp src/text/ptbl/xp/pd_Document.cpp
>CVS: src/text/ptbl/xp/pd_Document.h
>CVS: ----------------------------------------------------------------------
>Fix horrible regression on document import.
>
>
>This should be backported as soon it tests OK. I'll do it myslef by this
>evening.
>
>Sorry.
>
>Martin
>
>
>
>
>>> Best regards,
>>>
>>> Robert
>>>
>>> On Wed, 2005-02-09 at 00:47, msevior@physics.unimelb.edu.au wrote:
>>>> CVS:
>>>> ----------------------------------------------------------------------
>>>> CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
>>>> CVS:
>>>> CVS: Committing in .
>>>> CVS:
>>>> CVS: Modified Files:
>>>> CVS: src/text/ptbl/xp/pd_Document.cpp
>>>> CVS: src/text/ptbl/xp/pd_Document.h
>>>> CVS:
>>>> ----------------------------------------------------------------------
>>>> New method to stop repair import mistakes. "appendBlockIfNeeded"
>>>>
>>>> This should be BAKCPORTED.
>>>>
>>>> This method simply looks at the last frag in the document. If it's a
>>>> strux
>>>> and it's not a Block, EndFootnote or EndEndnote, this method appends a
>>>> block onto the PT.
>>>>
>>>> This method is called in appendSpan(..), appendObject(...),
>>>> appendFmt(...)
>>>> before ther span, object or fmt is appended onto the PT.
>>>>
>>>> This method will therefore correct the crashes we get when an importer
>>>> screws up something and puts some content after a non-block strux.
>>>>
>>>> The cost is trivial, we simply grab a pointer and examine it.
>>>>
>>>> This method fixes a crash I got importing an RTF file because of an
>>>> open
>>>> Frame strux.
>>>>
>>>> Dom suggested we do something like this ages ago and we should have.
>>>>
>>>> Anyway, better late than never.
>>>>
>>>> Cheers
>>>>
>>>> Martin
>>>>
>>>
>>>
>>
>>
>
Received on Tue Mar 1 01:12:01 2005

This archive was generated by hypermail 2.1.8 : Tue Mar 01 2005 - 01:12:01 CET