You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2004/10/01 11:03:24 UTC

cvs commit: xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc RtfGenerator.java RtfHeader.java

jeremias    2004/10/01 02:03:24

  Modified:    src/java/org/apache/fop/render/rtf/rtflib/rtfdoc
                        RtfHeader.java
  Added:       src/java/org/apache/fop/render/rtf/rtflib/rtfdoc
                        RtfGenerator.java
  Log:
  Add support for the generator element which identifies the generating application (just to start finding my way into RTF).
  
  Revision  Changes    Path
  1.4       +3 -1      xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfHeader.java
  
  Index: RtfHeader.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfHeader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RtfHeader.java	27 Feb 2004 17:54:01 -0000	1.3
  +++ RtfHeader.java	1 Oct 2004 09:03:24 -0000	1.4
  @@ -47,6 +47,7 @@
       RtfHeader(RtfFile f, Writer w) throws IOException {
           super(f, w);
           new RtfFontTable(this, w);
  +        new RtfGenerator(this, w);
   //        m_userProperties.put("jforVersion",JForVersionInfo.getLongVersionInfo());
       }
   
  @@ -59,6 +60,7 @@
           RtfTemplate.getInstance().writeTemplate(this);
           RtfStyleSheetTable.getInstance().writeStyleSheet(this);
           writeFootnoteProperties();
  +        
       }
   
       /** write user properties if any */
  
  
  
  1.1                  xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfGenerator.java
  
  Index: RtfGenerator.java
  ===================================================================
  /*
   * Copyright 2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  /* $Id: RtfGenerator.java,v 1.1 2004/10/01 09:03:24 jeremias Exp $ */
  
  package org.apache.fop.render.rtf.rtflib.rtfdoc;
  
  import java.io.IOException;
  import java.io.Writer;
  
  import org.apache.fop.apps.Fop;
  
  /**
   * Represents a generator element which says who generated the RTF document.
   */
  public class RtfGenerator extends RtfElement {
  
      /** Default constructor for the generator element. */
      public RtfGenerator(RtfHeader h, Writer w) throws IOException {
          super(h, w);
      }
      
      /**
       * @see org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement#writeRtfContent()
       */
      protected void writeRtfContent() throws IOException {
          parent.writeGroupMark(true);
          parent.writeStarControlWord("generator");
          parent.writer.write("Apache FOP ");
          parent.writer.write(Fop.getVersion());
          parent.writer.write(";");
          parent.writeGroupMark(false);
      }
  
      /**
       * @see org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement#isEmpty()
       */
      public boolean isEmpty() {
          return false;
      }
  
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org