]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix for Bug 36928 - refresh cached property value if explicitly set twice which can...
authorManuel Mall <manuel@apache.org>
Wed, 9 Nov 2005 11:49:43 +0000 (11:49 +0000)
committerManuel Mall <manuel@apache.org>
Wed, 9 Nov 2005 11:49:43 +0000 (11:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@332024 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/StaticPropertyList.java
test/layoutengine/testcases/block_font-size_relative.xml

index 37699847a0f3fce3f234a13aac880cea4b374b8e..a8455ee9ebbf65b66e9e50006cc455c3078071ae 100755 (executable)
@@ -53,6 +53,9 @@ public class StaticPropertyList extends PropertyList {
      */
     public void putExplicit(int propId, Property value) {
         explicit[propId] = value;
+        if (values[propId] != null) { // if the cached value is set overwrite it
+            values[propId] = value;
+        }
     }
 
     /**
index 8dc3dbf8c047c4cc05c8251441d705f8e599d02a..d12ebfe07623096175b92713ebebd67681b429c6 100644 (file)
               </fo:block>
             </fo:block>
           </fo:block>
+          <fo:block font-size="36pt">font-size="36pt"
+            <fo:block font-size="0.5em">font-size="0.5em"
+              <fo:block font-size="0.5em">font-size="0.5em"
+                <fo:block font-size="2em">font-size="2em"
+                  <fo:block font-size="2em">font-size="2em"
+                  </fo:block>
+                </fo:block>
+              </fo:block>
+            </fo:block>
+          </fo:block>
         </fo:flow>
       </fo:page-sequence>
     </fo:root>
     <eval expected="51598" xpath="//flow/block[8]/block/block/lineArea/text/@font-size"/>
     <eval expected="42998" xpath="//flow/block[8]/block/block/block/lineArea/text/@font-size"/>
     <eval expected="35832" xpath="//flow/block[8]/block/block/block/block/lineArea/text/@font-size"/>
+    <eval expected="14400" xpath="//flow/block[9]/lineArea/text/@font-size"/>
+    <eval expected="17280" xpath="//flow/block[9]/block/lineArea/text/@font-size"/>
+    <eval expected="14400" xpath="//flow/block[9]/block/block/lineArea/text/@font-size"/>
+    <eval expected="12000" xpath="//flow/block[9]/block/block/block/lineArea/text/@font-size"/>
+    <eval expected="36000" xpath="//flow/block[10]/lineArea/text/@font-size"/>
+    <eval expected="18000" xpath="//flow/block[10]/block/lineArea/text/@font-size"/>
+    <eval expected="9000" xpath="//flow/block[10]/block/block/lineArea/text/@font-size"/>
+    <eval expected="18000" xpath="//flow/block[10]/block/block/block/lineArea/text/@font-size"/>
+    <eval expected="36000" xpath="//flow/block[10]/block/block/block/block/lineArea/text/@font-size"/>
   </checks>
 </testcase>