You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ad...@apache.org on 2007/09/16 14:52:29 UTC

svn commit: r576095 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/fo/FOText.java src/java/org/apache/fop/fo/flow/RetrieveMarker.java status.xml test/layoutengine/standard-testcases/marker_text_bug42705.xml

Author: adelmelle
Date: Sun Sep 16 05:52:28 2007
New Revision: 576095

URL: http://svn.apache.org/viewvc?rev=576095&view=rev
Log:
Bugzilla 42705: Fixed swallowing PCDATA during white-space removal in retrieved markers.

Added:
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/marker_text_bug42705.xml   (with props)
Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/RetrieveMarker.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java?rev=576095&r1=576094&r2=576095&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java Sun Sep 16 05:52:28 2007
@@ -158,9 +158,9 @@
                 System.arraycopy(ca, 0, ft.ca, 0, ca.length);
             }
         }
-        prevFOTextThisBlock = null;
-        nextFOTextThisBlock = null;
-        ancestorBlock = null;
+        ft.prevFOTextThisBlock = null;
+        ft.nextFOTextThisBlock = null;
+        ft.ancestorBlock = null;
         return ft;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/RetrieveMarker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/RetrieveMarker.java?rev=576095&r1=576094&r2=576095&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/RetrieveMarker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/RetrieveMarker.java Sun Sep 16 05:52:28 2007
@@ -181,6 +181,7 @@
         }
         cloneSubtree(marker.getChildNodes(), this, 
                         marker, propertyList);
+        handleWhiteSpaceFor(this);
     }
 
     /**

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=576095&r1=576094&r2=576095&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Sun Sep 16 05:52:28 2007
@@ -28,6 +28,10 @@
 
   <changes>
     <release version="FOP Trunk">
+      <action context="Code" dev="AD" type="fix" fixes-bug="42705">
+        Fixed swallowing PCDATA in text-node children of
+        retrieved markers.
+      </action>
       <action context="Code" dev="AD" type="fix" fixes-bug="42703">
         Fixed erroneous white-space removal in retrieved markers.
       </action>

Added: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/marker_text_bug42705.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/marker_text_bug42705.xml?rev=576095&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/marker_text_bug42705.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/marker_text_bug42705.xml Sun Sep 16 05:52:28 2007
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      Test accompanying bugfix for Bugzilla 42705
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo='http://www.w3.org/1999/XSL/Format'>
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name='Page' page-height='15.5cm' page-width='20cm' margin='1.0cm' >
+          <fo:region-body margin-top="3cm" background-color='lightyellow'/>
+          <fo:region-before extent='3cm'  region-name='RB' background-color='lightseagreen'/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      
+      <fo:page-sequence master-reference='Page' >
+        <fo:static-content flow-name="RB">
+          <fo:block>
+            Marker1 :
+            <fo:retrieve-marker retrieve-class-name="M"/>
+          </fo:block>
+        </fo:static-content>
+        <fo:flow flow-name='xsl-region-body'>
+          <fo:block>Beginning of Page-sequence</fo:block>
+          <fo:block>
+            <fo:marker marker-class-name="M">
+            AAAA <fo:inline font-size="8pt">123456789</fo:inline>  - numbers with a lower font-size : Missing first four letter of marker 'AAAA' ????
+            </fo:marker>
+            Text with marker A
+          </fo:block>
+          <fo:block>End of Page-sequence</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="AAAA" xpath="(//regionBefore//text)[2]/word[1]" />
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/marker_text_bug42705.xml
------------------------------------------------------------------------------
    svn:keywords = Id



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org