From: Manuel Mall Date: Thu, 15 Dec 2005 15:44:02 +0000 (+0000) Subject: Fixed a problem where a block containing only a nbsp was not rendered at all X-Git-Tag: fop-0_91-beta~28 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=24f34a7b1b01c68868353e82a00c4fafa1697b12;p=xmlgraphics-fop.git Fixed a problem where a block containing only a nbsp was not rendered at all git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@357034 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java index f6de2e939..3e40dc31f 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java @@ -942,6 +942,16 @@ public class TextLayoutManager extends LeafNodeLayoutManager { } } + // TODO + // Add zero width box to avoid any nbspace to be removed + // at the end of a paragraph. + // This is kind of a hack and should be removed once the + // whole line building and white space handling is revisited. + if (textArray[ai.iStartIndex] == NBSPACE) { + spaceElements.add + (new KnuthInlineBox(0, null, + notifyPos(new LeafPosition(this, -1)), false)); + } return spaceElements; } diff --git a/status.xml b/status.xml index b8092d0f2..07cb722d3 100644 --- a/status.xml +++ b/status.xml @@ -27,6 +27,10 @@ + + Fixed a bug where an empty line, i.e. a block containing only a  , + was not rendered at all. + Fixed a bug where the area for a finished cell that is broken over pages was created once for each row it was spanned over instead of only once. diff --git a/test/layoutengine/standard-testcases/block_white-space_2.xml b/test/layoutengine/standard-testcases/block_white-space_2.xml new file mode 100755 index 000000000..28fba5721 --- /dev/null +++ b/test/layoutengine/standard-testcases/block_white-space_2.xml @@ -0,0 +1,45 @@ + + + + + +

+ This test checks an empty block +

+
+ + + + + + + + + + before empty line +   + after empty line + + + + + + + + + +