]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Second phase of performance improvement.
authorFinn Bock <bckfnn@apache.org>
Tue, 19 Oct 2004 13:41:25 +0000 (13:41 +0000)
committerFinn Bock <bckfnn@apache.org>
Tue, 19 Oct 2004 13:41:25 +0000 (13:41 +0000)
- Only get base properties from property list.

PR: 31699

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

src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
src/java/org/apache/fop/layoutmgr/ExternalGraphicLayoutManager.java
src/java/org/apache/fop/layoutmgr/InstreamForeignObjectLM.java
src/java/org/apache/fop/layoutmgr/LeaderLayoutManager.java
src/java/org/apache/fop/render/rtf/TableAttributesConverter.java

index 959f9af085310f16907925de0d4218288b268758..f0e2fd8441465853d1c6bef9b0391ef1a8bccdfb 100644 (file)
@@ -85,9 +85,9 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
         marginProps = propManager.getMarginProps();
         borderProps = propManager.getBorderAndPadding();
         height = fobj.getPropertyList().get(
-            PR_BLOCK_PROGRESSION_DIMENSION | CP_OPTIMUM).getLength();
+            PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange().getOptimum().getLength();
         width = fobj.getPropertyList().get(
-            PR_INLINE_PROGRESSION_DIMENSION | CP_OPTIMUM).getLength();
+            PR_INLINE_PROGRESSION_DIMENSION).getLengthRange().getOptimum().getLength();
     }
 
     public void setOverflow(int of) {
index 58ee96316042025ed0113101a2f83e8621052b80..dc833607f260f9eeb9bef915d20c878c31f15f66 100644 (file)
@@ -87,7 +87,7 @@ public class ExternalGraphicLayoutManager extends LeafNodeLayoutManager {
                 viewWidth = ipd.getValue();
             }
         }
-        Length bpd = graphic.getPropertyList().get(PR_BLOCK_PROGRESSION_DIMENSION | CP_OPTIMUM).getLength();
+        Length bpd = graphic.getPropertyList().get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange().getOptimum().getLength();
         if (!bpd.isAuto()) {
             viewHeight = bpd.getValue();
         } else {
index d25413b7b23380a46f8d31d4e628a93299a07f7a..40eecbda2b2af7b6142f1c33856a3e3ce85acfc2 100644 (file)
@@ -77,7 +77,7 @@ public class InstreamForeignObjectLM extends LeafNodeLayoutManager {
             // this property does not apply when the line-height applies
             // isn't the block-progression-dimension always in the same
             // direction as the line height?
-            len = ifoNode.getProperty(PR_BLOCK_PROGRESSION_DIMENSION | CP_OPTIMUM).getLength();
+            len = ifoNode.getProperty(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange().getOptimum().getLength();
             if (!len.isAuto()) {
                 bpd = len.getValue();
             } else {
@@ -88,7 +88,7 @@ public class InstreamForeignObjectLM extends LeafNodeLayoutManager {
             }
         }
 
-        len = ifoNode.getProperty(PR_INLINE_PROGRESSION_DIMENSION | CP_OPTIMUM).getLength();
+        len = ifoNode.getProperty(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange().getOptimum().getLength();
         if (!len.isAuto()) {
             ipd = len.getValue();
         } else {
index a6f7c9ba81a635f58f19cc403d045c65040db167..4a6829f145153aaf779d410d4611eb424ae8e774 100644 (file)
@@ -61,9 +61,9 @@ public class LeaderLayoutManager extends LeafNodeLayoutManager {
 
     private MinOptMax getLeaderAllocIPD(int ipd) {
         // length of the leader
-        int opt = ldrNode.getLength(PR_LEADER_LENGTH | CP_OPTIMUM, ipd);
-        int min = ldrNode.getLength(PR_LEADER_LENGTH | CP_MINIMUM, ipd);
-        int max = ldrNode.getLength(PR_LEADER_LENGTH | CP_MAXIMUM, ipd);
+        int opt = ldrNode.getLength(ldrNode.getProperty(PR_LEADER_LENGTH).getLengthRange().getOptimum().getLength(), ipd);
+        int min = ldrNode.getLength(ldrNode.getProperty(PR_LEADER_LENGTH).getLengthRange().getMinimum().getLength(), ipd);
+        int max = ldrNode.getLength(ldrNode.getProperty(PR_LEADER_LENGTH).getLengthRange().getMaximum().getLength(), ipd);
         return new MinOptMax(min, opt, max);
     }
 
index ed489a6291999428307275ccfb2395ab86f3b943..62308ebba4a361a1e23d6fff8e5b31b6015d5337 100644 (file)
@@ -174,7 +174,7 @@ public class TableAttributesConverter {
         //need to set a default width
 
         //check for keep-together row attribute
-        if ((p = fobj.getProperty(Constants.PR_KEEP_TOGETHER | Constants.CP_WITHIN_PAGE)) != null) {
+        if ((p = fobj.getProperty(Constants.PR_KEEP_TOGETHER).getKeep().getWithinPage()) != null) {
             attrib.set(ITableAttributes.ROW_KEEP_TOGETHER);
         }