From 648173146fb3ef5d7cd74b63c024cb6d759f4bdf Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Mon, 8 Oct 2001 09:56:38 +0000 Subject: [PATCH] fixed an npe git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194496 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/fo/FObj.java | 2 +- src/org/apache/fop/fo/UnknownXMLObj.java | 6 +++++- src/org/apache/fop/fo/XMLObj.java | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/org/apache/fop/fo/FObj.java b/src/org/apache/fop/fo/FObj.java index ad10bbc77..02d305719 100644 --- a/src/org/apache/fop/fo/FObj.java +++ b/src/org/apache/fop/fo/FObj.java @@ -149,7 +149,7 @@ public class FObj extends FONode { * reference areas and use the value of its writing-mode property. * If no such ancestor is found, use the value on the root FO. */ - private void setWritingMode() { + protected void setWritingMode() { FObj p; FObj parent; for (p = this; diff --git a/src/org/apache/fop/fo/UnknownXMLObj.java b/src/org/apache/fop/fo/UnknownXMLObj.java index 5c734aaed..0110dd992 100644 --- a/src/org/apache/fop/fo/UnknownXMLObj.java +++ b/src/org/apache/fop/fo/UnknownXMLObj.java @@ -62,7 +62,11 @@ public class UnknownXMLObj extends XMLObj { protected UnknownXMLObj(FObj parent, PropertyList propertyList, String space, String tag) { super(parent, propertyList, tag); this.namespace = space; - this.name = this.namespace + ":" + tag; + if(!"".equals(space)) { + this.name = this.namespace + ":" + tag; + } else { + this.name = "(none):" + tag; + } } public String getNameSpace() { diff --git a/src/org/apache/fop/fo/XMLObj.java b/src/org/apache/fop/fo/XMLObj.java index 1b17bf21f..c7631efac 100644 --- a/src/org/apache/fop/fo/XMLObj.java +++ b/src/org/apache/fop/fo/XMLObj.java @@ -168,5 +168,6 @@ public abstract class XMLObj extends FObj { public void rollback(Vector snapshot) {} + protected void setWritingMode() {} } -- 2.39.5