vmote       2003/07/02 07:49:39

  Modified:    src/java/org/apache/fop/rtf/rtflib/rtfdoc
                        ParagraphKeeptogetherContext.java RtfAfter.java
                        RtfAfterBeforeBase.java RtfBefore.java
                        RtfJforCmd.java
  Log:
  style changes only, mostly javadoc comments and refactoring of names
  
  Revision  Changes    Path
  1.5       +21 -19    
xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java
  
  Index: ParagraphKeeptogetherContext.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ParagraphKeeptogetherContext.java 30 Jun 2003 17:45:32 -0000      1.4
  +++ ParagraphKeeptogetherContext.java 2 Jul 2003 14:49:39 -0000       1.5
  @@ -67,9 +67,9 @@
   
   public class ParagraphKeeptogetherContext {
   
  -    private static int m_paraKeepTogetherOpen = 0;
  -    private static boolean m_paraResetProperties = false;
  -    private static ParagraphKeeptogetherContext m_instance = null;
  +    private static int paraKeepTogetherOpen = 0;
  +    private static boolean paraResetProperties = false;
  +    private static ParagraphKeeptogetherContext instance = null;
   
       ParagraphKeeptogetherContext() {
       }
  @@ -81,44 +81,46 @@
        * @return The instance of ParagraphKeeptogetherContext
        */
       public static ParagraphKeeptogetherContext getInstance() {
  -        if (m_instance == null) {
  -            m_instance = new ParagraphKeeptogetherContext();
  +        if (instance == null) {
  +            instance = new ParagraphKeeptogetherContext();
           }
  -        return m_instance;
  +        return instance;
       }
   
       /**
        *  @return the level of current "keep whith next" paragraph
        */
       public static int getKeepTogetherOpenValue() {
  -        return m_paraKeepTogetherOpen;
  +        return paraKeepTogetherOpen;
       }
   
  -    /** Open a new "keep whith next" paragraph */
  -    public static void KeepTogetherOpen() {
  -        m_paraKeepTogetherOpen++;
  +    /** Open a new "keep with next" paragraph */
  +    public static void keepTogetherOpen() {
  +        paraKeepTogetherOpen++;
       }
   
  -    /** Close a "keep whith next" paragraph */
  -    public static void KeepTogetherClose() {
  -        if (m_paraKeepTogetherOpen > 0) {
  -            m_paraKeepTogetherOpen--;
  +    /** Close a "keep with next" paragraph */
  +    public static void keepTogetherClose() {
  +        if (paraKeepTogetherOpen > 0) {
  +            paraKeepTogetherOpen--;
   
               //If the \pard control word is not present, the current paragraph
               //inherits all paragraph properties.
               //Also the next paragraph must reset the properties otherwise the 
\keepn don't stop.
  -            m_paraResetProperties = (m_paraKeepTogetherOpen == 0);
  +            paraResetProperties = (paraKeepTogetherOpen == 0);
           }
       }
   
  -    /** Determine if the next paragraph must reset the properites */
  +    /**
  +     * @return true if the next paragraph must reset the properties
  +     */
       public static boolean paragraphResetProperties() {
  -        return m_paraResetProperties;
  +        return paraResetProperties;
       }
   
       /** Reset the flag if the paragraph properties have been resested */
       public static void setParagraphResetPropertiesUsed() {
  -        m_paraResetProperties = false;
  +        paraResetProperties = false;
       }
   
   }
  
  
  
  1.4       +7 -2      xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfter.java
  
  Index: RtfAfter.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RtfAfter.java     30 Jun 2003 17:45:32 -0000      1.3
  +++ RtfAfter.java     2 Jul 2003 14:49:39 -0000       1.4
  @@ -65,6 +65,7 @@
   public class RtfAfter extends RtfAfterBeforeBase {
       /**RtfBefore attributes*/
       public static final String FOOTER = "footer";
  +    /** String array of footer attributes */
       public static final String[] FOOTER_ATTR = new String[]{
           FOOTER
       };
  @@ -73,7 +74,11 @@
           super(parent, w, attrs);
       }
   
  +    /**
  +     *
  +     * @throws IOException for I/O problems
  +     */
       protected void writeMyAttributes() throws IOException {
  -        writeAttributes(m_attrib, FOOTER_ATTR);
  +        writeAttributes(attrib, FOOTER_ATTR);
       }
   }
  
  
  
  1.6       +23 -23    
xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java
  
  Index: RtfAfterBeforeBase.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RtfAfterBeforeBase.java   30 Jun 2003 17:45:32 -0000      1.5
  +++ RtfAfterBeforeBase.java   2 Jul 2003 14:49:39 -0000       1.6
  @@ -71,49 +71,49 @@
   abstract class RtfAfterBeforeBase
   extends RtfContainer
   implements IRtfParagraphContainer, IRtfExternalGraphicContainer, IRtfTableContainer 
{
  -    protected RtfAttributes m_attrib;
  -    private RtfParagraph m_para;
  -    private RtfExternalGraphic m_externalGraphic;
  -    private RtfTable m_table;
  +    protected RtfAttributes attrib;
  +    private RtfParagraph para;
  +    private RtfExternalGraphic externalGraphic;
  +    private RtfTable table;
   
       RtfAfterBeforeBase(RtfSection parent, Writer w, RtfAttributes attrs) throws 
IOException {
           super((RtfContainer)parent, w, attrs);
  -        m_attrib = attrs;
  +        attrib = attrs;
       }
   
       public RtfParagraph newParagraph() throws IOException {
           closeAll();
  -        m_para = new RtfParagraph(this, m_writer);
  -        return m_para;
  +        para = new RtfParagraph(this, m_writer);
  +        return para;
       }
   
       public RtfParagraph newParagraph(RtfAttributes attrs) throws IOException {
           closeAll();
  -        m_para = new RtfParagraph(this, m_writer, attrs);
  -        return m_para;
  +        para = new RtfParagraph(this, m_writer, attrs);
  +        return para;
       }
   
       public RtfExternalGraphic newImage() throws IOException {
           closeAll();
  -        m_externalGraphic = new RtfExternalGraphic(this, m_writer);
  -        return m_externalGraphic;
  +        externalGraphic = new RtfExternalGraphic(this, m_writer);
  +        return externalGraphic;
       }
   
       private void closeCurrentParagraph() throws IOException {
  -        if (m_para != null) {
  -            m_para.close();
  +        if (para != null) {
  +            para.close();
           }
       }
   
       private void closeCurrentExternalGraphic() throws IOException {
  -        if (m_externalGraphic != null) {
  -            m_externalGraphic.close();
  +        if (externalGraphic != null) {
  +            externalGraphic.close();
           }
       }
   
       private void closeCurrentTable() throws IOException {
  -        if (m_table != null) {
  -            m_table.close();
  +        if (table != null) {
  +            table.close();
           }
       }
   
  @@ -130,7 +130,7 @@
       }
   
       public RtfAttributes getAttributes() {
  -        return m_attrib;
  +        return attrib;
       }
   
       public void closeAll() throws IOException {
  @@ -145,14 +145,14 @@
        */
       public RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws 
IOException {
           closeAll();
  -        m_table = new RtfTable(this, m_writer, attrs, tc);
  -        return m_table;
  +        table = new RtfTable(this, m_writer, attrs, tc);
  +        return table;
       }
   
       /** close current table if any and start a new one  */
       public RtfTable newTable(ITableColumnsInfo tc) throws IOException {
           closeAll();
  -        m_table = new RtfTable(this, m_writer, tc);
  -        return m_table;
  +        table = new RtfTable(this, m_writer, tc);
  +        return table;
       }
   }
  
  
  
  1.4       +2 -2      xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfBefore.java
  
  Index: RtfBefore.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfBefore.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RtfBefore.java    30 Jun 2003 06:10:05 -0000      1.3
  +++ RtfBefore.java    2 Jul 2003 14:49:39 -0000       1.4
  @@ -75,6 +75,6 @@
       }
   
       protected void writeMyAttributes() throws IOException {
  -        writeAttributes(m_attrib, HEADER_ATTR);
  +        writeAttributes(attrib, HEADER_ATTR);
       }
   }
  
  
  
  1.6       +3 -3      
xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfJforCmd.java
  
  Index: RtfJforCmd.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfJforCmd.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RtfJforCmd.java   30 Jun 2003 06:10:05 -0000      1.5
  +++ RtfJforCmd.java   2 Jul 2003 14:49:39 -0000       1.6
  @@ -99,9 +99,9 @@
               final String cmd = (String)it.next();
   
               if (cmd.equals(PARA_KEEP_ON)) {
  -                m_paragraphKeeptogetherContext.KeepTogetherOpen();
  +                m_paragraphKeeptogetherContext.keepTogetherOpen();
               } else if (cmd.equals(PARA_KEEP_OFF)) {
  -                  m_paragraphKeeptogetherContext.KeepTogetherClose();
  +                  m_paragraphKeeptogetherContext.keepTogetherClose();
               } else {
   //                this.getRtfFile ().getLog ().logInfo
   //                        ("JFOR-CMD ignored, command not recognised:"+cmd);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to