aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/layout
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-11-22 07:11:41 +0000
committerKeiron Liddle <keiron@apache.org>2001-11-22 07:11:41 +0000
commitdf279ef6027b528405bd16d8efb824ac0e48c27f (patch)
tree9fbf688a4267c7ed9e8ca7847db033b5f47284f8 /src/org/apache/fop/layout
parent9680a642785ac13ec3e3851acf9b6b3ee49ebd7e (diff)
downloadxmlgraphics-fop-df279ef6027b528405bd16d8efb824ac0e48c27f.tar.gz
xmlgraphics-fop-df279ef6027b528405bd16d8efb824ac0e48c27f.zip
removed message handler
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194574 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/layout')
-rw-r--r--src/org/apache/fop/layout/BlockArea.java1
-rw-r--r--src/org/apache/fop/layout/FontInfo.java4
-rw-r--r--src/org/apache/fop/layout/LineArea.java23
-rw-r--r--src/org/apache/fop/layout/hyphenation/Hyphenator.java55
4 files changed, 41 insertions, 42 deletions
diff --git a/src/org/apache/fop/layout/BlockArea.java b/src/org/apache/fop/layout/BlockArea.java
index 8eabf175c..c8d4a99a9 100644
--- a/src/org/apache/fop/layout/BlockArea.java
+++ b/src/org/apache/fop/layout/BlockArea.java
@@ -17,7 +17,6 @@ import org.apache.fop.fo.properties.*;
// Java
import java.util.Vector;
import java.util.Enumeration;
-import org.apache.fop.messaging.MessageHandler;
/**
* This class represents a Block Area.
diff --git a/src/org/apache/fop/layout/FontInfo.java b/src/org/apache/fop/layout/FontInfo.java
index edfefc1eb..9ef871176 100644
--- a/src/org/apache/fop/layout/FontInfo.java
+++ b/src/org/apache/fop/layout/FontInfo.java
@@ -57,9 +57,9 @@ public class FontInfo {
if (f == null) {
throw new FOPException("no default font defined by OutputConverter");
}
- //MessageHandler.errorln("defaulted font to any,normal,normal");
+ //log.error("defaulted font to any,normal,normal");
}
- //MessageHandler.errorln("unknown font " + key
+ //log.error("unknown font " + key
// + " so defaulted font to any");
}
diff --git a/src/org/apache/fop/layout/LineArea.java b/src/org/apache/fop/layout/LineArea.java
index 97167e472..20c572a72 100644
--- a/src/org/apache/fop/layout/LineArea.java
+++ b/src/org/apache/fop/layout/LineArea.java
@@ -9,7 +9,6 @@ package org.apache.fop.layout;
// fop
import org.apache.fop.render.Renderer;
-import org.apache.fop.messaging.MessageHandler;
import org.apache.fop.layout.inline.*;
import org.apache.fop.datatypes.IDNode;
import org.apache.fop.fo.properties.WrapOption;
@@ -391,8 +390,9 @@ public class LineArea extends Area {
wordWidth = charWidth;
if ((finalWidth + spaceWidth + wordWidth)
> this.getContentWidth()) {
- if (overrun)
- MessageHandler.log("area contents overflows area");
+ if (overrun) {
+ //log.debug("area contents overflows area");
+ }
if (this.wrapOption == WrapOption.WRAP) {
return i;
}
@@ -443,7 +443,7 @@ public class LineArea extends Area {
(wordStart == start) &&
(finalWidth == 0)) {
- MessageHandler.log("area contents overflows area");
+ //log.debug("area contents overflows area");
addSpacedWord(new String(data, wordStart, wordLength - 1),
ls,
finalWidth + spaceWidth
@@ -501,8 +501,9 @@ public class LineArea extends Area {
wordWidth = 0;
}
- if (overrun)
- MessageHandler.log("area contents overflows area");
+ if (overrun) {
+ //log.debug("area contents overflows area");
+ }
return -1;
}
@@ -619,8 +620,8 @@ public class LineArea extends Area {
break;
// leader pattern use-content not implemented.
case LeaderPattern.USECONTENT:
- MessageHandler.errorln("leader-pattern=\"use-content\" not "
- + "supported by this version of Fop");
+ //log.error("leader-pattern=\"use-content\" not "
+ // + "supported by this version of Fop");
return;
}
// adds leader length to length of pending inline areas
@@ -821,8 +822,8 @@ public class LineArea extends Area {
private InlineArea buildSimpleLeader(char c, int leaderLength) {
int width = this.currentFontState.width(currentFontState.mapChar(c));
if (width == 0) {
- MessageHandler.errorln("char " + c
- + " has width 0. Using width 100 instead.");
+ //log.error("char " + c
+ // + " has width 0. Using width 100 instead.");
width = 100;
}
int factor = (int)Math.floor(leaderLength / width);
@@ -896,7 +897,7 @@ public class LineArea extends Area {
int remainingWidth) {
// check whether the language property has been set
if (this.hyphProps.language.equalsIgnoreCase("none")) {
- MessageHandler.errorln("if property 'hyphenate' is used, a language must be specified");
+ //log.error("if property 'hyphenate' is used, a language must be specified");
return wordStart;
}
diff --git a/src/org/apache/fop/layout/hyphenation/Hyphenator.java b/src/org/apache/fop/layout/hyphenation/Hyphenator.java
index 9d70dd72d..20b0ee372 100644
--- a/src/org/apache/fop/layout/hyphenation/Hyphenator.java
+++ b/src/org/apache/fop/layout/hyphenation/Hyphenator.java
@@ -10,7 +10,6 @@ package org.apache.fop.layout.hyphenation;
import java.io.*;
import java.util.Hashtable;
import org.apache.fop.configuration.*;
-import org.apache.fop.messaging.MessageHandler;
/**
* This class is the main entry point to the hyphenation package.
@@ -57,8 +56,8 @@ public class Hyphenator {
if (hTree != null) {
hyphenTrees.put(key, hTree);
} else {
- MessageHandler.errorln("Couldn't find hyphenation pattern "
- + key);
+ //log.error("Couldn't find hyphenation pattern "
+ // + key);
}
return hTree;
}
@@ -96,24 +95,24 @@ public class Hyphenator {
if (key.length() == 5) {
is = getResourceStream(key.substring(0, 2));
if (is != null) {
- MessageHandler.errorln("Couldn't find hyphenation pattern "
- + key
- + "\nusing general language pattern "
- + key.substring(0, 2)
- + " instead.");
+ //log.error("Couldn't find hyphenation pattern "
+ // + key
+ // + "\nusing general language pattern "
+ // + key.substring(0, 2)
+ // + " instead.");
} else {
if (errorDump) {
- MessageHandler.errorln("Couldn't find precompiled "
- + "fop hyphenation pattern "
- + key + ".hyp");
+ //log.error("Couldn't find precompiled "
+ // + "fop hyphenation pattern "
+ // + key + ".hyp");
}
return null;
}
} else {
if (errorDump) {
- MessageHandler.errorln("Couldn't find precompiled "
- + "fop hyphenation pattern "
- + key + ".hyp");
+ //log.error("Couldn't find precompiled "
+ // + "fop hyphenation pattern "
+ // + key + ".hyp");
}
return null;
}
@@ -128,7 +127,7 @@ public class Hyphenator {
try {
ois.close();
} catch (IOException e) {
- MessageHandler.errorln("can't close hyphenation object stream");
+ //log.error("can't close hyphenation object stream");
}
}
}
@@ -172,8 +171,8 @@ public class Hyphenator {
if (hyphenFile.exists()) {
hTree = new HyphenationTree();
if (errorDump) {
- MessageHandler.errorln("reading " + hyphenDir + key
- + ".xml");
+ //log.error("reading " + hyphenDir + key
+ // + ".xml");
}
try {
hTree.loadPatterns(hyphenFile.getPath());
@@ -184,18 +183,18 @@ public class Hyphenator {
return hTree;
} catch (HyphenationException ex) {
if (errorDump) {
- MessageHandler.errorln("Can't load user patterns "
- + "from xml file " + hyphenDir
- + key + ".xml");
+ //log.error("Can't load user patterns "
+ // + "from xml file " + hyphenDir
+ // + key + ".xml");
}
return null;
}
} else {
if (errorDump) {
- MessageHandler.errorln("Tried to load "
- + hyphenFile.toString()
- + "\nCannot find compiled nor xml file for "
- + "hyphenation pattern" + key);
+ //log.error("Tried to load "
+ // + hyphenFile.toString()
+ // + "\nCannot find compiled nor xml file for "
+ // + "hyphenation pattern" + key);
}
return null;
}
@@ -207,8 +206,8 @@ public class Hyphenator {
int rightMin) {
HyphenationTree hTree = getHyphenationTree(lang, country);
if (hTree == null) {
- MessageHandler.errorln("Error building hyphenation tree for language "
- + lang);
+ //log.error("Error building hyphenation tree for language "
+ // + lang);
return null;
}
return hTree.hyphenate(word, leftMin, rightMin);
@@ -219,8 +218,8 @@ public class Hyphenator {
int leftMin, int rightMin) {
HyphenationTree hTree = getHyphenationTree(lang, country);
if (hTree == null) {
- MessageHandler.errorln("Error building hyphenation tree for language "
- + lang);
+ //log.error("Error building hyphenation tree for language "
+ // + lang);
return null;
}
return hTree.hyphenate(word, offset, len, leftMin, rightMin);