/*
- * 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.
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) {
line.</description>
<reference>http://www.nabble.com/leaders-with-leader-pattern%3D%22use-content%22-t546244.html</reference>
</testcase>
- <testcase>
- <name>linefeed-treatment in title</name>
- <file>title_linefeed-treatment.xml</file>
- <description>linefeed treatment and white space
-collapse are not performed on a fo:title</description>
- </testcase>
<testcase>
<name>keep-with-previous doesn't work in lists</name>
<file>list-block_keep-with-previous.xml</file>