diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-12-14 16:57:16 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-12-14 16:57:16 +0000 |
commit | d958ef6db38f3e80ebaeae60372716f09e51ae1e (patch) | |
tree | a3bc459493880dcc54d4a4ee86dc93ff8317a917 /src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java | |
parent | ce832ae088ad9533b4e2ca2ba016fe1d3c954454 (diff) | |
download | xmlgraphics-fop-d958ef6db38f3e80ebaeae60372716f09e51ae1e.tar.gz xmlgraphics-fop-d958ef6db38f3e80ebaeae60372716f09e51ae1e.zip |
Don't hyphenate when wrap is set to "no-wrap".
Hack: Work around an NPE in hyphenation when preserved line feeds are found.
Documenting a bug where linefeeds are painted as "#" and content is painted multiple times when hyphenation is on and linefeed-treatment="preserve".
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@356804 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java index dbf9290c2..3eea3b6af 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java @@ -1064,7 +1064,8 @@ public class LineLayoutManager extends InlineStackingLayoutManager 0 : hyphenationLadderCount.getValue(), this); - if (hyphenationProperties.hyphenate == EN_TRUE) { + if (hyphenationProperties.hyphenate == EN_TRUE + && fobj.getWrapOption() != EN_NO_WRAP) { findHyphenationPoints(currPar); } @@ -1487,7 +1488,10 @@ public class LineLayoutManager extends InlineStackingLayoutManager } else { break; } + } else if (currLM == null) { + break; } + //TODO Something's not right here. See block_hyphenation_linefeed_preserve.xml // collect word fragments, ignoring auxiliary elements; // each word fragment was created by a different TextLM |