From: Glenn Adams Date: Mon, 8 Sep 2014 12:07:42 +0000 (+0000) Subject: FOP-2258: fix erroneous mirroring X-Git-Tag: fop-2_0~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=09b63d72a07087696ba5be8540d7de4c3b40b226;p=xmlgraphics-fop.git FOP-2258: fix erroneous mirroring git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1623366 13f79535-47bb-0310-9956-ffa450edef68 --- 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).