Re: SHAZAM - POW - Beginning the Binary Word Exporter (Part 1a) (again)


Subject: Re: SHAZAM - POW - Beginning the Binary Word Exporter (Part 1a) (again)
From: Paul Rohr (paul@abisource.com)
Date: Tue Mar 28 2000 - 13:49:45 CST


At 03:14 PM 3/28/00 +0100, James Montgomerie wrote:
>Attached are two patches, one for the abi tree, one for the wv tree,
>implementing part 1a of the 'Beginning the Binary Word Exporter' POW (see
>below). It compiles under Linux, and I have no reason to expect that it
>won't work on the other platforms too.

Jamie,

The only thing I found when testing on Windows was that you do need an
explicit wvStream* cast at line 244 of ie_imp_MsWord_97.cpp (see below).
Other than that, things look pretty good to me from the few documents I
tried.

In fact, even the known leak of CHPX/PAPX substructures can be reliably
reproduced ;-)

  http://www.abisource.com/mailinglists/abiword-dev/99/December/0122.html

So, it seems like a pretty safe checkin to me. However, since this is
Justin's POW and Caolan's codebase, I'd first like to give them a day or so
to look at it if they want.

Thanks,
Paul

--- snip ---

Index: src/wp/impexp/xp/ie_imp_MsWord_97.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp,v
retrieving revision 1.47
diff -u -r1.47 ie_imp_MsWord_97.cpp
--- src/wp/impexp/xp/ie_imp_MsWord_97.cpp 2000/02/15 22:13:06 1.47
+++ src/wp/impexp/xp/ie_imp_MsWord_97.cpp 2000/03/28 19:23:59
@@ -198,7 +198,8 @@
    IE_Imp_MsWord_97* pDocReader = (IE_Imp_MsWord_97 *) ps->userData;

    Blip blip;
- FILE *fil;
+ wvStream *fil; // Should we really be seeing the internal
struc
ture
+ // of wv here?
    long pos;
    FSPA * fspa;
    PICF picf;
@@ -234,20 +235,20 @@
           return 0;
        }

- pos = ftell(ps->data);
+ pos = wvStream_tell(ps->data);

- fseek(ps->data, achp->fcPic_fcObj_lTagObj, SEEK_SET);
+ wvStream_goto(ps->data, achp->fcPic_fcObj_lTagObj);

        wvGetPICF(wvQuerySupported(&ps->fib, NULL), &picf, ps->data);

- fil = (FILE*)picf.rgb;
+ fil = (wvStream*)picf.rgb;

        if (wv0x01(&blip, fil, picf.lcb - picf.cbHeader))
          {
             pDocReader->_handleImage(&blip, picf.dxaGoal, picf.dyaGoal);
          }

- fseek(ps->data, pos, SEEK_SET);
+ wvStream_goto(ps->data, pos);

        return 0;
        break;

--- snip ---



This archive was generated by hypermail 2b25 : Tue Mar 28 2000 - 13:44:15 CST