From 092af3cf902f54c565b2e1780992c2ef09683d88 Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Sun, 9 Jan 2011 14:40:31 +0000 Subject: [PATCH] Bugzilla 49848: Correct behavior of keep-together.within-line in case of nested inlines git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1056945 13f79535-47bb-0310-9956-ffa450edef68 --- .../layoutmgr/inline/TextLayoutManager.java | 2 +- status.xml | 3 +++ .../inline_keep-together.xml | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java index 3f5ed329a..81240dec0 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java @@ -705,7 +705,7 @@ public class TextLayoutManager extends LeafNodeLayoutManager { if (inWord) { processWord(alignment, sequence, prevAreaInfo, ch, false, false); } else if (inWhitespace) { - processWhitespace(alignment, sequence, true); + processWhitespace(alignment, sequence, !keepTogether); } else if (areaInfo != null) { processLeftoverAreaInfo(alignment, sequence, areaInfo, ch == CharUtilities.ZERO_WIDTH_SPACE); diff --git a/status.xml b/status.xml index 7af44400e..16054217d 100644 --- a/status.xml +++ b/status.xml @@ -58,6 +58,9 @@ documents. Example: the fix of marks layering will be such a case when it's done. --> + + Bugfix: correct behavior of keep-together.within-line in case there are nested inlines + Bugfix: avoid ArrayIndexOutOfBoundsException for codepoints without a linebreak class diff --git a/test/layoutengine/standard-testcases/inline_keep-together.xml b/test/layoutengine/standard-testcases/inline_keep-together.xml index 6ec4ce603..0c6ae682a 100644 --- a/test/layoutengine/standard-testcases/inline_keep-together.xml +++ b/test/layoutengine/standard-testcases/inline_keep-together.xml @@ -38,6 +38,22 @@ This is Blah blah blah blah! This is Blah blah blah blah! This is Blah blah blah blah! + + + This entire sentence + should be kept + together + on + one + very, + very, + very, + very, + long + line + + + @@ -54,6 +70,9 @@ + + + -- 2.39.5