jeremias 2003/11/08 06:00:03 Modified: src/java/org/apache/fop/apps Driver.java Log: Fix Document construction in getContentHandler() (it was done too late) Revision Changes Path 1.46 +14 -14 xml-fop/src/java/org/apache/fop/apps/Driver.java Index: Driver.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- Driver.java 7 Nov 2003 21:49:02 -0000 1.45 +++ Driver.java 8 Nov 2003 14:00:02 -0000 1.46 @@ -524,6 +524,19 @@ 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,22 +550,9 @@ } 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);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]