I guess it makes sense to do that. There are only two additional uses of
setUseParent(): start-indent & end-indent. They are probably not used,
either. setUseParent() is (theoretically) only important in conjunction
with different writing modes. When they are implemented they need to be
looked at again, I think, if only to make sure that the whole thing
works correctly.

Jeremias Maerki

On 08.11.2007 11:51:35 Vincent Hennebert wrote:
> Hi,
> Please have a look at the attached FO file and the resulting PDF.
> If I replace margin-top with space-before on the outer block, I get the 
> expected result. I’ve tried to look at the code but I’ve trouble finding 
> my way in the part that deals with properties. However, in 
> FOPropertyMapping there is a setUseParent(true) for the space-before 
> property. I don’t really understand the purpose of this method but that 
> looks suspicious to me. From what I figured out from a debugging 
> session, when getting the value of space-before, the inner blocks first 
> look if the corresponding absolute property (margin-top) is set. It is 
> not on those blocks, but it is on the parent outer-block, so they get 
> the answer yes. So they try to retrieve the value of this property, but 
> as it isn’t set on the inner block they get null. Thus they put the 
> default value of 0 for space-before.
> Setting setUseParent to false seems to solve the problem and doesn’t 
> break any testcase, but I’d prefer to have confirmation from property 
> experts (see attached patch). Same issue for space-after, by the way.
> Thanks,
> Vincent

Reply via email to