]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Add corresponding properties for space-*
authorKaren Lease <klease@apache.org>
Sat, 23 Feb 2002 16:47:01 +0000 (16:47 +0000)
committerKaren Lease <klease@apache.org>
Sat, 23 Feb 2002 16:47:01 +0000 (16:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194666 13f79535-47bb-0310-9956-ffa450edef68

src/codegen/foproperties.xml
src/codegen/properties.xsl

index a2a3784f7b36b588581f123d801fd4104c366995..c8c7c1caebc036bbe31e1c26f8620db20ed0b0ca 100644 (file)
   <property>
     <name>space-before</name>
     <use-generic>GenericSpace</use-generic>
+    <!-- Get corresponding margin property using PARENT's writing-mode -->
+    <corresponding use-if-specified="true">
+      <propval>margin-<parwmrel2abs dir="BEFORE"/></propval>
+    </corresponding>
   </property>
   <property>
     <name>space-after</name>
     <use-generic>GenericSpace</use-generic>
+    <!-- Get corresponding margin property using PARENT's writing-mode -->
+    <corresponding use-if-specified="true">
+      <propval>margin-<parwmrel2abs dir="AFTER"/></propval>
+    </corresponding>
   </property>
   <property>
     <name>start-indent</name>
       <propval>margin-<wmrel2abs dir="START"/></propval>+
       <propval>padding-<wmrel2abs dir="START"/></propval>+
       <propval>border-<wmrel2abs dir="START"/>-width</propval>
+      <!-- + parent start-indent unless parent generates ref area (?) -->
       </propexpr>
     </corresponding>
   </property>
index 83ed9db7571b59ad4ea9b68b938728b6439b7149..83875597ef40c3a6a7c9227d63da23149c0f4250 100644 (file)
@@ -459,6 +459,7 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
 <xsl:if test=".//corresponding">
     <xsl:if test=".//corresponding/@use-if-specified='true'">
     public boolean isCorrespondingForced(PropertyList propertyList) {
+      FObj parentFO = propertyList.getParentFObj();
       StringBuffer sbExpr=new StringBuffer();
       <xsl:for-each select=".//corresponding/propval">
       sbExpr.setLength(0);
@@ -552,6 +553,10 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
    sbExpr.append(propertyList.wmRelToAbs(PropertyList.<xsl:value-of select="@dir"/>));
 </xsl:template>
 
+<xsl:template match="propval/parwmrel2abs">
+   sbExpr.append(parentFO.properties.wmRelToAbs(PropertyList.<xsl:value-of select="@dir"/>));
+</xsl:template>
+
 <xsl:template match="propval/wmabs2rel">
    sbExpr.append(propertyList.wmAbsToRel(PropertyList.<xsl:value-of select="@dir"/>));
 </xsl:template>