bckfnn 2004/10/10 14:05:21 Modified: src/java/org/apache/fop/fo/properties CorrespondingPropertyMaker.java Log: Added helper method getWMPropertyList(). Revision Changes Path 1.5 +17 -12 xml-fop/src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java Index: CorrespondingPropertyMaker.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CorrespondingPropertyMaker.java 22 May 2004 21:44:37 -0000 1.4 +++ CorrespondingPropertyMaker.java 10 Oct 2004 21:05:21 -0000 1.5 @@ -74,9 +74,7 @@ return false; } - PropertyList pList = (useParent) ? propertyList.getParentPropertyList() : - propertyList; - + PropertyList pList = getWMPropertyList(propertyList); int correspondingId = pList.getWritingMode(lr_tb, rl_tb, tb_rl); if (pList.getExplicit(correspondingId) != null) { @@ -97,14 +95,9 @@ * @throws FOPException for invalid or inconsistent FO input */ public Property compute(PropertyList propertyList) throws FOPException { - PropertyList pList; - if (useParent) { - pList = propertyList.getParentPropertyList(); - if (pList == null) { - return null; - } - } else { - pList = propertyList; + PropertyList pList = getWMPropertyList(propertyList); + if (pList == null) { + return null; } int correspondingId = pList.getWritingMode(lr_tb, rl_tb, tb_rl); @@ -114,6 +107,18 @@ p = baseMaker.convertProperty(p, propertyList, parentFO); } return p; + } + + /** + * Return the property list to use for fetching writing mode depending property + * ids. + */ + protected PropertyList getWMPropertyList(PropertyList pList) { + if (useParent) { + return pList.getParentPropertyList(); + } else { + return pList; + } } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]