Finn or Simon, would you please check if it is acceptable to put the inherited values directly into the CommonMarginBlock? It might have been cleaner to always get the value via the parent FO but I think in this case it helps simplifying the code in TraitSetter and BlockLayoutManager.
On 07.01.2005 09:21:21 jeremias wrote: > jeremias 2005/01/07 00:21:21 > > Modified: src/java/org/apache/fop/fo/properties CommonMarginBlock.java > src/java/org/apache/fop/layoutmgr TraitSetter.java > BlockLayoutManager.java > Log: > Bugfix for start-indent calculation for nested blocks. The inherited > start-indent wasn't taken into account as described in 5.3.2 of the spec. > Minor style and javadoc improvements on the way. <snip/> > Revision Changes Path > 1.5 +34 -2 > xml-fop/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java > > Index: CommonMarginBlock.java > =================================================================== > RCS file: > /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java,v > retrieving revision 1.4 > retrieving revision 1.5 > diff -u -r1.4 -r1.5 > --- CommonMarginBlock.java 28 Oct 2004 10:00:24 -0000 1.4 > +++ CommonMarginBlock.java 7 Jan 2005 08:21:21 -0000 1.5 > @@ -1,5 +1,5 @@ > /* > - * Copyright 1999-2004 The Apache Software Foundation. > + * Copyright 1999-2005 The Apache Software Foundation. > * > * Licensed under the Apache License, Version 2.0 (the "License"); > * you may not use this file except in compliance with the License. > @@ -70,6 +70,16 @@ > public Length endIndent; > > /** > + * The inherited "start-indent" property. > + */ > + public Length inheritedStartIndent; > + > + /** > + * The inherited "end-indent" property. > + */ > + public Length inheritedEndIndent; > + > + /** > * Create a CommonMarginBlock object. > * @param pList The PropertyList with propery values. > */ > @@ -84,5 +94,27 @@ > > startIndent = pList.get(Constants.PR_START_INDENT).getLength(); > endIndent = pList.get(Constants.PR_END_INDENT).getLength(); > + > + if (!pList.getFObj().generatesReferenceAreas()) { > + inheritedStartIndent = pList.getParentPropertyList() > + .get(Constants.PR_START_INDENT).getLength(); > + inheritedEndIndent = pList.getParentPropertyList() > + .get(Constants.PR_END_INDENT).getLength(); > + } > + } <snip/> Jeremias Maerki