From 09b63d72a07087696ba5be8540d7de4c3b40b226 Mon Sep 17 00:00:00 2001 From: Glenn Adams Date: Mon, 8 Sep 2014 12:07:42 +0000 Subject: [PATCH] FOP-2258: fix erroneous mirroring git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1623366 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/complexscripts/bidi/InlineRun.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/complexscripts/bidi/InlineRun.java b/src/java/org/apache/fop/complexscripts/bidi/InlineRun.java index f8f67f953..94d7801f9 100644 --- a/src/java/org/apache/fop/complexscripts/bidi/InlineRun.java +++ b/src/java/org/apache/fop/complexscripts/bidi/InlineRun.java @@ -154,10 +154,10 @@ public class InlineRun { } /** * Determine if run needs mirroring. - * @return true if run is homogenous and odd (i.e., right to left) + * @return true if run is homogenous and (positive) odd (i.e., right to left) */ public boolean maybeNeedsMirroring() { - return (minLevel == maxLevel) && ((minLevel & 1) != 0); + return (minLevel == maxLevel) && (minLevel > 0) && ((minLevel & 1) != 0); } /** * Reverse run (by incrementing reversal count, not actually reversing). -- 2.39.5