diff options
author | Simon Pepping <spepping@apache.org> | 2007-10-05 19:44:47 +0000 |
---|---|---|
committer | Simon Pepping <spepping@apache.org> | 2007-10-05 19:44:47 +0000 |
commit | d5d11df201eacc8fe7c8fe2242a1e0a8f73a2583 (patch) | |
tree | cec8cd53f5bfa355992b35093ce422555706a866 /test/layoutengine | |
parent | f683df88315b9cd94de4f0c30a1556f35cf0ef5b (diff) | |
download | xmlgraphics-fop-d5d11df201eacc8fe7c8fe2242a1e0a8f73a2583.tar.gz xmlgraphics-fop-d5d11df201eacc8fe7c8fe2242a1e0a8f73a2583.zip |
Merged revisions 579282-582376 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r580884 | jeremias | 2007-10-01 10:00:28 +0200 (Mon, 01 Oct 2007) | 1 line
Metafocus has renamed their product.
........
r581806 | jeremias | 2007-10-04 11:04:43 +0200 (Thu, 04 Oct 2007) | 2 lines
Bugzilla #43542:
Removed dependency on Xalan's XML utilities. Used a method from Commons IO instead.
........
r581819 | jeremias | 2007-10-04 11:42:00 +0200 (Thu, 04 Oct 2007) | 1 line
Removed unnecessary dependency on Batik in the "fo" package.
........
r581906 | cbowditch | 2007-10-04 15:51:25 +0200 (Thu, 04 Oct 2007) | 4 lines
Bugzilla #42144
Safely set postscript page device dictionary
Submitted by Adrian Cumiskey <dev.at.cumiskey.com>
........
r581911 | cbowditch | 2007-10-04 15:56:55 +0200 (Thu, 04 Oct 2007) | 3 lines
Bugzilla #43184
I checked in the changes to xmlgraphics-commons source repo, but forgot to commit the updated JAR to the FOP distro. So here it is.
Submitted by Adrian Cumiskey <dev.at.cumiskey.com>
........
r581916 | cbowditch | 2007-10-04 16:03:03 +0200 (Thu, 04 Oct 2007) | 4 lines
Bugzilla #42144
Missing File from previous commit
Submitted by Adrian Cumiskey <dev.at.cumiskey.com>
........
r582124 | cbowditch | 2007-10-05 10:36:48 +0200 (Fri, 05 Oct 2007) | 4 lines
Bugzilla #43070
Postscript extension : comment before and after page
Submitted by Adrian Cumiskey <dev.at.cumiskey.com>
........
r582131 | jeremias | 2007-10-05 10:48:15 +0200 (Fri, 05 Oct 2007) | 7 lines
Bugzilla #43041:
Added a configuration setting for the renderer/device resolution to the AFP renderer.
Many Checkstyle violations fixed.
Submitted by: Adrian Cumiskey <dev.at.cumiskey.com>
Changes to the patch by jeremias:
- Bugfix: SVGs were rendered in the wrong size when the target-resolution and the renderer-resolution differ.
........
r582178 | jeremias | 2007-10-05 11:56:12 +0200 (Fri, 05 Oct 2007) | 3 lines
Bugzilla #43439:
Fixed the restoration of the TLE values from the intermediate format for the AFP extension elements.
Submitted by: Adrian Cumiskey <dev.at.cumiskey.com>
........
r582180 | jeremias | 2007-10-05 11:57:35 +0200 (Fri, 05 Oct 2007) | 1 line
Added a test case for AFP extension to make sure restoration from IF is correct.
........
r582230 | jeremias | 2007-10-05 14:34:33 +0200 (Fri, 05 Oct 2007) | 5 lines
Bugzilla #43464:
There is no need to cast the sources into a StreamSource to determine
the SystemId. With this cast DOMSources or other non-StreamSources lead in a
ClassCastException.
Submitted by: Bruno Feurer <dev.at.brunof.com>
........
r582257 | jeremias | 2007-10-05 15:33:45 +0200 (Fri, 05 Oct 2007) | 2 lines
Configuration settings for "language-level" and "optimize-resources" got lost when the patch for revision 542237 got applied. This is restored now.
See http://svn.apache.org/viewvc?view=rev&revision=542237
........
r582260 | jeremias | 2007-10-05 15:37:04 +0200 (Fri, 05 Oct 2007) | 1 line
Don't use deprecated useRGBColor() from PSGenerator anymore.
........
r582271 | jeremias | 2007-10-05 15:54:17 +0200 (Fri, 05 Oct 2007) | 1 line
Fixed a bug in the test. MediaPosition takes an integer.
........
r582287 | jeremias | 2007-10-05 16:26:20 +0200 (Fri, 05 Oct 2007) | 1 line
Added a configuration setting to the PCL renderer that lets you disable PJL commands.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking@582377 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/layoutengine')
-rw-r--r-- | test/layoutengine/standard-testcases/afp-extension_1.xml | 56 | ||||
-rw-r--r-- | test/layoutengine/standard-testcases/ps-extension_2.xml | 87 |
2 files changed, 143 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/afp-extension_1.xml b/test/layoutengine/standard-testcases/afp-extension_1.xml new file mode 100644 index 000000000..a6779177a --- /dev/null +++ b/test/layoutengine/standard-testcases/afp-extension_1.xml @@ -0,0 +1,56 @@ +<?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> + This test checks the AFP extension. The extension attachments need to show + up in the area tree XML so the AreaTreeParser can fully restore the area tree. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <afp:include-page-overlay name="O1SAMP1 "/> + <afp:include-page-segment name="S1ISLOGO" src="../../resources/images/bgimg300dpi.jpg"/> + <afp:tag-logical-element name="The TLE Name" value="The TLE Value"/> + <afp:no-operation name="My NOP">insert up to 32k of character data here!</afp:no-operation> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal"> + <fo:flow flow-name="xsl-region-body"> + <fo:block>Text on page <fo:page-number/>.</fo:block> + <fo:block break-before="page">Text on page <fo:page-number/>.</fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="4" xpath="count(/areaTree/pageSequence/pageViewport[@nr=1]/page/extension-attachments/child::*)"/> + <eval expected="O1SAMP1 " xpath="/areaTree/pageSequence/pageViewport[@nr=1]/page/extension-attachments/child::*[1]/@name"/> + <eval expected="S1ISLOGO" xpath="/areaTree/pageSequence/pageViewport[@nr=1]/page/extension-attachments/child::*[2]/@name"/> + <eval expected="The TLE Name" xpath="/areaTree/pageSequence/pageViewport[@nr=1]/page/extension-attachments/child::*[3]/@name"/> + <eval expected="The TLE Value" xpath="/areaTree/pageSequence/pageViewport[@nr=1]/page/extension-attachments/child::*[3]/@value"/> + <eval expected="My NOP" xpath="/areaTree/pageSequence/pageViewport[@nr=1]/page/extension-attachments/child::*[4]/@name"/> + + <eval expected="4" xpath="count(/areaTree/pageSequence/pageViewport[@nr=2]/page/extension-attachments/child::*)"/> + </checks> +</testcase> diff --git a/test/layoutengine/standard-testcases/ps-extension_2.xml b/test/layoutengine/standard-testcases/ps-extension_2.xml new file mode 100644 index 000000000..846a96db5 --- /dev/null +++ b/test/layoutengine/standard-testcases/ps-extension_2.xml @@ -0,0 +1,87 @@ +<?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>
+ This test checks the PostScript extension for custom setpagedevice calls and comments.
+ The extension attachments need to show up in the area tree XML so the AreaTreeParser can fully restore the area tree.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ps="http://xmlgraphics.apache.org/fop/postscript">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
+ <ps:ps-setpagedevice name="lower tray"><![CDATA[ << /MediaPosition 4 >> ]]></ps:ps-setpagedevice>
+ <ps:ps-comment-before>A4 before page</ps:ps-comment-before>
+ <ps:ps-comment-after>A4 after page</ps:ps-comment-after>
+ <fo:region-body/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="A4a" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
+ <ps:ps-setpagedevice name="upper tray"><![CDATA[ << /MediaPosition 1 >> ]]></ps:ps-setpagedevice>
+ <ps:ps-comment-before>A4a before page</ps:ps-comment-before>
+ <ps:ps-comment-after>A4a after page</ps:ps-comment-after>
+ <fo:region-body background-color="orange"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="complex">
+ <fo:repeatable-page-master-reference master-reference="A4" maximum-repeats="1"/>
+ <fo:repeatable-page-master-reference master-reference="A4a" maximum-repeats="1"/>
+ <fo:repeatable-page-master-reference master-reference="A4"/>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:declarations>
+ <ps:ps-setpagedevice name="autofeed"><![CDATA[ << /ManualFeed false >> ]]></ps:ps-setpagedevice>
+ <ps:ps-comment-before>header comment</ps:ps-comment-before>
+ <ps:ps-comment-after>footer comment</ps:ps-comment-after>
+ </fo:declarations>
+ <fo:page-sequence master-reference="complex">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Hello World!</fo:block>
+ <fo:block break-before="page"/>
+ <fo:block>Hello World!</fo:block>
+ <fo:block break-before="page"/>
+ <fo:block>Hello World!</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="2" xpath="count(/areaTree/child::*)"/>
+ <eval expected="1" xpath="count(/areaTree/child::pageSequence)"/>
+ <eval expected="1" xpath="count(/areaTree/child::extension-attachments)"/>
+ <eval expected="3" xpath="count(/areaTree/child::extension-attachments/child::*)"/>
+ <eval expected="autofeed" xpath="/areaTree/extension-attachments/child::*[1]/@name"/>
+ <eval expected="header comment" xpath="/areaTree/extension-attachments/child::*[2]/text()"/>
+ <eval expected="footer comment" xpath="/areaTree/extension-attachments/child::*[3]/text()"/>
+
+ <eval expected="3" xpath="count(/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4' and @nr=1]/page/extension-attachments/child::*)"/>
+ <eval expected="lower tray" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4' and @nr=1]/page/extension-attachments/child::*[1]/@name"/>
+ <eval expected="A4 before page" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4' and @nr=1]/page/extension-attachments/child::*[2]"/>
+ <eval expected="A4 after page" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4' and @nr=1]/page/extension-attachments/child::*[3]"/>
+
+ <eval expected="3" xpath="count(/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4a' and @nr=2]/page/extension-attachments/child::*)"/>
+ <eval expected="upper tray" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4a' and @nr=2]/page/extension-attachments/child::*[1]/@name"/>
+ <eval expected="A4a before page" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4a' and @nr=2]/page/extension-attachments/child::*[2]"/>
+ <eval expected="A4a after page" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4a' and @nr=2]/page/extension-attachments/child::*[3]"/>
+
+ <eval expected="3" xpath="count(/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4' and @nr=3]/page/extension-attachments/child::*)"/>
+ <eval expected="lower tray" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4' and @nr=3]/page/extension-attachments/child::*[1]/@name"/>
+ <eval expected="A4 before page" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4' and @nr=3]/page/extension-attachments/child::*[2]"/>
+ <eval expected="A4 after page" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4' and @nr=3]/page/extension-attachments/child::*[3]"/>
+ </checks>
+</testcase>
|