keiron 01/07/30 00:44:59 Modified: src/org/apache/fop/fo ColorProfile.java PropertyManager.java src/org/apache/fop/fo/flow Character.java src/org/apache/fop/fo/pagination PageSequence.java RegionAfter.java RegionBefore.java RegionBody.java RegionEnd.java RegionStart.java Root.java SimplePageMaster.java Added: src/org/apache/fop/layout BackgroundProps.java MarginProps.java Log: started support to read all relevant properties mostly commented Revision Changes Path 1.2 +5 -1 xml-fop/src/org/apache/fop/fo/ColorProfile.java Index: ColorProfile.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ColorProfile.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ColorProfile.java 2001/07/13 12:35:18 1.1 +++ ColorProfile.java 2001/07/30 07:44:58 1.2 @@ -1,4 +1,4 @@ -/*-- $Id: ColorProfile.java,v 1.1 2001/07/13 12:35:18 keiron Exp $ -- +/*-- $Id: ColorProfile.java,v 1.2 2001/07/30 07:44:58 keiron Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -35,6 +35,10 @@ PropertyList propertyList) throws FOPException { super(parent, propertyList); this.name = "fo:color-profile"; + + //this.properties.get("src"); + //this.properties.get("color-profile-name"); + //this.properties.get("rendering-intent"); } } 1.5 +27 -1 xml-fop/src/org/apache/fop/fo/PropertyManager.java Index: PropertyManager.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/PropertyManager.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- PropertyManager.java 2001/07/26 06:40:30 1.4 +++ PropertyManager.java 2001/07/30 07:44:58 1.5 @@ -1,4 +1,4 @@ -/*-- $Id: PropertyManager.java,v 1.4 2001/07/26 06:40:30 keiron Exp $ -- */ +/*-- $Id: PropertyManager.java,v 1.5 2001/07/30 07:44:58 keiron Exp $ -- */ /* * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the @@ -9,6 +9,8 @@ import org.apache.fop.layout.FontState; import org.apache.fop.layout.FontInfo; import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.layout.MarginProps; +import org.apache.fop.layout.BackgroundProps; import org.apache.fop.fo.properties.BreakAfter; import org.apache.fop.fo.properties.BreakBefore; import org.apache.fop.fo.properties.Constants; @@ -184,5 +186,29 @@ return Status.OK; } } + +public MarginProps getMarginProps() +{ +MarginProps props = new MarginProps(); + +// Common Margin Properties-Block + props.marginTop = this.properties.get("margin-top").getLength().mvalue(); + props.marginBottom = this.properties.get("margin-bottom").getLength().mvalue(); + props.marginLeft = this.properties.get("margin-left").getLength().mvalue(); + props.marginRight = this.properties.get("margin-right").getLength().mvalue(); +/* +// need to get opt, min and max + props.spaceBefore = this.properties.get("space-before").getLength().mvalue(); + props.spaceAfter = this.properties.get("space-after").getLength().mvalue(); + props.startIndent = this.properties.get("start-indent").getLength().mvalue(); + props.endIndent = this.properties.get("end-indent").getLength().mvalue(); +*/ +return props; +} + +public BackgroundProps getBackgroundProps() { +BackgroundProps bp = new BackgroundProps(); +return bp; +} } 1.7 +6 -51 xml-fop/src/org/apache/fop/fo/flow/Character.java Index: Character.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Character.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Character.java 2001/03/04 21:34:51 1.6 +++ Character.java 2001/07/30 07:44:58 1.7 @@ -1,52 +1,7 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - [EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <[EMAIL PROTECTED]>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - +/* $Id: Character.java,v 1.7 2001/07/30 07:44:58 keiron Exp $ + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. */ package org.apache.fop.fo.flow; @@ -56,7 +11,7 @@ import org.apache.fop.fo.properties.*; import org.apache.fop.datatypes.ColorType; import org.apache.fop.layout.BlockArea; -import org.apache.fop.layout.Area; +import org.apache.fop.layout.*; import org.apache.fop.layout.inline.InlineArea; import org.apache.fop.fo.FObj; import org.apache.fop.layout.FontState; @@ -101,7 +56,7 @@ public Status layout(Area area) throws FOPException { - BlockArea blockArea; + AreaContainer blockArea; blockArea = (BlockArea) area; boolean textDecoration; 1.34 +6 -1 xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- PageSequence.java 2001/07/23 01:59:38 1.33 +++ PageSequence.java 2001/07/30 07:44:58 1.34 @@ -1,4 +1,4 @@ -/*-- $Id: PageSequence.java,v 1.33 2001/07/23 01:59:38 arved Exp $ -- +/*-- $Id: PageSequence.java,v 1.34 2001/07/30 07:44:58 keiron Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -157,9 +157,14 @@ this.properties.get("grouping-separator").getCharacter(), this.properties.get("grouping-size").getNumber().intValue(), this.properties.get("letter-value").getEnum() + ); this.forcePageCount = this.properties.get("force-page-count").getEnum(); + + //this.properties.get("country"); + //this.properties.get("language"); + //this.properties.get("id"); } public void addFlow(Flow flow) throws FOPException { 1.8 +16 -2 xml-fop/src/org/apache/fop/fo/pagination/RegionAfter.java Index: RegionAfter.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionAfter.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- RegionAfter.java 2001/03/04 23:09:29 1.7 +++ RegionAfter.java 2001/07/30 07:44:58 1.8 @@ -1,4 +1,4 @@ -/*-- $Id: RegionAfter.java,v 1.7 2001/03/04 23:09:29 arved Exp $ -- +/*-- $Id: RegionAfter.java,v 1.8 2001/07/30 07:44:58 keiron Exp $ -- * * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the @@ -11,6 +11,8 @@ import org.apache.fop.fo.properties.*; import org.apache.fop.apps.FOPException; import org.apache.fop.layout.RegionArea; +import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.layout.BackgroundProps; public class RegionAfter extends Region { @@ -39,7 +41,19 @@ int allocationRectangleYPosition, int allocationRectangleWidth, int allocationRectangleHeight) { - int extent = this.properties.get("extent").getLength().mvalue(); + +// Common Border, Padding, and Background Properties +BorderAndPadding bap = propMgr.getBorderAndPadding(); +BackgroundProps bProps = propMgr.getBackgroundProps(); + + //this.properties.get("clip"); + //this.properties.get("display-align"); + int extent = this.properties.get("extent").getLength().mvalue(); + //this.properties.get("overflow"); + //this.properties.get("precedence"); + //this.properties.get("region-name"); + //this.properties.get("reference-orientation"); + //this.properties.get("writing-mode"); return new RegionArea(allocationRectangleXPosition, allocationRectangleYPosition - 1.8 +17 -3 xml-fop/src/org/apache/fop/fo/pagination/RegionBefore.java Index: RegionBefore.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionBefore.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- RegionBefore.java 2001/03/04 23:09:35 1.7 +++ RegionBefore.java 2001/07/30 07:44:58 1.8 @@ -1,8 +1,8 @@ -/*-- $Id: RegionBefore.java,v 1.7 2001/03/04 23:09:35 arved Exp $ -- +/*-- $Id: RegionBefore.java,v 1.8 2001/07/30 07:44:58 keiron Exp $ -- * * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the - * LICENSE file included with these sources." + * LICENSE file included with these sources. */ package org.apache.fop.fo.pagination; @@ -10,6 +10,8 @@ import org.apache.fop.fo.*; import org.apache.fop.fo.properties.*; import org.apache.fop.layout.RegionArea; +import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.layout.BackgroundProps; import org.apache.fop.apps.FOPException; public class RegionBefore extends Region { @@ -40,7 +42,19 @@ int allocationRectangleYPosition, int allocationRectangleWidth, int allocationRectangleHeight) { - int extent = this.properties.get("extent").getLength().mvalue(); + +// Common Border, Padding, and Background Properties +BorderAndPadding bap = propMgr.getBorderAndPadding(); +BackgroundProps bProps = propMgr.getBackgroundProps(); + + //this.properties.get("clip"); + //this.properties.get("display-align"); + int extent = this.properties.get("extent").getLength().mvalue(); + //this.properties.get("overflow"); + //this.properties.get("precedence"); + //this.properties.get("region-name"); + //this.properties.get("reference-orientation"); + //this.properties.get("writing-mode"); return new RegionArea(allocationRectangleXPosition, allocationRectangleYPosition, 1.9 +26 -58 xml-fop/src/org/apache/fop/fo/pagination/RegionBody.java Index: RegionBody.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionBody.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- RegionBody.java 2000/12/27 03:53:40 1.8 +++ RegionBody.java 2001/07/30 07:44:58 1.9 @@ -1,53 +1,9 @@ -/*-- $Id: RegionBody.java,v 1.8 2000/12/27 03:53:40 arved Exp $ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - [EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <[EMAIL PROTECTED]>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - +/* $Id: RegionBody.java,v 1.9 2001/07/30 07:44:58 keiron Exp $ + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. */ + package org.apache.fop.fo.pagination; // FOP @@ -58,6 +14,9 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.layout.RegionArea; import org.apache.fop.layout.BodyRegionArea; +import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.layout.MarginProps; import org.apache.fop.messaging.MessageHandler; public class RegionBody extends Region { @@ -87,19 +46,28 @@ int allocationRectangleYPosition, int allocationRectangleWidth, int allocationRectangleHeight) { - int marginTop = this.properties.get("margin-top").getLength().mvalue(); - int marginBottom = this.properties.get("margin-bottom").getLength().mvalue(); - int marginLeft = this.properties.get("margin-left").getLength().mvalue(); - int marginRight = this.properties.get("margin-right").getLength().mvalue(); + +// Common Border, Padding, and Background Properties +BorderAndPadding bap = propMgr.getBorderAndPadding(); +BackgroundProps bProps = propMgr.getBackgroundProps(); + +// Common Margin Properties-Block +MarginProps mProps = propMgr.getMarginProps(); + + //this.properties.get("clip"); + //this.properties.get("display-align"); + //this.properties.get("region-name"); + //this.properties.get("reference-orientation"); + //this.properties.get("writing-mode"); this.backgroundColor = this.properties.get( "background-color").getColorType(); - BodyRegionArea body = new BodyRegionArea(allocationRectangleXPosition + marginLeft, - allocationRectangleYPosition - marginTop, - allocationRectangleWidth - marginLeft - - marginRight, allocationRectangleHeight - - marginTop - marginBottom); + BodyRegionArea body = new BodyRegionArea(allocationRectangleXPosition + mProps.marginLeft, + allocationRectangleYPosition - mProps.marginTop, + allocationRectangleWidth - mProps.marginLeft - + mProps.marginRight, allocationRectangleHeight - + mProps.marginTop - mProps.marginBottom); int overflow = this.properties.get("overflow").getEnum(); String columnCountAsString = this.properties.get("column-count").getString(); 1.2 +16 -2 xml-fop/src/org/apache/fop/fo/pagination/RegionEnd.java Index: RegionEnd.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionEnd.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RegionEnd.java 2001/03/04 23:00:03 1.1 +++ RegionEnd.java 2001/07/30 07:44:58 1.2 @@ -1,4 +1,4 @@ -/* $Id: RegionEnd.java,v 1.1 2001/03/04 23:00:03 arved Exp $ +/* $Id: RegionEnd.java,v 1.2 2001/07/30 07:44:58 keiron Exp $ * * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the @@ -11,6 +11,8 @@ import org.apache.fop.fo.*; import org.apache.fop.fo.properties.*; import org.apache.fop.layout.RegionArea; +import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.layout.BackgroundProps; import org.apache.fop.apps.FOPException; public class RegionEnd extends Region { @@ -61,7 +63,19 @@ int allocationRectangleYPosition, int allocationRectangleWidth, int allocationRectangleHeight) { - int extent = this.properties.get("extent").getLength().mvalue(); + +// Common Border, Padding, and Background Properties +BorderAndPadding bap = propMgr.getBorderAndPadding(); +BackgroundProps bProps = propMgr.getBackgroundProps(); + + //this.properties.get("clip"); + //this.properties.get("display-align"); + int extent = this.properties.get("extent").getLength().mvalue(); + //this.properties.get("overflow"); + //this.properties.get("region-name"); + //this.properties.get("reference-orientation"); + //this.properties.get("writing-mode"); + return makeRegionArea(allocationRectangleXPosition, allocationRectangleYPosition, allocationRectangleWidth, extent, false, false, 0, 0); 1.2 +16 -2 xml-fop/src/org/apache/fop/fo/pagination/RegionStart.java Index: RegionStart.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionStart.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RegionStart.java 2001/03/04 22:59:20 1.1 +++ RegionStart.java 2001/07/30 07:44:58 1.2 @@ -1,4 +1,4 @@ -/* $Id: RegionStart.java,v 1.1 2001/03/04 22:59:20 arved Exp $ +/* $Id: RegionStart.java,v 1.2 2001/07/30 07:44:58 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources." @@ -10,6 +10,8 @@ import org.apache.fop.fo.*; import org.apache.fop.fo.properties.*; import org.apache.fop.layout.RegionArea; +import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.layout.BackgroundProps; import org.apache.fop.apps.FOPException; public class RegionStart extends Region { @@ -59,7 +61,19 @@ int allocationRectangleYPosition, int allocationRectangleWidth, int allocationRectangleHeight) { - int extent = this.properties.get("extent").getLength().mvalue(); + +// Common Border, Padding, and Background Properties +BorderAndPadding bap = propMgr.getBorderAndPadding(); +BackgroundProps bProps = propMgr.getBackgroundProps(); + + //this.properties.get("clip"); + //this.properties.get("display-align"); + int extent = this.properties.get("extent").getLength().mvalue(); + //this.properties.get("overflow"); + //this.properties.get("region-name"); + //this.properties.get("reference-orientation"); + //this.properties.get("writing-mode"); + return makeRegionArea(allocationRectangleXPosition, allocationRectangleYPosition, allocationRectangleWidth, extent, false, false, 0, 0); 1.13 +3 -1 xml-fop/src/org/apache/fop/fo/pagination/Root.java Index: Root.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Root.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Root.java 2001/07/16 10:45:08 1.12 +++ Root.java 2001/07/30 07:44:58 1.13 @@ -1,4 +1,4 @@ -/*-- $Id: Root.java,v 1.12 2001/07/16 10:45:08 arved Exp $ -- +/*-- $Id: Root.java,v 1.13 2001/07/30 07:44:58 keiron Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -46,6 +46,8 @@ PropertyList propertyList) throws FOPException { super(parent, propertyList); this.name = "fo:root"; + + //this.properties.get("media-usage"); pageSequences = new Vector(); 1.12 +11 -11 xml-fop/src/org/apache/fop/fo/pagination/SimplePageMaster.java Index: SimplePageMaster.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/SimplePageMaster.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- SimplePageMaster.java 2001/03/04 23:09:44 1.11 +++ SimplePageMaster.java 2001/07/30 07:44:58 1.12 @@ -1,5 +1,4 @@ -/*-- $Id: SimplePageMaster.java,v 1.11 2001/03/04 23:09:44 arved Exp $ -- - * +/*-- $Id: SimplePageMaster.java,v 1.12 2001/07/30 07:44:58 keiron Exp $ -- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources." @@ -14,6 +13,7 @@ import org.apache.fop.layout.PageMaster; import org.apache.fop.layout.RegionArea; import org.apache.fop.layout.BodyRegionArea; +import org.apache.fop.layout.MarginProps; import org.apache.fop.apps.FOPException; import java.util.*; @@ -71,16 +71,16 @@ protected void end() { int pageWidth = this.properties.get("page-width").getLength().mvalue(); int pageHeight = this.properties.get("page-height").getLength().mvalue(); + //this.properties.get("reference-orientation"); + //this.properties.get("writing-mode"); - int marginTop = this.properties.get("margin-top").getLength().mvalue(); - int marginBottom = this.properties.get("margin-bottom").getLength().mvalue(); - int marginLeft = this.properties.get("margin-left").getLength().mvalue(); - int marginRight = this.properties.get("margin-right").getLength().mvalue(); - - int contentRectangleXPosition = marginLeft; - int contentRectangleYPosition = pageHeight - marginTop; - int contentRectangleWidth = pageWidth - marginLeft - marginRight; - int contentRectangleHeight = pageHeight - marginTop - marginBottom; +// Common Margin Properties-Block +MarginProps mProps = propMgr.getMarginProps(); + + int contentRectangleXPosition = mProps.marginLeft; + int contentRectangleYPosition = pageHeight - mProps.marginTop; + int contentRectangleWidth = pageWidth - mProps.marginLeft - mProps.marginRight; + int contentRectangleHeight = pageHeight - mProps.marginTop - mProps.marginBottom; this.pageMaster = new PageMaster(pageWidth, pageHeight); if (getRegion(RegionBody.REGION_CLASS) != null) { 1.1 xml-fop/src/org/apache/fop/layout/BackgroundProps.java Index: BackgroundProps.java =================================================================== /* $Id: BackgroundProps.java,v 1.1 2001/07/30 07:44:59 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ package org.apache.fop.layout; /** * Store all hyphenation related properties on an FO. * Public "structure" allows direct member access. */ public class BackgroundProps { public BackgroundProps() { } } 1.1 xml-fop/src/org/apache/fop/layout/MarginProps.java Index: MarginProps.java =================================================================== /* $Id: MarginProps.java,v 1.1 2001/07/30 07:44:59 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ package org.apache.fop.layout; /** * Store all hyphenation related properties on an FO. * Public "structure" allows direct member access. */ public class MarginProps { public int marginTop; public int marginBottom; public int marginLeft; public int marginRight; public int spaceBefore; public int spaceAfter; public int startIndent; public int endIndent; public MarginProps() { } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]