From: William Victor Mote Date: Wed, 2 Jul 2003 14:49:39 +0000 (+0000) Subject: style changes only, mostly javadoc comments and refactoring of names X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1365 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=df2f1f0592976e87aa0364cfeb12f4bcfe87ff6f;p=xmlgraphics-fop.git style changes only, mostly javadoc comments and refactoring of names git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196557 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java index 28fdc68bd..b08981253 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java @@ -67,9 +67,9 @@ package org.apache.fop.rtf.rtflib.rtfdoc; 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 @@ public class ParagraphKeeptogetherContext { * @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; } } diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfter.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfter.java index facfc8c1b..f1fc0965f 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfter.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfter.java @@ -65,6 +65,7 @@ import java.io.IOException; 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 @@ public class RtfAfter extends RtfAfterBeforeBase { super(parent, w, attrs); } + /** + * + * @throws IOException for I/O problems + */ protected void writeMyAttributes() throws IOException { - writeAttributes(m_attrib, FOOTER_ATTR); + writeAttributes(attrib, FOOTER_ATTR); } } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java index 142507216..57ea7d58a 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java @@ -71,49 +71,49 @@ import org.apache.fop.rtf.rtflib.interfaces.ITableColumnsInfo; 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 @@ implements IRtfParagraphContainer, IRtfExternalGraphicContainer, IRtfTableContai } public RtfAttributes getAttributes() { - return m_attrib; + return attrib; } public void closeAll() throws IOException { @@ -145,14 +145,14 @@ implements IRtfParagraphContainer, IRtfExternalGraphicContainer, IRtfTableContai */ 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; } } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfBefore.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfBefore.java index 2fca7cde6..072d7c027 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfBefore.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfBefore.java @@ -75,6 +75,6 @@ public class RtfBefore extends RtfAfterBeforeBase { } protected void writeMyAttributes() throws IOException { - writeAttributes(m_attrib, HEADER_ATTR); + writeAttributes(attrib, HEADER_ATTR); } } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfJforCmd.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfJforCmd.java index 19ff483db..15346147a 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfJforCmd.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfJforCmd.java @@ -99,9 +99,9 @@ public class RtfJforCmd extends RtfContainer { 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);