]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Add support for setting margin-[top,botton,left,right] by specifying
authorFinn Bock <bckfnn@apache.org>
Wed, 4 Feb 2004 12:38:27 +0000 (12:38 +0000)
committerFinn Bock <bckfnn@apache.org>
Wed, 4 Feb 2004 12:38:27 +0000 (12:38 +0000)
the "margin" shorthand property.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197324 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/FOPropertyMapping.java

index dfdca62ef09305a6d83f8be2bd29a1c7652e7d8c..7703121e87515be637b6be7a25a5b4a085de4f23 100644 (file)
@@ -1188,24 +1188,28 @@ public class FOPropertyMapping implements Constants {
         m  = new LengthProperty.Maker(PR_MARGIN_TOP);
         m.setInherited(false);
         m.setDefault("0pt");
+        m.addShorthand(s_generics[PR_MARGIN]);
         addPropertyMaker("margin-top", m);
 
         // margin-bottom
         m  = new LengthProperty.Maker(PR_MARGIN_BOTTOM);
         m.setInherited(false);
         m.setDefault("0pt");
+        m.addShorthand(s_generics[PR_MARGIN]);
         addPropertyMaker("margin-bottom", m);
 
         // margin-left
         m  = new LengthProperty.Maker(PR_MARGIN_LEFT);
         m.setInherited(false);
         m.setDefault("0pt");
+        m.addShorthand(s_generics[PR_MARGIN]);
         addPropertyMaker("margin-left", m);
 
         // margin-right
         m  = new LengthProperty.Maker(PR_MARGIN_RIGHT);
         m.setInherited(false);
         m.setDefault("0pt");
+        m.addShorthand(s_generics[PR_MARGIN]);
         addPropertyMaker("margin-right", m);
 
         // space-before
@@ -2468,9 +2472,10 @@ public class FOPropertyMapping implements Constants {
         addPropertyMaker("font", m);
 
         // margin
-        m  = new ToBeImplementedProperty.Maker(PR_MARGIN);
+        m  = new ListProperty.Maker(PR_MARGIN);
         m.setInherited(false);
         m.setDefault("");
+        m.setDatatypeParser(new BoxPropShorthandParser());
         addPropertyMaker("margin", m);
 
         // padding