From 74a05bc3c15ef277d1096294eb6af7cbb5318664 Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Mon, 27 Feb 2006 19:02:39 +0000 Subject: [PATCH] Activated refinement white-space-handling for fo:title and fo:bookmark-title (treating fo:title the same as fo:bookmark-title -- see XSL-FO 1.1 6.11.3 -> Trait derivation) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@381409 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java | 10 +++++++++- test/layoutengine/disabled-testcases.xml | 6 ------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java b/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java index 53e701110..bef6659aa 100644 --- a/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java +++ b/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,6 +76,14 @@ public class XMLWhiteSpaceHandler { this.linefeedTreatment = currentBlock.getLinefeedTreatment(); this.whiteSpaceCollapse = currentBlock.getWhitespaceCollapse(); this.whiteSpaceTreatment = currentBlock.getWhitespaceTreatment(); + } else if (fo.getNameId() == Constants.FO_TITLE + || fo.getNameId() == Constants.FO_BOOKMARK_TITLE) { + /* Two special types of FO that can contain #PCDATA + * set properties to their initial values + */ + this.linefeedTreatment = Constants.EN_TREAT_AS_SPACE; + this.whiteSpaceCollapse = Constants.EN_TRUE; + this.whiteSpaceTreatment = Constants.EN_IGNORE_IF_SURROUNDING_LINEFEED; } currentFO = fo; if (firstTextNode == null) { diff --git a/test/layoutengine/disabled-testcases.xml b/test/layoutengine/disabled-testcases.xml index 9862d57b7..1bd206174 100644 --- a/test/layoutengine/disabled-testcases.xml +++ b/test/layoutengine/disabled-testcases.xml @@ -176,12 +176,6 @@ line. http://www.nabble.com/leaders-with-leader-pattern%3D%22use-content%22-t546244.html - - linefeed-treatment in title - title_linefeed-treatment.xml - linefeed treatment and white space -collapse are not performed on a fo:title - keep-with-previous doesn't work in lists list-block_keep-with-previous.xml -- 2.39.5