The discussed clean/dirty flag is implemented. There is an extra argument now being passed to the elehandler, the last argument of dirty is set to 1 if the pap/chp can not be guaranteed to be exactly the same as the base style. Though it is possible that a pap/chp could have two sprms which cancel each other out to leave the pap/chp exactly the same as the original style. In this case the element will be marked (erroneously ?) as being dirty, this kind of nonsense is likely only to happen in fastsaved files, which really are the spawn of the devil. This extra arg certainly requires a source change in abi, sorry about that. (while we're at it a few more rohr warnings have been removed) the next task is to fix out of sequence styles. To document the stylesheet for you, heres what we have. the wvParseStruct contains a STSH member, this has a STSHI header with the number of styles mentioned, followed by an array of STD elements for each style. The sgc member of each style tells you if its a paragraph or standalone character style. Now every paragraph style also contains a character style. I dont really grok standalone character styles. I dont believe that a section of text can really be a standalone character style, as it would have to override the paragraph style, and then it would have a "dirty" element. The vast majority of styles are paragraph styles that also include a character style. Now each paragraph style has a grupe array with two members, the first is a PAP, and the second is a CHP. So you could quite easily look through the std list and extract the properties of the para and chp for the style, and map them nicely to an abi style. The name of the style is in unicode in the xstzName member of the STD, according to the spec this can be a list of possible names, ive yet to see this so i cant comment on what the delimimator character might be. Each character style has one grupe member, consisting of a CHPX, the X means that its not a CHP, but a delta from a CHP. Id currently reccomend that you ignore these character styles for a while, as it consists of sprms that you have to parse to understand. I have to have a think about them to see what way they can be munged into something readable. So given that abi has style support you can parse the STSH stucture and map the styles that have a sgc == sgcPara into abi styles, then when the elehandler has a 0 set for dirty the PAP or CHP pointed to by the istd (which I should point out is a simple index into the std array) is exactly the same as the PAP or CHP of the paragraph in question. Im not sure that im making a lot of sense, but this is some documentation to get anyone starting on a style mapping project going. I suppose this should make importing quicker as well, as there will now be frequent CHP and PAP's that dont have to be parsed at all to know what they are. C. Real Life: Caolan McNamara * Doing: MSc in HCI Work: [EMAIL PROTECTED] * Phone: +353-86-8790257 URL: http://www.csn.ul.ie/~caolan * Sig: an oblique strategy Use an old idea
