From 79f8cbdb1e9a5a8f46e23f032b62566c1f458017 Mon Sep 17 00:00:00 2001 From: Adrian Cumiskey Date: Fri, 26 Sep 2008 11:27:35 +0000 Subject: [PATCH] Merged revisions 693433,693462,693720,693742,693781,693784,693841,695491,695500,695776,696365,697140,697152,698280,698322,698670 via svnmerge from https://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r693433 | acumiskey | 2008-09-09 12:00:58 +0100 (Tue, 09 Sep 2008) | 1 line Make PFM string parsing a little more robust ........ r693462 | acumiskey | 2008-09-09 14:35:13 +0100 (Tue, 09 Sep 2008) | 1 line This is a better fix which will cater for the case where the first character encountered is the EOF (-1) character. EOF test now only occurs when loop is exit so this should execute more efficiently. ........ r693720 | jeremias | 2008-09-10 08:46:23 +0100 (Wed, 10 Sep 2008) | 1 line Some older TTF fonts have shorter OS/2 tables. This fixes potential EOFExceptions. ........ r693742 | jeremias | 2008-09-10 10:00:16 +0100 (Wed, 10 Sep 2008) | 3 lines Bugzilla #45616: Fix for table handling in RTF output, so the output works with OpenOffice and AbiWord, too. Submitted by: Pavel Kysilka ........ r693781 | jeremias | 2008-09-10 11:52:45 +0100 (Wed, 10 Sep 2008) | 3 lines Bugzilla #45734: Fix for PFMReader after bug #43089 (r567078) changed the behavior of PFMFile. Fixes baseline problems when Type 1 fonts are used in conjunction with XML font metric files. Submitted by: J. Frantzius ........ r693784 | jeremias | 2008-09-10 11:59:27 +0100 (Wed, 10 Sep 2008) | 1 line Credits where credits are due. I only noticed afterwards that there was a patch attached to the issue. ........ r693841 | adelmelle | 2008-09-10 14:24:00 +0100 (Wed, 10 Sep 2008) | 1 line Minor fix: avoid attempts at converting a default namespace declaration as a FO property, if the parser reports it as a regular attribute ........ r695491 | jeremias | 2008-09-15 16:06:28 +0100 (Mon, 15 Sep 2008) | 1 line PDF Output: Made sure the XMP Metadata stream is never compressed. ........ r695500 | jeremias | 2008-09-15 16:15:44 +0100 (Mon, 15 Sep 2008) | 2 lines Bugzilla #45755: Removed ALv2 license header as this file does not have a "creativity" value and only serves as an example. ........ r695776 | maxberger | 2008-09-16 09:56:12 +0100 (Tue, 16 Sep 2008) | 4 lines Re-enabled image loader testcases Made sure SVG converters use SVG flavor (updated in commons) Added new ImageLoaderTest which tests JPGs embedded in SVG ........ r696365 | jeremias | 2008-09-17 17:41:14 +0100 (Wed, 17 Sep 2008) | 3 lines Bugzilla #45795: PDF Output: Added support for handling 16-bit alpha channel. They are currently converted to 8 bits. ........ r697140 | jeremias | 2008-09-19 16:57:54 +0100 (Fri, 19 Sep 2008) | 1 line Fixed stray "xml.apache.org". ........ r697152 | adelmelle | 2008-09-19 18:01:03 +0100 (Fri, 19 Sep 2008) | 1 line Bugzilla 45842: Use FOP_OPTS environment variable in fop.bat and fop.cmd (patch submitted by Carsten Siedentop) ........ r698280 | adelmelle | 2008-09-23 19:48:34 +0100 (Tue, 23 Sep 2008) | 3 lines Bugzilla 40798: A conditional-page-master-reference with page-position="last" is also eligible for an only page (first as well as last) Additionally: added support for page-position="only" ........ r698322 | adelmelle | 2008-09-23 20:55:02 +0100 (Tue, 23 Sep 2008) | 1 line Cleanup firstWhiteSpaceInSeq at end of block too... ........ r698670 | adelmelle | 2008-09-24 18:45:51 +0100 (Wed, 24 Sep 2008) | 1 line Added two missing files from r698280 ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@699279 13f79535-47bb-0310-9956-ffa450edef68 --- conf/fop.xconf | 16 --- fop.bat | 2 +- fop.cmd | 2 +- lib/xmlgraphics-commons-1.4svn.jar | Bin 528636 -> 528722 bytes .../content/xdocs/0.94/extensions.xml | 2 +- .../content/xdocs/0.95/extensions.xml | 2 +- .../content/xdocs/trunk/extensions.xml | 2 +- src/java/org/apache/fop/fo/PropertyList.java | 9 +- .../apache/fop/fo/XMLWhiteSpaceHandler.java | 1 + .../ConditionalPageMasterReference.java | 66 +++------- .../fop/fo/pagination/PageSequence.java | 59 ++++----- .../fop/fo/pagination/PageSequenceMaster.java | 6 +- .../RepeatablePageMasterAlternatives.java | 3 +- .../RepeatablePageMasterReference.java | 1 - .../pagination/SinglePageMasterReference.java | 5 +- .../fo/pagination/SubSequenceSpecifier.java | 2 - .../org/apache/fop/fonts/apps/PFMReader.java | 8 +- .../apache/fop/fonts/truetype/TTFFile.java | 45 ++++--- .../fop/fonts/type1/PFMInputStream.java | 9 +- .../loader/batik/ImageConverterSVG2G2D.java | 7 +- .../loader/batik/ImageLoaderFactorySVG.java | 3 +- .../image/loader/batik/ImageLoaderSVG.java | 4 +- .../apache/fop/layoutmgr/PageProvider.java | 7 +- .../org/apache/fop/pdf/AlphaRasterImage.java | 15 +++ .../org/apache/fop/pdf/PDFFilterList.java | 10 +- .../org/apache/fop/render/rtf/RTFHandler.java | 2 +- .../rtf/rtflib/rtfdoc/RtfTableCell.java | 17 ++- status.xml | 22 ++++ .../org/apache/fop/StandardTestSuite.java | 4 + .../loader/batik/ImageLoaderTestCase.java | 70 +++++++++-- .../page-position_last_bug40798.xml | 118 ++++++++++++++++++ .../standard-testcases/page-position_only.xml | 115 +++++++++++++++++ 32 files changed, 462 insertions(+), 172 deletions(-) create mode 100644 test/layoutengine/standard-testcases/page-position_last_bug40798.xml create mode 100644 test/layoutengine/standard-testcases/page-position_only.xml diff --git a/conf/fop.xconf b/conf/fop.xconf index 2f638c2b2..86b72a811 100644 --- a/conf/fop.xconf +++ b/conf/fop.xconf @@ -1,20 +1,4 @@ - + + + +

+ This test checks for the use of a 'last' conditional-page-master-reference + for a first/only page (see: https://issues.apache.org/bugzilla/show_bug.cgi?id=40798) +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + first + + + only + + + This is the only page + + + + + only + + + first + + + last + + + rest + + + This is the first page + This is a middle page + This is a middle page + This is the last page + + + + + + + + + + + + +
diff --git a/test/layoutengine/standard-testcases/page-position_only.xml b/test/layoutengine/standard-testcases/page-position_only.xml new file mode 100644 index 000000000..bcf05db2c --- /dev/null +++ b/test/layoutengine/standard-testcases/page-position_only.xml @@ -0,0 +1,115 @@ + + + + + +

+ This test checks for the use of an 'only' conditional-page-master-reference (XSL 1.1) +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + first + + + only + + + This is the only page + + + + + only + + + first + + + last + + + rest + + + This is the first page + This is a middle page + This is a middle page + This is the last page + + + + + + + + + + + + +
-- 2.39.5