RE: Word importer oddities


Subject: RE: Word importer oddities
From: Caolan McNamara (Caolan.McNamara@ul.ie)
Date: Tue Dec 14 1999 - 05:59:04 CST


On 13-Dec-99 Justin Bradford wrote:
>> I think I have fixed the tab stop parser, silly || vs && problem at the
>heart
>> of it all I believe.
>
>I see tabs now, but I'm getting odd output.
>For example, a doc Robert sent me has 8 tabs (at 1, 1.5, 2, etc)
>but I get out only 4 at -1.3125, -1.0625, 2.0, and 2.5.
>
>I suspect there are still problems with the tab SPRMs.
>I'll dig around a bit.

Justin sent me tabstops.doc and I think I have it sorted out now, though
it could be the old "works for me tm" range of software.

Lemme see now, this is a complex format document with two seperate sections
the first line has default tab stops, and the second line has manually
inserted tab stops, On the second line there are 9 tab stops as reported by
both word (click on the line and go to format tabs) and wv. Both wv and word
agree on their placement which includes two insane ones of -1.3 and -1.06
inches, so that bit is working correctly.

The first line does not have any manually inserted tabs, some checking shows
me that the following is how it works.

You have the tabstop array in the PAP which only lists manually inserted
tabstops. If there are none in it, or I assume if you tab after the end
of the last explictly set tab, then you go forword the amount of space that
is listed in the *DOP* structure, ie ps->dop.dxaTab.

There are other goodies in the DOP, including an extra flag whether to
enable or disable widow control throughout the document (something for
the widow code methinks). Which reminds me that the page information is stored
in the SEP, which in theory I suppose (though I have never seen it) means that
the paper size can change inside a document ?

Anyway to get the tabstop sizes in the case of no explictly inserted tabs
I have added the dop to wvParseStruct, and you get the default tab stop
distance in there.

While I am at it, use -DSPRMTEST and read sprmtest to see how to
get a dump of just the sprms to see what ones are actually being
used, it can be handy to isolate the individual problem at hand.

The DOP is different between word versions, but I have only word8
implemented at the moment, this might cause trouble until I get
word 6 and 7's DOP in there correctly, but I have cvs commited these
changes anyway to give you a look.

C.

Real Life: Caolan McNamara * Doing: MSc in HCI
Work: Caolan.McNamara@ul.ie * Phone: +353-86-8790257
URL: http://www.csn.ul.ie/~caolan * Sig: an oblique strategy
Overtly resist change



This archive was generated by hypermail 2b25 : Tue Dec 14 1999 - 06:21:38 CST