From: Bertrand Delacretaz Date: Tue, 5 Nov 2002 08:51:44 +0000 (+0000) Subject: RTFHandler constructor IOException removed X-Git-Tag: Alt-Design-integration-base~357 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7c0d3f36d69b205482760e59b19ccc0161cffca2;p=xmlgraphics-fop.git RTFHandler constructor IOException removed git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195416 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/rtf/renderer/RTFHandler.java b/src/org/apache/fop/rtf/renderer/RTFHandler.java index bfd04f09c..921b18b4e 100644 --- a/src/org/apache/fop/rtf/renderer/RTFHandler.java +++ b/src/org/apache/fop/rtf/renderer/RTFHandler.java @@ -38,6 +38,7 @@ import java.io.IOException; public class RTFHandler extends StructureHandler { private FontInfo _fontInfo = new FontInfo(); private RtfFile _rtfFile; + private final OutputStream _os; private RtfSection _sect; private RtfDocumentArea _docArea; private RtfParagraph _para; @@ -45,8 +46,8 @@ import java.io.IOException; private static final String ALPHA_WARNING = "WARNING: RTF renderer is veryveryalpha at this time, see class org.apache.fop.rtf.renderer.RTFHandler"; - public RTFHandler(OutputStream os) throws IOException { - _rtfFile = new RtfFile(new OutputStreamWriter(os)); + public RTFHandler(OutputStream os) { + _os = os; // use pdf fonts for now, this is only for resolving names org.apache.fop.render.pdf.FontSetup.setup(_fontInfo, null); System.err.println(ALPHA_WARNING); @@ -59,6 +60,7 @@ import java.io.IOException; public void startDocument() throws SAXException { // FIXME sections should be created try { + _rtfFile = new RtfFile(new OutputStreamWriter(_os)); _docArea = _rtfFile.startDocumentArea(); } catch(IOException ioe) { // FIXME could we throw Exception in all StructureHandler events?