[pkg-java] r15633 - in trunk/fop/debian: . patches
Mathieu Malaterre
malat-guest at alioth.debian.org
Tue Jan 3 13:44:48 UTC 2012
Author: malat-guest
Date: 2012-01-03 13:44:48 +0000 (Tue, 03 Jan 2012)
New Revision: 15633
Added:
trunk/fop/debian/patches/illegalargex.patch
Modified:
trunk/fop/debian/changelog
trunk/fop/debian/patches/series
Log:
Fix another bug
Modified: trunk/fop/debian/changelog
===================================================================
--- trunk/fop/debian/changelog 2012-01-03 10:00:38 UTC (rev 15632)
+++ trunk/fop/debian/changelog 2012-01-03 13:44:48 UTC (rev 15633)
@@ -1,9 +1,10 @@
-fop (1:1.0.dfsg2-5) UNRELEASED; urgency=low
+fop (1:1.0.dfsg2-5) unstable; urgency=low
- * Need ant 1.8.2 at least update d/control
+ * Need ant 1.8.2 at least update d/control.
* Fix NPE in inline element. Closes: #649476
+ * Fix IllegalArgumentException. Closes: #646141
- -- Mathieu Malaterre <mathieu.malaterre at gmail.com> Tue, 03 Jan 2012 10:52:25 +0100
+ -- Mathieu Malaterre <mathieu.malaterre at gmail.com> Tue, 03 Jan 2012 14:44:06 +0100
fop (1:1.0.dfsg2-4) unstable; urgency=low
Added: trunk/fop/debian/patches/illegalargex.patch
===================================================================
--- trunk/fop/debian/patches/illegalargex.patch (rev 0)
+++ trunk/fop/debian/patches/illegalargex.patch 2012-01-03 13:44:48 UTC (rev 15633)
@@ -0,0 +1,74 @@
+Description: Allow for words consisting of only soft hyphens
+Bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=49837
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646141
+Origin: http://svn.apache.org/viewvc?view=revision&revision=1042115
+Index: fop-1.0.dfsg2/src/java/org/apache/fop/fo/FOTreeBuilder.java
+===================================================================
+--- fop-1.0.dfsg2.orig/src/java/org/apache/fop/fo/FOTreeBuilder.java 2012-01-03 14:40:57.000000000 +0100
++++ fop-1.0.dfsg2/src/java/org/apache/fop/fo/FOTreeBuilder.java 2012-01-03 14:41:43.000000000 +0100
+@@ -398,7 +398,9 @@
+ FOValidationEventProducer eventProducer
+ = FOValidationEventProducer.Provider.get(
+ userAgent.getEventBroadcaster());
+- eventProducer.unknownFormattingObject(this, currentFObj.getName(),
++ String name = (currentFObj != null ? currentFObj.getName()
++ : "{" + namespaceURI + "}" + localName);
++ eventProducer.unknownFormattingObject(this, name,
+ new QName(namespaceURI, localName),
+ getEffectiveLocator());
+ }
+Index: fop-1.0.dfsg2/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
+===================================================================
+--- fop-1.0.dfsg2.orig/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java 2012-01-03 14:40:56.000000000 +0100
++++ fop-1.0.dfsg2/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java 2012-01-03 14:41:43.000000000 +0100
+@@ -774,10 +774,7 @@
+ while (lastIndex > 0 && foText.charAt(lastIndex - 1) == CharUtilities.SOFT_HYPHEN) {
+ lastIndex--;
+ }
+- final boolean endsWithHyphen = checkEndsWithHyphen
+- && foText.charAt(lastIndex) == CharUtilities.SOFT_HYPHEN;
+ Font font = FontSelector.selectFontForCharactersInText(foText, thisStart, lastIndex, foText, this);
+- int wordLength = lastIndex - thisStart;
+ boolean kerning = font.hasKerning();
+ MinOptMax wordIPD = MinOptMax.ZERO;
+ for (int i = thisStart; i < lastIndex; i++) {
+@@ -803,24 +800,31 @@
+ }
+ }
+ }
++ boolean endsWithHyphen = checkEndsWithHyphen
++ && foText.charAt(lastIndex) == CharUtilities.SOFT_HYPHEN;
+ if (kerning
+ && breakOpportunity
+ && !TextLayoutManager.isSpace(ch)
+ && lastIndex > 0
+ && endsWithHyphen) {
+- final int kern = font.getKernValue(foText.charAt(lastIndex - 1), ch);
++ int kern = font.getKernValue(foText.charAt(lastIndex - 1), ch);
+ if (kern != 0) {
+ addToLetterAdjust(lastIndex, kern);
+ //TODO: add kern to wordIPD?
+ }
+ }
+- int iLetterSpaces = wordLength - 1;
+- // if there is a break opportunity and the next one
+- // is not a space, it could be used as a line end;
+- // add one more letter space, in case other text follows
+- if (breakOpportunity && !TextLayoutManager.isSpace(ch)) {
+- iLetterSpaces++;
+- }
++ // shy+chars at start of word: wordLength == 0 && breakOpportunity
++ // shy only characters in word: wordLength == 0 && !breakOpportunity
++ int wordLength = lastIndex - thisStart;
++ int letterSpaces = 0;
++ if (wordLength != 0) {
++ letterSpaces = wordLength - 1;
++ // if there is a break opportunity and the next one
++ // is not a space, it could be used as a line end;
++ // add one more letter space, in case other text follows
++ if (breakOpportunity && !TextLayoutManager.isSpace(ch)) {
++ letterSpaces++;
++ }
+ assert iLetterSpaces >= 0;
+ wordIPD = wordIPD.plus(letterSpaceIPD.mult(iLetterSpaces));
+
Modified: trunk/fop/debian/patches/series
===================================================================
--- trunk/fop/debian/patches/series 2012-01-03 10:00:38 UTC (rev 15632)
+++ trunk/fop/debian/patches/series 2012-01-03 13:44:48 UTC (rev 15633)
@@ -3,3 +3,4 @@
enco2.patch
fixbuildxml.patch
fixnpeinlinestacking.patch
+illegalargex.patch
More information about the pkg-java-commits
mailing list