diff options
author | Jeremias Maerki <jeremias@apache.org> | 2003-11-08 14:00:02 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2003-11-08 14:00:02 +0000 |
commit | 8bedf21f4562fa1064d0d4587b7ab21c9a1e9a00 (patch) | |
tree | 9532fa16b616838f1f2b1d87eb443c701ee701c0 /src/java/org/apache | |
parent | 9985c53dabf63f2ede962b3fc61acfa7deb66963 (diff) | |
download | xmlgraphics-fop-8bedf21f4562fa1064d0d4587b7ab21c9a1e9a00.tar.gz xmlgraphics-fop-8bedf21f4562fa1064d0d4587b7ab21c9a1e9a00.zip |
Fix Document construction in getContentHandler() (it was done too late)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196993 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/apps/Driver.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/java/org/apache/fop/apps/Driver.java b/src/java/org/apache/fop/apps/Driver.java index 2115b7c94..970a58dc2 100644 --- a/src/java/org/apache/fop/apps/Driver.java +++ b/src/java/org/apache/fop/apps/Driver.java @@ -524,6 +524,19 @@ public class Driver implements LogEnabled { validateOutputStream(); } + /** Document creation is hard-wired for now, but needs to be made + accessible through the API and/or configuration */ + if (currentDocument == null) { + currentDocument = new Document(this); + } + /** LayoutStrategy is hard-wired for now, but needs to be made + accessible through the API and/or configuration */ + if (foInputHandler instanceof FOTreeHandler) { + if (currentDocument.getLayoutStrategy() == null) { + currentDocument.setLayoutStrategy(new LayoutManagerLS(currentDocument)); + } + } + // TODO: - do this stuff in a better way // PIJ: I guess the structure handler should be created by the renderer. if (rendererType == RENDER_MIF) { @@ -537,23 +550,10 @@ public class Driver implements LogEnabled { } foInputHandler = new FOTreeHandler(currentDocument, true); } + currentDocument.foInputHandler = foInputHandler; foInputHandler.enableLogging(getLogger()); - /** Document creation is hard-wired for now, but needs to be made - accessible through the API and/or configuration */ - if (currentDocument == null) { - currentDocument = new Document(this); - } - currentDocument.foInputHandler = foInputHandler; - /** LayoutStrategy is hard-wired for now, but needs to be made - accessible through the API and/or configuration */ - if (foInputHandler instanceof FOTreeHandler) { - if (currentDocument.getLayoutStrategy() == null) { - currentDocument.setLayoutStrategy(new LayoutManagerLS(currentDocument)); - } - } - treeBuilder.setUserAgent(getUserAgent()); treeBuilder.setFOInputHandler(foInputHandler); treeBuilder.foTreeControl = currentDocument; |