diff options
Diffstat (limited to 'xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc')
16 files changed, 697 insertions, 842 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java index fd47549359a1..2b1a48f7d657 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java @@ -34,27 +34,29 @@ import org.w3c.dom.NodeList; */ public class BookSettings implements OfficeConstants { - /** A w3c <code>Document</code>. */ + /** A w3c {@code Document}. */ private org.w3c.dom.Document settings = null; - private boolean hasColumnRowHeaders = true; - private String activeSheet = ""; - private ArrayList<SheetSettings> worksheetSettings = new ArrayList<SheetSettings>(); + private boolean hasColumnRowHeaders = true; + private String activeSheet = ""; + private ArrayList<SheetSettings> worksheetSettings + = new ArrayList<SheetSettings>(); /** - * Constructor for a <code>BookSettings</code>. Reads document settings - * from xml and inits SheetSettings variables. + * Constructor for a {@code BookSettings}. * - * @param root The root XML node to read from. + * <p>Reads document settings from xml and inits SheetSettings variables.</p> + * + * @param root The root XML node to read from. */ public BookSettings(Node root) { readNode(root); } /** - * Constructor for a <code>BookSettings</code> + * Constructor for a {@code BookSettings}. * - * @param worksheetSettings If it's a row the height, a column the width + * @param worksheetSettings If it's a row the height, a column the width */ public BookSettings(ArrayList<SheetSettings> worksheetSettings) { this.worksheetSettings = worksheetSettings; @@ -63,52 +65,49 @@ public class BookSettings implements OfficeConstants { /** * Set the flag indicating whether we have row/column headers. * - * @param hasColumnRowHeaders Flag to enable or disable headers. + * @param hasColumnRowHeaders Flag to enable or disable headers. */ public void setColumnRowHeaders(boolean hasColumnRowHeaders) { this.hasColumnRowHeaders = hasColumnRowHeaders; } - - /** - * Gets the <code>Vector</code> of <code>SheetSettings</code> + * Gets the {@code Vector} of {@code SheetSettings}. * - * @return <code>Vector</code> of <code>SheetSettings</code> + * @return {@code Vector} of {@code SheetSettings} */ public ArrayList<SheetSettings> getSheetSettings() { return worksheetSettings; } /** - * Gets the active sheet name + * Gets the active sheet name. * * @return the active sheet name */ public String getActiveSheet() { - return activeSheet; } /** - * Sets the active sheet name + * Sets the active sheet name. * - * @param activeSheet the active sheet name + * @param activeSheet the active sheet name. */ public void setActiveSheet(String activeSheet) { - this.activeSheet = activeSheet; } /** - * Adds an XML entry for a particular setting + * Adds an XML entry for a particular setting. * - * @param root the root node at which to add the xml entry - * @param attribute the name of the attribute to add - * @param type the attribute type (int, short etc) - * @param value the value of the attribute + * @param root the root node at which to add the xml entry. + * @param attribute the name of the attribute to add. + * @param type the attribute type ({@code int}, {@code short} etc). + * @param value the value of the attribute. */ - private void addConfigItem(Node root, String attribute, String type, String value) { + private void addConfigItem(Node root, String attribute, String type, + String value) { Element configItem = settings.createElement(TAG_CONFIG_ITEM); configItem.setAttribute(ATTRIBUTE_CONFIG_NAME, attribute); @@ -120,10 +119,10 @@ public class BookSettings implements OfficeConstants { } /** - * Writes out a settings.xml entry for this BookSettings object + * Writes out a settings.xml entry for this {@code BookSettings} object. * - * @param settings a <code>Document</code> object representing the settings.xml - * @param root the root xml node to add to + * @param settings a {@code Document} object representing the settings.xml + * @param root the root xml node to add to. */ public void writeNode(org.w3c.dom.Document settings, Node root) { @@ -140,13 +139,12 @@ public class BookSettings implements OfficeConstants { } /** - * Sets a variable based on a String value read from XML + * Sets a variable based on a {@code String} value read from XML. * - * @param name xml name of the attribute to set - * @param value String value fo the attribute + * @param name xml name of the attribute to set. + * @param value {@code String} value for the attribute. */ private void addAttribute(String name, String value) { - if(name.equals("ActiveTable")) { activeSheet = value; } else if(name.equals("HasColumnRowHeaders")) { @@ -156,9 +154,9 @@ public class BookSettings implements OfficeConstants { } /** - * Reads document settings from xml and inits SheetSettings variables + * Reads document settings from xml and inits {@code SheetSettings} variables. * - * @param root XML Node to read from + * @param root XML {@code Node} to read from. */ private void readNode(Node root) { @@ -208,4 +206,4 @@ public class BookSettings implements OfficeConstants { } } } -} +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java index 434912c6159d..1e319f4d7da3 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java @@ -30,20 +30,20 @@ import org.openoffice.xmerge.converter.xml.StyleCatalog; import org.openoffice.xmerge.util.Debug; /** - * Represents a text <code>Style</code> in an OpenOffice document. + * Represents a text {@code Style} in an OpenOffice document. */ public class CellStyle extends Style implements Cloneable { private Format fmt = new Format(); /** - * Constructor for use when going from DOM to client device format. + * Constructor for use when going from DOM to client device format. * - * @param node The <i>style:style</i> <code>Node</code> containing - * the <code>Style</code>. (This <code>Node</code> is - * assumed have a <i>family</i> attribute of <i>text</i>). - * @param sc The <code>StyleCatalog</code>, which is used for - * looking up ancestor <code>Style</code> objects. + * @param node The <i>style:style</i> {@code Node} containing the + * {@code Style}. (This {@code Node} is assumed have a + * <i>family</i> attribute of <i>text</i>). + * @param sc The {@code StyleCatalog}, which is used for looking up + * ancestor {@code Style} objects. */ public CellStyle(Node node, StyleCatalog sc) { super(node, sc); @@ -83,39 +83,39 @@ public class CellStyle extends Style implements Cloneable { } } - /** - * Constructor for use when going from client device format to DOM + * Constructor for use when going from client device format to DOM. * - * @param name Name of cell <code>Style</code>. Can be null. - * @param family Family of text <code>Style</code> (usually - * <i>text</i>). Can be null. - * @param parent Name of parent text <code>Style</code>, or null - * for none. - * @param fmt size in points. - * @param sc The <code>StyleCatalog</code>, which is used for - * looking up ancestor <code>Style</code> objects. + * @param name Name of cell {@code Style}. Can be {@code null}. + * @param family Family of text {@code Style} (usually <i>text</i>). Can + * be {@code null}. + * @param parent Name of parent text {@code Style}, or {@code null} for + * none. + * @param fmt size in points. + * @param sc The {@code StyleCatalog}, which is used for looking up + * ancestor {@code Style} objects. */ - public CellStyle(String name, String family, String parent,Format fmt, StyleCatalog sc) { + public CellStyle(String name, String family, String parent,Format fmt, + StyleCatalog sc) { super(name, family, parent, sc); this.fmt = fmt; } /** - * Returns the <code>Format</code> object for this particular style + * Returns the {@code Format} object for this particular style. * - * @return the <code>Format</code> object + * @return the {@code Format} object */ public Format getFormat() { return fmt; } /** - * Parse a color specification of the form <i>#rrggbb</i> + * Parse a color specification of the form <i>{@literal #rrggbb}</i>. * - * @param value <code>Color</code> specification to parse. + * @param value {@code Color} specification to parse. * - * @return The <code>Color</code> associated the value. + * @return The {@code Color} associated the value. */ private Color parseColorString(String value) { // Assume color value is of form #rrggbb @@ -135,12 +135,11 @@ public class CellStyle extends Style implements Cloneable { return new Color(red, green, blue, 0); } - /** - * Set an attribute. + * Set an attribute. * - * @param attr The attribute to set. - * @param value The attribute value to set. + * @param attr The attribute to set. + * @param value The attribute value to set. */ private void handleAttribute(String attr, String value) { @@ -252,16 +251,14 @@ public class CellStyle extends Style implements Cloneable { } } - /** - * Return a <code>Style</code> object corresponding to this one, - * but with all of the inherited information from parent - * <code>Style</code> objects filled in. The object returned will - * be a new object, not a reference to this object, even if it does - * not need any information added. + * Return a {@code Style} object corresponding to this one, but with all of + * the inherited information from parent {@code Style} objects filled in. * - * @return The <code>StyleCatalog</code> in which to look up - * ancestors. + * <p>The object returned will be a new object, not a reference to this + * object, even if it does not need any information added.</p> + * + * @return The {@code StyleCatalog} in which to look up ancestors. */ @Override public Style getResolved() { @@ -321,17 +318,15 @@ public class CellStyle extends Style implements Cloneable { return resolved; } - /** - * Create a new <code>Node</code> in the <code>Document</code>, and - * write this <code>Style</code> to it. + * Create a new {@code Node} in the {@code Document}, and write this + * {@code Style} to it. * - * @param parentDoc Parent <code>Document</code> of the - * <code>Node</code> to create. - * @param name Name to use for the new <code>Node</code> (e.g. - * <i>style:style</i>) + * @param parentDoc Parent {@code Document} of the {@code Node} to create. + * @param name Name to use for the new {@code Node} (e.g. + * <i>style:style</i>) * - * @return Created <code>Node</code>. + * @return Created {@code Node}. */ @Override public Node createNode(org.w3c.dom.Document parentDoc, String name) { @@ -340,16 +335,14 @@ public class CellStyle extends Style implements Cloneable { return node; } - /** - * Return true if <code>style</code> specifies as much or less - * than this <code>Style</code>, and nothing it specifies - * contradicts this <code>Style</code>. + * Return {@code true} if {@code style} specifies as much or less than this + * {@code Style}, and nothing it specifies contradicts this {@code Style}. * - * @param style The <code>Style</code> to check. + * @param style The {@code Style} to check. * - * @return true if <code>style</code> is a subset, false - * otherwise. + * @return {@code true} if {@code style} is a subset, {@code false} + * otherwise. */ @Override public boolean isSubset(Style style) { @@ -365,13 +358,11 @@ public class CellStyle extends Style implements Cloneable { return true; } - /** - * Write this <code>Style</code> object's attributes to a - * <code>Node</code> in the <code>Document</code>. + * Write this {@code Style} object's attributes to a {@code Node} in the + * {@code Document}. * - * @param node The <code>Node</code> to add <code>Style</code> - * attributes. + * @param node The {@code Node} to add {@code Style} attributes. */ private void writeAttributes(Element node) { @@ -442,14 +433,12 @@ public class CellStyle extends Style implements Cloneable { } - /** - * Given a <code>Color</code>, return a string of the form - * <i>#rrggbb</i>. + * Given a {@code Color}, return a string of the form <i>{@literal #rrggbb}</i>. * - * @param c The <code>Color</code> value. + * @param c The {@code Color} value. * - * @return The <code>Color</code> value in the form <i>#rrggbb</i>. + * @return The {@code Color} value in the form <i>{@literal #rrggbb}</i>. */ private String buildColorString(Color c) { int v[] = new int[3]; @@ -466,7 +455,6 @@ public class CellStyle extends Style implements Cloneable { return colorString; } - private static String[] ignored = { "style:text-autospace", "style:text-underline-color", "fo:margin-left", "fo:margin-right", "fo:text-indent", @@ -480,15 +468,13 @@ public class CellStyle extends Style implements Cloneable { "style:line-break", "fo:keep-with-next" }; - - /* - * This code checks whether an attribute is one that we - * intentionally ignore. + /** + * This code checks whether an attribute is one that we intentionally ignore. * - * @param attribute The attribute to check. + * @param attribute The attribute to check. * - * @return true if <code>attribute</code> can be ignored, - * otherwise false. + * @return {@code true} if {@code attribute} can be ignored, otherwise + * {@code false}. */ private boolean isIgnored(String attribute) { for (int i = 0; i < ignored.length; i++) { @@ -497,5 +483,4 @@ public class CellStyle extends Style implements Cloneable { } return false; } -} - +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java index 2577096ce038..d8e2caea05b4 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java @@ -19,9 +19,10 @@ package org.openoffice.xmerge.converter.xml.sxc; /** - * This is a class to define a table-column structure. This can then be - * used by plugins to write or read their own column types. + * This is a class to define a table-column structure. * + * <p>This can then be used by plug-ins to write or read their own column types. + * </p> */ public class ColumnRowInfo { @@ -38,9 +39,9 @@ public class ColumnRowInfo { private Format fmt = new Format(); /** - * Constructor for a <code>ColumnRowInfo</code> + * Constructor for a {@code ColumnRowInfo}. * - * @param type whether ROW or COLUMN record . + * @param type whether {@code ROW} or {@code COLUMN} record. */ public ColumnRowInfo(int type) { @@ -48,11 +49,11 @@ public class ColumnRowInfo { } /** - * Constructor for a <code>ColumnRowInfo</code> + * Constructor for a {@code ColumnRowInfo}. * - * @param dimension if it's a row the height, a column the width. - * @param repeated how many times it is repeated. - * @param type whether ROW or COLUMN record. + * @param dimension if it's a row the height, a column the width. + * @param repeated how many times it is repeated. + * @param type whether {@code ROW} or {@code COLUMN} record. */ private ColumnRowInfo(int dimension, int repeated, int type) { @@ -62,13 +63,12 @@ public class ColumnRowInfo { } /** - * Constructor for a <code>ColumnRowInfo</code> that includes userDefined - * field. + * Constructor for a {@code ColumnRowInfo} that includes userDefined field. * - * @param dimension if it's a row the height, a column the width. - * @param repeated how many times it is repeated. - * @param type whether ROW or COLUMN record. - * @param userDefined whether the record is manually set. + * @param dimension if it's a row the height, a column the width. + * @param repeated how many times it is repeated. + * @param type whether {@code ROW} or {@code COLUMN} record. + * @param userDefined whether the record is manually set. */ public ColumnRowInfo(int dimension, int repeated, int type, boolean userDefined) { @@ -87,9 +87,9 @@ public class ColumnRowInfo { } /** - * Get the current format. + * Get the current {@code Format}. * - * @return The current format. + * @return The current {@code Format}. */ public Format getFormat() { @@ -137,9 +137,9 @@ public class ColumnRowInfo { } /** - * Does this <code>ColumnRowInfo</code> represent a row? + * Does this {@code ColumnRowInfo} represent a row? * - * @return True if a row, false if not. + * @return {@code true} if a row, {@code false} if not. */ public boolean isRow() { @@ -147,9 +147,9 @@ public class ColumnRowInfo { } /** - * Does this <code>ColumnRowInfo</code> represent a column? + * Does this {@code ColumnRowInfo} represent a column? * - * @return True if a column, false if not. + * @return {@code true} if a column, {@code false} if not. */ public boolean isColumn() { @@ -157,9 +157,9 @@ public class ColumnRowInfo { } /** - * Test if the row height as been set manually + * Test if the row height as been set manually. * - * @return true if user defined otherwise false + * @return {@code true} if user defined otherwise {@code false}. */ public boolean isUserDefined() { @@ -167,9 +167,9 @@ public class ColumnRowInfo { } /** - * Test if the row height is default + * Test if the row height is default. * - * @return true if default otherwise false + * @return {@code true} if default otherwise {@code false}. */ public boolean isDefaultSize() { diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java index 0adb79bd46c2..d2ce990d554b 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java @@ -29,19 +29,19 @@ import org.openoffice.xmerge.util.Debug; import org.openoffice.xmerge.util.TwipsConverter; /** - * Represents a text <code>Style</code> in an OpenOffice document. + * Represents a text {@code Style} in an OpenOffice document. */ public class ColumnStyle extends Style implements Cloneable { private int colWidth = 0; /** - * Constructor for use when going from DOM to client device format. + * Constructor for use when going from DOM to client device format. * - * @param node The <i>style:style</i> <code>Node</code> containing - * the <code>Style</code>. (This <code>Node</code> is - * assumed have a <i>family</i> attribute of <i>text</i>). - * @param sc The <code>StyleCatalog</code>, which is used for - * looking up ancestor <code>Style</code> objects. + * @param node The <i>style:style</i> {@code Node} containing the + * {@code Style}. (This {@code Node} is assumed have a + * <i>family</i> attribute of <i>text</i>). + * @param sc The {@code StyleCatalog}, which is used for looking up + * ancestor {@code Style} objects. */ public ColumnStyle(Node node, StyleCatalog sc) { super(node, sc); @@ -82,16 +82,16 @@ public class ColumnStyle extends Style implements Cloneable { } /** - * Constructor for use when going from client device format to DOM + * Constructor for use when going from client device format to DOM. * - * @param name Name of text <code>Style</code>. Can be null. - * @param family Family of text <code>Style</code> (usually - * <i>text</i>). Can be null. - * @param parent Name of parent text <code>Style</code>, or null - * for none. - * @param colWidth the width of this column - * @param sc The <code>StyleCatalog</code>, which is used for - * looking up ancestor <code>Style</code> objects. + * @param name Name of text {@code Style}. Can be {@code null}. + * @param family Family of text {@code Style} (usually <i>text</i>). + * Can be {@code null}. + * @param parent Name of parent text {@code Style}, or {@code null} for + * none. + * @param colWidth the width of this column. + * @param sc The {@code StyleCatalog}, which is used for looking up + * ancestor {@code Style} objects. */ public ColumnStyle(String name, String family, String parent, int colWidth, StyleCatalog sc) { super(name, family, parent, sc); @@ -99,7 +99,7 @@ public class ColumnStyle extends Style implements Cloneable { } /** - * Returns the width of this column + * Returns the width of this column. * * @return The width of this column. */ @@ -108,7 +108,7 @@ public class ColumnStyle extends Style implements Cloneable { } /** - * Sets the width of this column + * Sets the width of this column. * * @param colWidth The width of this column. */ @@ -118,11 +118,11 @@ public class ColumnStyle extends Style implements Cloneable { } /** - * Parse a colwidth in the form "1.234cm" to twips + * Parse a colwidth in the form {@literal "1.234cm"} to twips. * - * @param value <code>String</code> specification to parse. + * @param value {@code String} specification to parse. * - * @return The twips equivalent. + * @return The twips equivalent. */ private int parseColWidth(String value) { @@ -140,10 +140,10 @@ public class ColumnStyle extends Style implements Cloneable { } /** - * Set an attribute. + * Set an attribute. * - * @param attr The attribute to set. - * @param value The attribute value to set. + * @param attr The attribute to set. + * @param value The attribute value to set. */ private void handleAttribute(String attr, String value) { @@ -156,14 +156,13 @@ public class ColumnStyle extends Style implements Cloneable { } /** - * Return a <code>Style</code> object corresponding to this one, - * but with all of the inherited information from parent - * <code>Style</code> objects filled in. The object returned will - * be a new object, not a reference to this object, even if it does - * not need any information added. + * Return a {@code Style} object corresponding to this one, but with all of + * the inherited information from parent {@code Style} objects filled in. * - * @return The <code>Style</code> in which to look up - * ancestors. + * <p>The object returned will be a new object, not a reference to this + * object, even if it does not need any information added.</p> + * + * @return The {@code Style} in which to look up ancestors. */ @Override public Style getResolved() { @@ -206,15 +205,14 @@ public class ColumnStyle extends Style implements Cloneable { } /** - * Create a new <code>Node</code> in the <code>Document</code>, and - * write this <code>Style</code> to it. + * Create a new {@code Node} in the <code>Document</code>, and write this + * {@code Style} to it. * - * @param parentDoc Parent <code>Document</code> of the - * <code>Node</code> to create. - * @param name Name to use for the new <code>Node</code> (e.g. - * <i>style:style</i>) + * @param parentDoc Parent {@code Document} of the {@code Node} to create. + * @param name Name to use for the new {@code Node} (e.g. + * <i>style:style</i>) * - * @return Created <code>Node</code>. + * @return Created {@code Node}. */ @Override public Node createNode(org.w3c.dom.Document parentDoc, String name) { @@ -224,14 +222,13 @@ public class ColumnStyle extends Style implements Cloneable { } /** - * Return true if <code>style</code> specifies as much or less - * than this <code>Style</code>, and nothing it specifies - * contradicts this <code>Style</code>. + * Return {@code true} if {@code style} specifies as much or less than this + * {@code Style}, and nothing it specifies contradicts this {@code Style}. * - * @param style The <code>Style</code> to check. + * @param style The {@code Style} to check. * - * @return true if <code>style</code> is a subset, false - * otherwise. + * @return {@code true} if <code>style</code> is a subset, {@code false} + * otherwise. */ @Override public boolean isSubset(Style style) { @@ -246,11 +243,10 @@ public class ColumnStyle extends Style implements Cloneable { } /** - * Write this <code>Style</code> object's attributes to a - * <code>Node</code> in the <code>Document</code>. + * Write this {@code Style} object's attributes to a {@code Node} in the + * {@code Document}. * - * @param node The <code>Node</code> to add <code>Style</code> - * attributes. + * @param node The {@code Node} to add {@code Style} attributes. */ private void writeAttributes(Element node) { @@ -259,5 +255,4 @@ public class ColumnStyle extends Style implements Cloneable { node.setAttribute("style:column-width", width); } } - -} +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java index ef427c8bc35c..04eebc081663 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java @@ -39,14 +39,12 @@ import org.openoffice.xmerge.merger.MergeAlgorithm; import org.openoffice.xmerge.util.XmlUtil; import org.openoffice.xmerge.util.Debug; - /** - * Generic small device implementation of <code>DocumentMerger</code> for - * the {@link - * org.openoffice.xmerge.converter.xml.sxc.SxcPluginFactory - * SxcPluginFactory}. + * Generic small device implementation of {@code DocumentMerger} for + * the {@link org.openoffice.xmerge.converter.xml.sxc.SxcPluginFactory + * SxcPluginFactory}. * - * <p>Used with SXC <code>Document</code> objects.</p> + * <p>Used with SXC {@code Document} objects.</p> */ public class DocumentMergerImpl implements DocumentMerger { @@ -54,13 +52,13 @@ public class DocumentMergerImpl implements DocumentMerger { private org.openoffice.xmerge.Document orig = null; /** - * Constructor + * Constructor. * - * @param doc The original "Office" <code>Document</code> - * to merge. - * @param cc The <code>ConverterCapabilities</code>. + * @param doc The original "Office" {@code Document} to merge. + * @param cc The {@code ConverterCapabilities}. */ - public DocumentMergerImpl(org.openoffice.xmerge.Document doc, ConverterCapabilities cc) { + public DocumentMergerImpl(org.openoffice.xmerge.Document doc, + ConverterCapabilities cc) { cc_ = cc; this.orig = doc; } @@ -121,8 +119,8 @@ public class DocumentMergerImpl implements DocumentMerger { numOfWorkSheet = workSheetList2.getLength(); - // for those workSheet from target don't have a matching one - // in the original workSheet list, we add it + // for those workSheet from target don't have a matching one in the + // original workSheet list, we add it // find out the office body node first NodeList officeBodyList = @@ -135,12 +133,9 @@ public class DocumentMergerImpl implements DocumentMerger { Node workSheet= workSheetList2.item(j); // try to match the workSheet - Node matchingWorkSheet = matchWorkSheet(workSheet, workSheetList1); - // add the new WorkSheet to the original document iff match not - // found - + // add the new WorkSheet to the original document iff match not found if (matchingWorkSheet == null) { Node cloneNode = XmlUtil.deepClone(officeBody, workSheet); officeBody.appendChild(cloneNode); @@ -149,13 +144,13 @@ public class DocumentMergerImpl implements DocumentMerger { } /** - * Try to find a WorkSheet from the modified WorkSheetList that - * has a matching table name from the original WorkSheet. + * Try to find a WorkSheet from the modified WorkSheetList that has a + * matching table name from the original WorkSheet. * - * @param orgSheet The original WorkSheet. - * @param modSheetList The modified WorkSheet. + * @param orgSheet The original WorkSheet. + * @param modSheetList The modified WorkSheet. * - * @return The Node in modSheetList that matches the orgSheet. + * @return The {@code Node} in modSheetList that matches the {@code orgSheet}. */ private Node matchWorkSheet(Node orgSheet, NodeList modSheetList) { @@ -185,5 +180,4 @@ public class DocumentMergerImpl implements DocumentMerger { return matchSheet; } -} - +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java index 8be897c47e9e..f6d6cf22a000 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java @@ -21,34 +21,32 @@ package org.openoffice.xmerge.converter.xml.sxc; import java.awt.Color; /** - * This class specifies the format for a given spreadsheet cell. - * + * This class specifies the format for a given spreadsheet cell. */ public class Format implements Cloneable { - /** Horizontal Alignment Constants. */ + /** Horizontal Alignment Constants. */ final public static int RIGHT_ALIGN = 0x01; final public static int CENTER_ALIGN = 0x02; final public static int LEFT_ALIGN = 0x03; - - /** Vertical Alignment Constants. */ + /** Vertical Alignment Constants. */ final public static int TOP_ALIGN = 0x01; final public static int MIDDLE_ALIGN = 0x02; final public static int BOTTOM_ALIGN = 0x03; /** Indicates <i>bold</i> text. */ - final public static int BOLD = 0x01; + final public static int BOLD = 0x01; /** Indicates <i>italic</i> text. */ - final public static int ITALIC = 0x02; + final public static int ITALIC = 0x02; /** Indicates <i>underlined</i> text. */ - final public static int UNDERLINE = 0x04; + final public static int UNDERLINE = 0x04; /** Indicates <i>strike-through</i> in the text. */ - final public static int STRIKETHRU = 0x08; + final public static int STRIKETHRU = 0x08; /** Indicates <i>superscripted</i> text. */ - final public static int SUPERSCRIPT = 0x10; + final public static int SUPERSCRIPT = 0x10; /** Indicates <i>subscripted</i> text. */ - final public static int SUBSCRIPT = 0x20; + final public static int SUBSCRIPT = 0x20; final public static int LEFT_BORDER = 0x40; final public static int RIGHT_BORDER = 0x80; @@ -77,19 +75,19 @@ public class Format implements Cloneable { private int mask = 0; /** - * Constructor for creating a new <code>Format</code>. + * Constructor for creating a new {@code Format}. */ public Format() { clearFormatting(); } /** - * Constructor that creates a new <code>Format</code> object - * by setting all the format attributes. + * Constructor that creates a new {@code Format} object by setting all the + * format attributes. * - * @param attributes Attributes flags (alignment, bold, etc.) - * @param fontSize Size of the font in points. - * @param fontName Name of the font to use. + * @param attributes Attributes flags (alignment, bold, etc.) + * @param fontSize Size of the font in points. + * @param fontName Name of the font to use. */ public Format(int attributes, int fontSize, String fontName) { @@ -99,10 +97,10 @@ public class Format implements Cloneable { } /** - * Constructor for creating a new <code>Format</code> object - * based on an existing one. + * Constructor for creating a new {@code Format} object based on an existing + * one. * - * @param fmt <code>Format</code> to copy. + * @param fmt {@code Format} to copy. */ public Format(Format fmt) { category = fmt.getCategory(); @@ -122,7 +120,7 @@ public class Format implements Cloneable { } /** - * Reset this <code>Format</code> description. + * Reset this {@code Format} description. */ public void clearFormatting() { category = ""; @@ -140,10 +138,10 @@ public class Format implements Cloneable { } /** - * Set one or more text attributes. + * Set one or more text attributes. * - * @param flags Flag attributes to set. - * @param toggle True to set flags, false to clear them. + * @param flags Flag attributes to set. + * @param toggle {@code true} to set flags, {@code false} to clear them. */ public void setAttribute(int flags, boolean toggle) { mask |= flags; @@ -155,13 +153,13 @@ public class Format implements Cloneable { } /** - * Return true if the <code>attribute</code> is set to <i>on</i> + * Return {@code true} if the {@code attribute} is set to <i>on</i>. * - * @param attribute Attribute to check ({@link #BOLD}, - * {@link #ITALIC}, etc.) + * @param attribute Attribute to check ({@link #BOLD}, {@link #ITALIC}, + * etc.). * - * @return true if <code>attribute</code> is set to <i>on</i>, - * otherwise false. + * @return {@code true} if {@code attribute} is set to <i>on</i>, otherwise + * {@code false}. */ public boolean getAttribute(int attribute) { if ((mask & attribute) == 0) @@ -169,145 +167,144 @@ public class Format implements Cloneable { return (!((attributes & attribute) == 0)); } - - /** - * Set the formatting category of this object, ie number, date, - * currency.The <code>OfficeConstants</code> class contains string - * constants for the category types. + * Set the formatting category of this object, ie number, date, currency. + * + * <p>The <code>OfficeConstants</code> class contains string constants for + * the category types.</p> * - * @see org.openoffice.xmerge.converter.xml.OfficeConstants + * @see org.openoffice.xmerge.converter.xml.OfficeConstants * - * @param newCategory The name of the category to be set. + * @param newCategory The name of the category to be set. */ public void setCategory(String newCategory) { category = newCategory; } /** - * Return the formatting category of the object. + * Return the formatting category of the object. * - * @see org.openoffice.xmerge.converter.xml.OfficeConstants + * @see org.openoffice.xmerge.converter.xml.OfficeConstants * - * @return The formatting category of the object. + * @return The formatting category of the object. */ public String getCategory() { return category; } /** - * In the case of Formula returns the value of the formula. + * In the case of Formula returns the value of the formula. * - * @return The value of the formula + * @return The value of the formula. */ public String getValue() { return value; } - /** - * In the case of formula the contents are set as the formula string and - * the value of the formula is a formatting attribute. + /** + * In the case of formula the contents are set as the formula string and + * the value of the formula is a formatting attribute. * - * @param newValue the formuala value + * @param newValue the formula value. */ public void setValue(String newValue) { value = newValue; } /** - * Set the <code>Format</code> specifier for this category. + * Set the {@code Format} specifier for this category. * - * @param formatString The new <code>Format</code> specifier. + * @param formatString The new {@code Format} specifier. */ public void setFormatSpecifier(String formatString) { formatSpecifier = formatString; } /** - * Get the <code>Format</code> specifier for this category. + * Get the {@code Format} specifier for this category. * - * @return <code>Format</code> specifier for this category. + * @return {@code Format} specifier for this category. */ public String getFormatSpecifier() { return formatSpecifier; } /** - * Set the precision of the number to be displayed. + * Set the precision of the number to be displayed. * - * @param precision The number of decimal places to display. + * @param precision The number of decimal places to display. */ public void setDecimalPlaces(int precision) { decimalPlaces = precision; } /** - * Get the number of decimal places displayed. + * Get the number of decimal places displayed. * - * @return Number of decimal places. + * @return Number of decimal places. */ public int getDecimalPlaces() { return decimalPlaces; } /** - * Set the font used for this cell. + * Set the font used for this cell. * - * @param fontName The name of the font. + * @param fontName The name of the font. */ public void setFontName(String fontName) { this.fontName = fontName; } /** - * Get the font used for this cell. + * Get the font used for this cell. * - * @return The font name. + * @return The font name. */ public String getFontName() { return fontName; } /** - * Set the font size (in points) used for this cell. + * Set the font size (in points) used for this cell. * - * @param fontSize The font size in points. + * @param fontSize The font size in points. */ public void setFontSize(int fontSize) { sizeInPoints = fontSize; } /** - * Get the font size (in points) used for this cell. + * Get the font size (in points) used for this cell. * - * @return The font size in points. + * @return The font size in points. */ public int getFontSize() { return sizeInPoints; } - /** - * Set the vertical alignment used for this cell. + /** + * Set the vertical alignment used for this cell. * - * @param vertAlign The vertical alignment. + * @param vertAlign The vertical alignment. */ public void setVertAlign(int vertAlign) { this.vertAlign = vertAlign; } /** - * Get the vertical alignment used for this cell. + * Get the vertical alignment used for this cell. * - * @return The vertical alignment. + * @return The vertical alignment. */ public int getVertAlign() { return vertAlign; } - /** - * Set the alignment used for this cell. + /** + * Set the alignment used for this cell. * - * @param align The alignment to use. + * @param align The alignment to use. */ public void setAlign(int align) { this.align = align; @@ -323,10 +320,9 @@ public class Format implements Cloneable { } /** - * Set the Foreground <code>Color</code> for this cell. + * Set the Foreground {@code Color} for this cell. * - * @param c A <code>Color</code> object representing the - * foreground color. + * @param c A {@code Color} object representing the foreground color. */ public void setForeground(Color c) { if(c!=null) @@ -334,19 +330,18 @@ public class Format implements Cloneable { } /** - * Get the Foreground <code>Color</code> for this cell. + * Get the Foreground {@code Color} for this cell. * - * @return Foreground <code>Color</code> value. + * @return Foreground {@code Color} value. */ public Color getForeground() { return foreground; } /** - * Set the Background <code>Color</code> for this cell + * Set the Background {@code Color} for this cell. * - * @param c A <code>Color</code> object representing - * the background color. + * @param c A {@code Color} object representing the background color. */ public void setBackground(Color c) { if(c!=null) @@ -354,18 +349,18 @@ public class Format implements Cloneable { } /** - * Get the Background <code>Color</code> for this cell + * Get the Background {@code Color} for this cell. * - * @return Background <code>Color</code> value + * @return Background {@code Color} value. */ public Color getBackground() { return background; } /** - * Get a string representation of this <code>Format</code> + * Get a {@code String} representation of this {@code Format}. * - * @return A string indicating the value and category. + * @return A {@code String} indicating the value and category. */ @Override public String toString() { @@ -373,10 +368,9 @@ public class Format implements Cloneable { } /** - * Tests if the current <code>Format</code> object has default attribute - * values. + * Tests if the current {@code Format} object has default attribute values. * - * @return true if it contains default value + * @return {@code true} if it contains default value. */ public boolean isDefault() { @@ -401,14 +395,12 @@ public class Format implements Cloneable { } /** - * Return true if passed <code>Format</code> specifies as much or less - * than this <code>Format</code>, and nothing it specifies - * contradicts this <code>Format</code>. + * Return true if passed {@code Format} specifies as much or less than this + * {@code Format}, and nothing it specifies contradicts this {@code Format}. * - * @param rhs The <code>Format</code> to check. + * @param rhs The {@code Format} to check. * - * @return true if <code>rhs</code> is a subset, false - * otherwise. + * @return {@code true} if {@code rhs} is a subset, {@code false} otherwise. */ public boolean isSubset(Format rhs) { if (rhs.getClass() != this.getClass()) @@ -439,4 +431,4 @@ public class Format implements Cloneable { return true; } -} +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java index 7589143cc57f..051236d4fe4d 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java @@ -27,43 +27,42 @@ import org.openoffice.xmerge.util.Debug; import org.openoffice.xmerge.util.XmlUtil; /** - * This is a class to define a Name Definition structure. This can then be - * used by plugins to write or read their own definition types. + * This is a class to define a Name Definition structure. + * + * <p>This can then be used by plug-ins to write or read their own definition + * types.</p> */ public class NameDefinition implements OfficeConstants { - private String name; // name which identifies the definition - private String definition; // the definition itself - private String baseCellAddress; // the basecelladdress - private boolean rangeType = false; // true if definition of type range - private boolean expressionType = false; // true if definition of type expression + private String name; // name which identifies the definition + private String definition; // the definition itself + private String baseCellAddress; // the basecelladdress + private boolean rangeType = false; // true if definition of type range + private boolean expressionType = false; // true if definition of type expression /** - * Default Constructor for a <code>NameDefinition</code> - * + * Default Constructor for a {@code NameDefinition}. */ public NameDefinition() { - } /** - * Constructor that takes a <code>Node</code> to build a - * <code>NameDefinition</code> + * Constructor that takes a {@code Node} to build a {@code NameDefinition}. * - * @param root XML Node to read from + * @param root XML {@code Node} to read from. */ public NameDefinition(Node root) { readNode(root); } /** - * Constructor for a <code>NameDefinition</code> + * Constructor for a {@code NameDefinition}. * - * @param name Name that identifies the definition - * @param definition The definition itself - * @param baseCellAddress The base cell address - * @param rangeType True if definition of range type - * @param expressionType True if definition of expression type + * @param name Name that identifies the definition. + * @param definition The definition itself. + * @param baseCellAddress The base cell address. + * @param rangeType {@code true} if definition of range type. + * @param expressionType {@code true} if definition of expression type. */ public NameDefinition(String name, String definition, String baseCellAddress, boolean rangeType, boolean expressionType ) { @@ -75,66 +74,64 @@ public class NameDefinition implements OfficeConstants { } /** - * returns Name of the definition + * Returns Name of the definition. * - * @return the name which identifies the definition + * @return the name which identifies the definition. */ public String getName() { - return name; } + /** - * sets the definition + * Sets the definition. * - * @param newDefinition sets the definition + * @param newDefinition sets the definition. */ public void setDefinition(String newDefinition) { - definition = newDefinition; } + /** - * Returns the definition itself + * Returns the definition itself. * - * @return the definition + * @return the definition. */ public String getDefinition() { - return definition; } /** - * Returns the base Cell address + * Returns the base Cell address. * - * @return the base cell address + * @return the base cell address. */ public String getBaseCellAddress() { - return baseCellAddress; } /** - * Tests if definition is of type expression + * Tests if definition is of type expression. * - * @return whether or not this name definition is of type expression + * @return whether or not this name definition is of type expression. */ public boolean isExpressionType() { return expressionType; } /** - * Tests if definition is of type range + * Tests if definition is of type range. * - * @return whether or not this name definition is of type range + * @return whether or not this name definition is of type range. */ public boolean isRangeType() { return rangeType; } /** - * Writes out a content.xml entry for this NameDefinition object + * Writes out a content.xml entry for this NameDefinition object. * - * @param doc A <code>Document</code> object representing the settings.xml - * @param root The root xml node to add to + * @param doc A {@code Document} object representing the settings.xml + * @param root The root xml {@code Node} to add to. */ public void writeNode(org.w3c.dom.Document doc, Node root) { @@ -161,9 +158,9 @@ public class NameDefinition implements OfficeConstants { } /** - * Reads document settings from xml and inits Settings variables + * Reads document settings from xml and inits Settings variables. * - * @param root XML Node to read from + * @param root XML {@code Node} to read from. */ private void readNode(Node root) { @@ -205,5 +202,4 @@ public class NameDefinition implements OfficeConstants { Debug.log(Debug.TRACE, "<OTHERS " + XmlUtil.getNodeInfo(root) + " />"); } } - -} +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java index bae24b5a8d4c..343a4df96cfd 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java @@ -29,19 +29,19 @@ import org.openoffice.xmerge.util.Debug; import org.openoffice.xmerge.util.TwipsConverter; /** - * Represents a text <code>Style</code> in an OpenOffice document. + * Represents a text {@code Style} in an OpenOffice document. */ public class RowStyle extends Style implements Cloneable { private int rowHeight = 255; /** - * Constructor for use when going from DOM to client device format. + * Constructor for use when going from DOM to client device format. * - * @param node The <i>style:style</i> <code>Node</code> containing - * the <code>Style</code>. (This <code>Node</code> is - * assumed have a <i>family</i> attribute of <i>text</i>). - * @param sc The <code>StyleCatalog</code>, which is used for - * looking up ancestor <code>Style</code> objects. + * @param node The <i>style:style</i> {@code Node} containing the + * {@code Style}. (This {@code Node} is assumed have a + * <i>family</i> attribute of <i>text</i>). + * @param sc The {@code StyleCatalog}, which is used for looking up + * ancestor {@code Style} objects. */ public RowStyle(Node node, StyleCatalog sc) { super(node, sc); @@ -82,16 +82,16 @@ public class RowStyle extends Style implements Cloneable { } /** - * Constructor for use when going from client device format to DOM + * Constructor for use when going from client device format to DOM. * - * @param name Name of text <code>Style</code>. Can be null. - * @param family Family of text <code>Style</code> (usually - * <i>text</i>). Can be null. - * @param parent Name of parent text <code>Style</code>, or null - * for none. - * @param rowHeight The height of this row - * @param sc The <code>StyleCatalog</code>, which is used for - * looking up ancestor <code>Style</code> objects. + * @param name Name of text {@code Style}. Can be {@code null}. + * @param family Family of text {@code Style} (usually <i>text</i>). + * Can be {@code null}. + * @param parent Name of parent text {@code Style}, or {@code null} + * for none. + * @param rowHeight The height of this row. + * @param sc The {@code StyleCatalog}, which is used for looking up + * ancestor {@code Style} objects. */ public RowStyle(String name, String family, String parent,int rowHeight, StyleCatalog sc) { super(name, family, parent, sc); @@ -99,7 +99,7 @@ public class RowStyle extends Style implements Cloneable { } /** - * Returns the height of this row + * Returns the height of this row. * * @return The height of this row. */ @@ -108,20 +108,20 @@ public class RowStyle extends Style implements Cloneable { } /** - * Sets the height of this row + * Sets the height of this row. * - * @param RowHeight The height of this row. + * @param RowHeight The height of this row. */ public void setRowHeight(int RowHeight) { this.rowHeight = RowHeight; } /** - * Parse a rowheight in the form "1.234cm" to twips + * Parse a rowheight in the form {@literal "1.234cm"} to twips. * - * @param value <code>String</code> specification to parse. + * @param value {@code String} specification to parse. * - * @return The twips equivalent. + * @return The twips equivalent. */ private int parseRowHeight(String value) { @@ -140,10 +140,10 @@ public class RowStyle extends Style implements Cloneable { } /** - * Set an attribute. + * Set an attribute. * - * @param attr The attribute to set. - * @param value The attribute value to set. + * @param attr The attribute to set. + * @param value The attribute value to set. */ private void handleAttribute(String attr, String value) { @@ -156,14 +156,13 @@ public class RowStyle extends Style implements Cloneable { } /** - * Return a <code>Style</code> object corresponding to this one, - * but with all of the inherited information from parent - * <code>Style</code> objects filled in. The object returned will - * be a new object, not a reference to this object, even if it does - * not need any information added. + * Return a {@code Style} object corresponding to this one, but with all of + * the inherited information from parent {@code Style} objects filled in. * - * @return The <code>StyleCatalog</code> in which to look up - * ancestors. + * <p>The object returned will be a new object, not a reference to this + * object, even if it does not need any information added.</p> + * + * @return The {@code StyleCatalog} in which to look up ancestors. */ @Override public Style getResolved() { @@ -206,15 +205,14 @@ public class RowStyle extends Style implements Cloneable { } /** - * Create a new <code>Node</code> in the <code>Document</code>, and - * write this <code>Style</code> to it. + * Create a new {@code Node} in the {@code Document}, and write this + * {@code Style} to it. * - * @param parentDoc Parent <code>Document</code> of the - * <code>Node</code> to create. - * @param name Name to use for the new <code>Node</code> (e.g. - * <i>style:style</i>) + * @param parentDoc Parent {@code Document} of the {@code Node} to create. + * @param name Name to use for the new {@code Node} (e.g. + * <i>style:style</i>) * - * @return Created <code>Node</code>. + * @return Created {@code Node}. */ @Override public Node createNode(org.w3c.dom.Document parentDoc, String name) { @@ -224,14 +222,13 @@ public class RowStyle extends Style implements Cloneable { } /** - * Return true if <code>style</code> specifies as much or less - * than this <code>Style</code>, and nothing it specifies - * contradicts this <code>Style</code>. + * Return true if {@code style} specifies as much or less than this + * {@code Style}, and nothing it specifies contradicts this {@code Style}. * - * @param style The <code>Style</code> to check. + * @param style The {@code Style} to check. * - * @return true if <code>style</code> is a subset, false - * otherwise. + * @return {@code true} if {@code style} is a subset, {@code false} + * otherwise. */ @Override public boolean isSubset(Style style) { @@ -246,11 +243,10 @@ public class RowStyle extends Style implements Cloneable { } /** - * Write this <code>Style</code> object's attributes to a - * <code>Node</code> in the <code>Document</code>. + * Write this {@code Style} object's attributes to a {@code Node} in the + * {@code Document}. * - * @param node The <code>Node</code> to add <code>Style</code> - * attributes. + * @param node The {@code Node} to add {@code Style} attributes. */ private void writeAttributes(Element node) { @@ -259,5 +255,4 @@ public class RowStyle extends Style implements Cloneable { node.setAttribute("style:row-height", height); } } - -} +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java index be2b5ccc3db5..d3ce082bc925 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java @@ -32,7 +32,7 @@ import org.openoffice.xmerge.converter.xml.OfficeConstants; */ public class SheetSettings implements OfficeConstants { - /** A w3c <code>Document</code>. */ + /** A w3c {@code Document}. */ private org.w3c.dom.Document settings = null; private String sheetName; @@ -46,63 +46,58 @@ public class SheetSettings implements OfficeConstants { private int posTop = 0; private int paneNumber = 2; - final private static int SPLIT = 0x01; final private static int FREEZE = 0x02; /** - * Default Constructor for a <code>SheetSettings</code> - * + * Default Constructor for a {@code SheetSettings}. */ public SheetSettings() { } /** - * Constructor that takes a <code>Node</code> to build a <code>SheetSettings</code> + * Constructor that takes a {@code Node} to build a {@code SheetSettings}. * - * @param root XML Node to read from + * @param root XML {@code Node} to read from. */ public SheetSettings(Node root) { readNode(root); } /** - * Constructor for a <code>SheetSettings</code> + * Constructor for a {@code SheetSettings}. * - * @param name The name for the new sheet + * @param name The name for the new sheet. */ public SheetSettings(String name) { sheetName = name; } /** - * sets the position of the acitve cell + * Sets the position of the active cell. * - * @param activeCell the current curor position + * @param activeCell the current cursor position. */ public void setCursor(Point activeCell) { - cursorX = (int) activeCell.getX(); cursorY = (int) activeCell.getY(); } /** - * Gets the position of the acitve cell + * Gets the position of the active cell. * - * @return The position as a <code>Point</code> + * @return The position as a {@code Point}. */ public Point getCursor() { - return (new Point(cursorX, cursorY)); } /** - * Sets the position of the freeze + * Sets the position of the freeze. * - * @param splitPoint the point at where the split occurs + * @param splitPoint the point at where the split occurs. */ public void setFreeze(Point splitPoint) { - splitTypeX = FREEZE; splitTypeY = FREEZE; splitPointX = (int) splitPoint.getX(); @@ -110,9 +105,9 @@ public class SheetSettings implements OfficeConstants { } /** - * Sets the position of the split + * Sets the position of the split. * - * @param splitPoint the point at where the split occurs + * @param splitPoint the point at where the split occurs. */ public void setSplit(Point splitPoint) { @@ -123,9 +118,9 @@ public class SheetSettings implements OfficeConstants { } /** - * gets the position of the split + * Gets the position of the split. * - * @return The position as a <code>Point</code> where the split occurs + * @return The position as a {@code Point} where the split occurs. */ public Point getSplit() { @@ -133,88 +128,94 @@ public class SheetSettings implements OfficeConstants { } /** - * gets the type of the split + * Gets the type of the split. * - * @return The split type as a <code>Point</code> + * @return The split type as a {@code Point}. */ public Point getSplitType() { return (new Point(splitTypeX, splitTypeY)); } - - /** - * Gets the leftmost column visibile in the right pane. + * Gets the leftmost column visible in the right pane. * - * @return the 0-based index to the column + * @return the 0-based index to the column. */ public int getLeft() { - return posLeft; } + /** * Gets the top row visible in the lower pane. * - * @return The top row visible in the lower pane + * @return The top row visible in the lower pane. */ public int getTop() { - return posTop; } /** - * Gets the active Panel - * 0 - Bottom Right, 1 - Top Right - * 2 - Bottom Left, 3 - Top Left + * Gets the active Panel. + * + * <blockquote><table summary="Table with all values for an active panel" + * border="1" cellpadding="3" cellspacing="0"> + * <tr><th>Value</th><th>Meaning</th></tr> + * <tr><td align="center">0</td><td>Bottom Right</td></tr> + * <tr><td align="center">1</td><td>Top Right</td></tr> + * <tr><td align="center">2</td><td>Bottom Left</td></tr> + * <tr><td align="center">3</td><td>Top Left</td></tr> + * </table></blockquote> * - * @return int representing the active panel + * @return {@code int} representing the active panel. */ public int getPaneNumber() { - return paneNumber; } /** - * Sets the sheetname this settings object applies to + * Sets the {@code sheetName} this settings object applies to. * - * @param sheetName the name of the worksheet + * @param sheetName the name of the worksheet. */ public void setSheetName(String sheetName) { - this.sheetName = sheetName; - } /** - * Sets the active pane number - * 0 - Bottom Right, 1 - Top Right - * 2 - Bottom Left, 3 - Top Left + * Sets the active pane number. + * + * <blockquote><table summary="Table with all values for an active panel" + * border="1" cellpadding="3" cellspacing="0"> + * <tr><th>Value</th><th>Meaning</th></tr> + * <tr><td align="center">0</td><td>Bottom Right</td></tr> + * <tr><td align="center">1</td><td>Top Right</td></tr> + * <tr><td align="center">2</td><td>Bottom Left</td></tr> + * <tr><td align="center">3</td><td>Top Left</td></tr> + * </table></blockquote> * - * @param paneNumber the pane number + * @param paneNumber the pane number. */ public void setPaneNumber(int paneNumber) { - this.paneNumber = paneNumber; } /** - * Gets the name of the worksheet these <code>Settings</code> apply to + * Gets the name of the worksheet these {@code Settings} apply to. * - * @return the name of the worksheet + * @return the name of the worksheet. */ public String getSheetName() { - return sheetName; } /** - * Adds an XML entry for a particular setting + * Adds an XML entry for a particular setting. * - * @param root the root node at which to add the xml entry - * @param attribute the name of the attribute to add - * @param type the attribute type (int, short etc) - * @param value the value of the attribute + * @param root the root {@code Node} at which to add the xml entry. + * @param attribute the name of the attribute to add. + * @param type the attribute type ({@code int}, {@code short} etc). + * @param value the value of the attribute. */ private void addConfigItem(Node root, String attribute, String type, String value) { @@ -228,10 +229,10 @@ public class SheetSettings implements OfficeConstants { } /** - * Writes out a settings.xml entry for this SheetSettings object + * Writes out a settings.xml entry for this {@code SheetSettings} object. * - * @param settings a <code>Document</code> object representing the settings.xml - * @param root the root xml node to add to + * @param settings a {@code Document} object representing the settings.xml + * @param root the root xml node to add to. */ public void writeNode(org.w3c.dom.Document settings, Node root) { @@ -265,10 +266,10 @@ public class SheetSettings implements OfficeConstants { } /** - * Sets a variable based on a String value read from XML + * Sets a variable based on a {@code String} value read from XML. * - * @param name xml name of the attribute to set - * @param value String value fo the attribute + * @param name xml name of the attribute to set. + * @param value {@code String} value for the attribute. */ private void addAttribute(String name, String value) { @@ -297,9 +298,9 @@ public class SheetSettings implements OfficeConstants { } /** - * Reads document settings from xml and inits SheetSettings variables + * Reads document settings from xml and inits {@code SheetSettings} variables. * - * @param root XML Node to read from + * @param root XML {@code Node} to read from. */ private void readNode(Node root) { @@ -342,4 +343,4 @@ public class SheetSettings implements OfficeConstants { } } } -} +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java index d49f5a6b4fa3..4ad1080daa02 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java @@ -24,140 +24,129 @@ import java.util.Iterator; import org.openoffice.xmerge.ConvertData; /** - * This class is a abstract class for encoding a "Device" - * <code>Document</code> format into an alternative spreadsheet format. - * + * This {@code class} is a {@code abstract class} for encoding a "Device" + * {@code Document} format into an alternative spreadsheet format. */ public abstract class SpreadsheetDecoder { /** - * Returns the total number of sheets in the WorkBook. + * Returns the total number of sheets in the WorkBook. * - * @return The number of sheets in the WorkBook. + * @return The number of sheets in the WorkBook. */ public abstract int getNumberOfSheets(); /** - * Returns an Enumeration to a Vector of <code>NameDefinition</code>. + * Returns an Enumeration to a Vector of {@code NameDefinition}. * - * @return The Enumeration + * @return The Enumeration. */ public abstract Iterator<NameDefinition> getNameDefinitions(); /** - * Returns an <code>BookSettings</code> + * Returns the {@code BookSettings}. * - * @return The Enumeration + * @return The Enumeration. */ public abstract BookSettings getSettings(); - /** - * Returns an Enumeration to a Vector of <code>ColumnRowInfo</code>. + /** + * Returns an Enumeration to a Vector of {@code ColumnRowInfo}. * - * @return The Enumeration + * @return The Enumeration. */ public abstract Iterator<ColumnRowInfo> getColumnRowInfos(); /** - * Returns the number of populated rows in the current WorkSheet. + * Returns the number of populated rows in the current WorkSheet. * - * @return the number of populated rows in the current WorkSheet. + * @return the number of populated rows in the current WorkSheet. */ public abstract int getNumberOfRows(); - /** - * Returns the number of populated columns in the current WorkSheet. + * Returns the number of populated columns in the current WorkSheet. * - * @return The number of populated columns in the current WorkSheet. + * @return The number of populated columns in the current WorkSheet. */ public abstract int getNumberOfColumns(); - /** - * Returns the name of the current WorkSheet. + * Returns the name of the current WorkSheet. * - * @return Name of the current WorkSheet. + * @return Name of the current WorkSheet. */ public abstract String getSheetName(); - /** - * Returns the number of the active column. + * Returns the number of the active column. * - * @return The number of the active column. + * @return The number of the active column. */ public abstract int getColNumber(); - /** - * Returns the number of the active row. + * Returns the number of the active row. * - * @return The number of the active row. + * @return The number of the active row. */ public abstract int getRowNumber(); - /** - * Sets the active WorkSheet. + * Sets the active WorkSheet. * - * @param sheetIndex The index of the sheet to be made active. + * @param sheetIndex The index of the sheet to be made active. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ public abstract void setWorksheet(int sheetIndex) throws IOException; - /** - * Move on the next populated cell in the current WorkSheet. + * Move on the next populated cell in the current WorkSheet. * - * @return true if successful, false otherwise. + * @return {@code true} if successful, {@code false} otherwise. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ public abstract boolean goToNextCell() throws IOException; - /** - * Return the contents of the active cell. + * Return the contents of the active cell. * - * @return The cell contents. + * @return The cell contents. */ public abstract String getCellContents(); /** - * Return the value of the active cell. Used in the case of Formula where - * the cell contents and the cell value are not the same thing. + * Return the value of the active cell. + * + * <p>Used in the case of Formula where the cell contents and the cell + * value are not the same thing.</p> * * @return The cell value. */ public abstract String getCellValue(); /** - * Return the data type of the active cell. + * Return the data type of the active cell. * - * @return The cell data type. + * @return The cell data type. */ public abstract String getCellDataType(); - /** - * Return a <code>Format</code> object describing the active cells - * formatting. + * Return a {@code Format} object describing the active cells formatting. * - * @return <code>Format</code> object for the cell. + * @return {@code Format} object for the cell. */ public abstract Format getCellFormat(); - /** - * Add the contents of a <code>ConvertData</code> to the workbook. + * Add the contents of a {@code ConvertData} to the workbook. * - * @param cd The <code>ConvertData</code> containing the - * content. + * @param cd The {@code ConvertData} containing the content. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ public abstract void addDeviceContent(ConvertData cd) throws IOException; -} - +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java index 3b79122f32f6..e87748773fc6 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java @@ -22,72 +22,60 @@ import java.io.IOException; import java.util.ArrayList; /** - * <p>This class is a abstract class for encoding an SXC into an - * alternative spreadsheet format.</p> + * This {@code class} is an {@code abstract class} for encoding an SXC into an + * alternative spreadsheet format. * - * <p>TODO - Add appropriate exceptions to each of the methods.</p> + * <p>ToDo - Add appropriate exceptions to each of the methods.</p> * */ public abstract class SpreadsheetEncoder { - /** - * Create a new WorkSheet within the WorkBook. + * Create a new WorkSheet within the WorkBook. * - * @param sheetName The name of the WorkSheet. + * @param sheetName The name of the WorkSheet. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ public abstract void createWorksheet(String sheetName) throws IOException; - - - - /** - * Add a cell to the current WorkSheet. + * Add a cell to the current WorkSheet. * - * @param row The row number of the cell - * @param column The column number of the cell - * @param fmt The <code>Format</code> object describing the - * appearance of this cell. - * @param cellContents The text or formula of the cell's contents. + * @param row The row number of the cell + * @param column The column number of the cell + * @param fmt The {@code Format} object describing the appearance + * of this cell. + * @param cellContents The text or formula of the cell's contents. */ - public abstract void addCell(int row, int column, - Format fmt, String cellContents) throws IOException; - + public abstract void addCell(int row, int column, Format fmt, + String cellContents) throws IOException; /** - * Get the number of sheets in the WorkBook. + * Get the number of sheets in the WorkBook. * - * @return The number of sheets in the WorkBook. + * @return The number of sheets in the WorkBook. */ public abstract int getNumberOfSheets(); - - - - /** - * Set the width of the columns in the WorkBook. + * Set the width of the columns in the WorkBook. * - * @param columnRows An <code>IntArrayList</code> of column - * widths. + * @param columnRows An {@code IntArrayList} of column widths. */ public abstract void setColumnRows(ArrayList<ColumnRowInfo> columnRows) throws IOException; /** - * Set the name definition of this spreadsheet + * Set the name definition of this spreadsheet. * - * @param nd The <code>NameDefinition</code> to use. + * @param nd The {@code NameDefinition} to use. */ public abstract void setNameDefinition(NameDefinition nd) throws IOException; /** - * Adds settings to the WorkBook. + * Adds settings to the WorkBook. * - * @param s The <code>BookSettings</code> to add. + * @param s The {@code BookSettings} to add. */ public abstract void addSettings(BookSettings s) throws IOException; -} - +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java index dbf26291296d..00a59d5d2a07 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java @@ -18,10 +18,8 @@ package org.openoffice.xmerge.converter.xml.sxc; - /** * Interface defining constants for Sxc attributes. - * */ public interface SxcConstants { @@ -36,4 +34,4 @@ public interface SxcConstants { /** Name of the default style. */ String DEFAULT_STYLE = "Default"; -} +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java index fe977d8fa482..91a6ec3492bb 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java @@ -22,30 +22,26 @@ import org.openoffice.xmerge.converter.xml.OfficeDocument; import org.openoffice.xmerge.converter.xml.OfficeConstants; /** - * This class is an implementation of <code>OfficeDocument</code> for - * the SXC format. + * This class is an implementation of {@code OfficeDocument} for the SXC format. */ public class SxcDocument extends OfficeDocument { /** - * Constructor with arguments to set <code>name</code>. + * Constructor with arguments to set {@code name}. * - * @param name The name of the <code>Document</code> + * @param name The name of the {@code Document}. */ public SxcDocument(String name) { super(name); } - /** - * Constructor with arguments to set <code>name</code>, the - * <code>namespaceAware</code> flag, and the <code>validating</code> - * flag. + * Constructor with arguments to set {@code name}, the {@code namespaceAware} + * flag, and the {@code validating} flag. * - * @param name The name of the <code>Document</code>. - * @param namespaceAware The value of the <code>namespaceAware</code> - * flag. - * @param validating The value of the <code>validating</code> flag. + * @param name The name of the {@code Document}. + * @param namespaceAware The value of the {@code namespaceAware} flag. + * @param validating The value of the {@code validating} flag. */ public SxcDocument(String name, boolean namespaceAware, boolean validating) { @@ -53,9 +49,9 @@ public class SxcDocument extends OfficeDocument { } /** - * Returns the Office file extension for the SXC format. + * Returns the Office file extension for the SXC format. * - * @return The Office file extension for the SXC format. + * @return The Office file extension for the SXC format. */ @Override protected String getFileExtension() { @@ -63,9 +59,9 @@ public class SxcDocument extends OfficeDocument { } /** - * Returns the Office attribute for the SXC format. + * Returns the Office attribute for the SXC format. * - * @return The Office attribute for the SXC format. + * @return The Office attribute for the SXC format. */ @Override protected String getOfficeClassAttribute() { @@ -81,6 +77,4 @@ public class SxcDocument extends OfficeDocument { protected final String getDocumentMimeType() { return OfficeConstants.SXC_MIME_TYPE; } - -} - +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java index 55f9c3917a23..0675e5805102 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java @@ -34,36 +34,34 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** - * <p>General spreadsheet implementation of <code>DocumentDeserializer</code> - * for the {@link - * org.openoffice.xmerge.converter.xml.sxc.SxcPluginFactory - * SxcPluginFactory}. Used with SXC <code>Document</code> objects.</p> + * General spreadsheet implementation of {@code DocumentDeserializer} for the + * {@link org.openoffice.xmerge.converter.xml.sxc.SxcPluginFactory + * SxcPluginFactory}. * - * <p>The <code>deserialize</code> method uses a <code>DocDecoder</code> - * to read the device spreadsheet format into a <code>String</code> - * object, then it calls <code>buildDocument</code> to create a - * <code>SxcDocument</code> object from it.</p> + * <p>Used with SXC {@code Document} objects.</p> * + * <p>The {@code deserialize} method uses a {@code DocDecoder} to read the device + * spreadsheet format into a {@code String} object, then it calls + * {@code buildDocument} to create a {@code SxcDocument} object from it.</p> */ public abstract class SxcDocumentDeserializer implements OfficeConstants, DocumentDeserializer { /** - * A <code>SpreadsheetDecoder</code> object for decoding from - * device formats. + * A {@code SpreadsheetDecoder} object for decoding from device formats. */ private SpreadsheetDecoder decoder = null; - /** A w3c <code>Document</code>. */ + /** A w3c {@code Document}. */ private org.w3c.dom.Document settings = null; - /** A w3c <code>Document</code>. */ + /** A w3c {@code Document}. */ private org.w3c.dom.Document doc = null; - /** An <code>ConvertData</code> object assigned to this object. */ + /** A {@code ConvertData} object assigned to this object. */ private ConvertData cd = null; - /** A style catalog for the workbook */ + /** A {@code StyleCatalog} for the workbook. */ private StyleCatalog styleCat = null; private int textStyles = 1; @@ -71,75 +69,67 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, private int rowStyles = 1; /** - * Constructor. + * Constructor. * - * @param cd <code>ConvertData</code> consisting of a - * device content object. + * @param cd {@code ConvertData} consisting of a device content object. */ public SxcDocumentDeserializer(ConvertData cd) { this.cd = cd; } - /** - * This abstract method will be implemented by concrete subclasses - * and will return an application-specific Decoder. + * This {@code abstract} method will be implemented by concrete subclasses + * and will return an application-specific Decoder. * - * @param workbook The WorkBook to read. - * @param password The WorkBook password. + * @param workbook The WorkBook to read. + * @param password The WorkBook password. * - * @return The appropriate <code>SpreadSheetDecoder</code>. + * @return The appropriate {@code SpreadSheetDecoder}. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ public abstract SpreadsheetDecoder createDecoder(String workbook, String[] worksheetNames, String password) throws IOException; - /** - * <p>This method will return the name of the WorkBook from the - * <code>ConvertData</code>. Allows for situations where the - * WorkBook name differs from the Device Content name.</p> + * This method will return the name of the WorkBook from the + * {@code ConvertData}. + * + * <p>Allows for situations where the WorkBook name differs from the Device + * Content name.</p> * - * <p>Implemented in the Deserializer as the Decoder's constructor requires - * a name.</p> + * <p>Implemented in the Deserializer as the Decoder's constructor requires + * a name.</p> * - * @param cd The <code>ConvertData</code> containing the Device - * content. + * @param cd The {@code ConvertData} containing the Device content. * - * @return The WorkBook name. + * @return The WorkBook name. */ protected abstract String getWorkbookName(ConvertData cd) throws IOException; - /** - * This method will return the name of the WorkSheet from the - * <code>ConvertData</code>. + * This method will return the name of the WorkSheet from the + * {@code ConvertData}. * - * @param cd The <code>ConvertData</code> containing the Device - * content. + * @param cd The {@code ConvertData} containing the Device content. * - * @return The WorkSheet names. + * @return The WorkSheet names. */ protected abstract String[] getWorksheetNames(ConvertData cd) throws IOException; - /** - * <p>Method to convert a set of "Device" - * <code>Document</code> objects into a <code>SxcDocument</code> - * object and returns it as a <code>Document</code>.</p> + * Method to convert a set of "Device" {@code Document} objects + * into a {@code SxcDocument} object and returns it as a {@code Document}. * - * <p>This method is not thread safe for performance reasons. - * This method should not be called from within two threads. - * It would be best to call this method only once per object - * instance.</p> + * <p>This method is not thread safe for performance reasons. This method + * should not be called from within two threads. It would be best to call + * this method only once per object instance.</p> * - * @return document An <code>SxcDocument</code> consisting - * of the data converted from the input - * stream. + * @return document A {@code SxcDocument} consisting of the data converted + * from the input stream. * - * @throws ConvertException If any conversion error occurs. - * @throws IOException If any I/O error occurs. + * @throws ConvertException If any conversion error occurs. + * @throws IOException If any I/O error occurs. */ public Document deserialize() throws ConvertException, IOException { @@ -163,7 +153,7 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, // be the name of the StarCalc file minus the file extension suffix. // Create a Decoder to decode the DeviceContent to a spreadsheet document - // TODO - we aren't using a password in StarCalc, so we can + // ToDo - we aren't using a password in StarCalc, so we can // use any value for password here. If StarCalc XML supports // passwords in the future, we should try to get the correct // password value here. @@ -182,14 +172,14 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, } /** - * This initializes a font table so we can include some basic font - * support for spreadsheets. - * + * This initializes a font table so we can include some basic font support + * for spreadsheets. */ private void initFontTable() { - String fontTable[]= new String[] { "Tahoma", "Tahoma", "swiss", "variable", - "Courier New", "'Courier New'", "modern", "fixed"}; + String fontTable[]= new String[] { "Tahoma", "Tahoma", "swiss", "variable", + "Courier New", "'Courier New'", + "modern", "fixed" }; // Traverse to the office:body element. // There should only be one. NodeList list = doc.getElementsByTagName(TAG_OFFICE_FONT_DECLS); @@ -211,10 +201,9 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, } /** - * Outer level method used to decode a WorkBook - * into a <code>Document</code>. + * Outer level method used to decode a WorkBook into a {@code Document}. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ protected void decode() throws IOException { @@ -259,16 +248,12 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, } - - /** - * This method process the settings portion - * of the <code>Document</code>. + * This method process the settings portion of the {@code Document}. * - * @param root The root <code>Node</code> of the - * <code>Document</code> we are building. This - * <code>Node</code> should be a TAG_OFFICE_SETTINGS - * tag. + * @param root The root {@code Node} of the {@code Document} we are + * building. This {@code Node} should be a + * {@code TAG_OFFICE_SETTINGS} tag. */ protected void processSettings(Node root) { @@ -286,15 +271,14 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, } /** - * This method process a Name Definition Table and generates a portion - * of the <code>Document</code>. + * This method process a Name Definition Table and generates a portion of + * the {@code Document}. * - * @param root The root <code>Node</code> of the - * <code>Document</code> we are building. This - * <code>Node</code> should be a TAG_OFFICE_BODY - * tag. + * @param root The root {@code Node} of the {@code Document} we are + * building. This {@code Node} should be a + * {@code TAG_OFFICE_BODY} tag. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ protected void processNameDefinition(Node root, Iterator<NameDefinition> eNameDefinitions) throws IOException { @@ -314,16 +298,16 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, } /** - * This method process a WorkSheet and generates a portion - * of the <code>Document</code>. A spreadsheet is represented - * as a table Node in StarOffice XML format. + * This method process a WorkSheet and generates a portion of the + * {@code Document}. + * + * <p>A spreadsheet is represented as a table Node in StarOffice XML format.</p> * - * @param root The root <code>Node</code> of the - * <code>Document</code> we are building. This - * <code>Node</code> should be a TAG_OFFICE_BODY - * tag. + * @param root The root {@code Node} of the {@code Document} we are + * building. This {@code Node} should be a + * {@code TAG_OFFICE_BODY} tag. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ protected void processTable(Node root) throws IOException { @@ -338,7 +322,7 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, // Set the table name attribute tableElement.setAttribute(ATTRIBUTE_TABLE_NAME, sheetName); - // TODO - style currently hardcoded - get real value + // ToDo - style currently hardcoded - get real value // Set table style-name attribute tableElement.setAttribute(ATTRIBUTE_TABLE_STYLE_NAME, "Default"); @@ -347,7 +331,7 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, Debug.log(Debug.TRACE, "<SheetName>" + sheetName + "</SheetName>"); - // add the various different table-columns + // Add the various different table-columns processColumns(tableElement); // Get each cell and add to doc @@ -357,18 +341,16 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, } /** - * <p>This method process the cells in a <code>Document</code> - * and generates a portion of the <code>Document</code>.</p> + * This method process the cells in a {@code Document} and generates a + * portion of the {@code Document}. * - * <p>This method assumes that records are sorted by - * row and then column.</p> + * <p>This method assumes that records are sorted by row and then column.</p> * - * @param root The <code>Node</code> of the <code>Document</code> - * we are building that we will append our cell - * <code>Node</code> objects. This <code>Node</code> - * should be a TAG_TABLE tag. + * @param root The {@code Node} of the {@code Document} we are building + * that we will append our cell {@code Node} objects. This + * {@code Node} should be a {@code TAG_TABLE} tag. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ protected void processColumns(Node root) throws IOException { @@ -406,18 +388,16 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, } /** - * <p>This method process the cells in a <code>Document</code> - * and generates a portion of the <code>Document</code>.</p> + * This method process the cells in a {@code Document} and generates a + * portion of the {@code Document}. * - * <p>This method assumes that records are sorted by - * row and then column.</p> + * <p>This method assumes that records are sorted by row and then column.</p> * - * @param root The <code>Node</code> of the <code>Document</code> - * we are building that we will append our cell - * <code>Node</code> objects. This <code>Node</code> - * should be a TAG_TABLE tag. + * @param root The {@code Node} of the {@code Document} we are building + * that we will append our cell {@code Node} objects. This + * {@code Node} should be a {@code TAG_TABLE} tag. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ protected void processCells(Node root) throws IOException { @@ -438,7 +418,6 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, // The number of columns in the spreadsheet int lastColumn = decoder.getNumberOfColumns(); - Node autoStylesNode = null; // Loop over all cells in the spreadsheet @@ -477,7 +456,6 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, // Create an element node for the new row rowElement = doc.createElement(TAG_TABLE_ROW); - for(Iterator<ColumnRowInfo> e = decoder.getColumnRowInfos();e.hasNext();) { ColumnRowInfo cri = e.next(); if(cri.isRow() && cri.getRepeated()==newRow-1) { @@ -552,7 +530,7 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, if (autoStylesNode == null) { autoStylesNode = doc.createElement(TAG_OFFICE_AUTOMATIC_STYLES); doc.insertBefore(autoStylesNode, bodyNode); - } + } CellStyle tStyle = new CellStyle( "Default",SxcConstants.TABLE_CELL_STYLE_FAMILY, @@ -599,44 +577,40 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, // Now write the style catalog to the document if(autoStylesNode!=null) { - Debug.log(Debug.TRACE,"Well the autostyle node was found!!!"); + Debug.log(Debug.TRACE, "Well the autostyle node was found!!!"); NodeList nl = styleCat.writeNode(doc, "dummy").getChildNodes(); int nlLen = nl.getLength(); // nl.item reduces the length - for (int i = 0; i < nlLen; i++) { - autoStylesNode.appendChild(nl.item(0)); - } + for (int i = 0; i < nlLen; i++) { + autoStylesNode.appendChild(nl.item(0)); + } } if (row != 0) { - // The sheet does have rows, so write out a /tr Debug.log(Debug.TRACE, "</tr>"); } } - /** - * This method will add empty rows to the <code>Document</code>. - * It is called when the conversion process encounters - * a row (or rows) that do not contain any data in its cells. + * This method will add empty rows to the {@code Document}. + * + * <p>It is called when the conversion process encounters a row (or rows) + * that do not contain any data in its cells.</p> * - * @param numEmptyRows The number of empty rows that we - * need to add to the <code>Document</code>. - * @param root The <code>Node</code> of the - * <code>Document</code> we are building - * that we will append our empty row - * <code>Node</code> objects. This - * <code>Node</code> should be a TAG_TABLE - * tag. - * @param numEmptyCells The number of empty cells in the - * empty row. + * @param numEmptyRows The number of empty rows that we need to add to + * the {@code Document}. + * @param root The {@code Node} of the {@code Document} we are + * building that we will append our empty row + * {@code Node} objects. This {@code Node} should + * be a {@code TAG_TABLE} tag. + * @param numEmptyCells The number of empty cells in the empty row. */ protected void addEmptyRows(int numEmptyRows, Node root, int numEmptyCells) { // Create an element node for the row Element rowElement = doc.createElement(TAG_TABLE_ROW); - // TODO - style currently hardcoded - get real value + // ToDo - style currently hardcoded - get real value // Set row style-name attribute rowElement.setAttribute(ATTRIBUTE_TABLE_STYLE_NAME, "Default"); @@ -657,29 +631,25 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, } - /** - * This method will add empty cells to the <code>Document</code>. - * It is called when the conversion process encounters a row - * that contains some cells without data. + * This method will add empty cells to the {@code Document}. + * + * <p>It is called when the conversion process encounters a row that + * contains some cells without data.</p> * - * @param numColsSkipped The number of empty cells - * that we need to add to the - * current row. - * @param row The <code>Node</code> of the - * <code>Document</code> we - * are building that we will - * append our empty cell - * <code>Node</code> objects. - * This <code>Node</code> should - * be a TAG_TABLE_ROW tag. + * @param numColsSkipped The number of empty cells that we need to add to + * the current row. + * @param row The {@code Node} of the {@code Document} we are + * building that we will append our empty cell + * {@code Node} objects. This {@code Node} should + * be a {@code TAG_TABLE_ROW} tag. */ protected void addEmptyCells(int numColsSkipped, Node row) { // Create an empty cellElement Element cellElement = doc.createElement(TAG_TABLE_CELL); - // TODO - style currently hardcoded - get real value + // ToDo - style currently hardcoded - get real value // Set cell style-name attribute cellElement.setAttribute(ATTRIBUTE_TABLE_STYLE_NAME, "Default"); @@ -701,17 +671,15 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, } } - /** - * This method process the data in a cell and sets - * the appropriate attributes on the cell <code>Element</code>. + * This method process the data in a cell and sets the appropriate attributes + * on the cell {@code Element}. * - * @param cellElement A TAG_TABLE_CELL <code>Element</code> - * that we will be adding attributes to - * based on the type of data in the cell. - * @param type The type of data contained in the cell. - * @param contents The contents of the data contained in - * the cell. + * @param cellElement A {@code TAG_TABLE_CELL} {@code Element} that we + * will be adding attributes to based on the type of + * data in the cell. + * @param type The type of data contained in the cell. + * @param contents The contents of the data contained in the cell. */ protected void processCellData(Element cellElement, String type, String contents) { @@ -770,6 +738,4 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, } } } - -} - +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java index ba060cbf3e4b..bf6d2dc7f9f4 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java @@ -36,90 +36,84 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** - * <p>General spreadsheet implementation of <code>DocumentSerializer</code> - * for the {@link - * org.openoffice.xmerge.converter.xml.sxc.SxcPluginFactory - * SxcPluginFactory}. Used with SXC <code>Document</code> objects.</p> + * General spreadsheet implementation of {@code DocumentSerializer} for the + * {@link org.openoffice.xmerge.converter.xml.sxc.SxcPluginFactory + * SxcPluginFactory}. * - * <p>The <code>serialize</code> method traverses the DOM - * <code>Document</code> from the given <code>Document</code> object. - * It uses a <code>DocEncoder</code> object for the actual conversion - * of contents to the device spreadsheet format.</p> + * <p>Used with SXC {@code Document} objects.</p> * + * <p>The {@code serialize} method traverses the DOM {@code Document} from the + * given {@code Document} object. It uses a {@code DocEncoder} object for the + * actual conversion of contents to the device spreadsheet format.</p> */ public abstract class SxcDocumentSerializer implements OfficeConstants, DocumentSerializer { - /** <code>Format</code> object describing the cell. */ + /** {@code Format} object describing the cell. */ private Format fmt = null; - /** The row number. */ + /** The row number. */ private int rowID = 1; - /** The column number. */ + /** The column number. */ private int colID = 1; - /** The number of times the current row is repeated. */ + /** The number of times the current row is repeated. */ private int rowsRepeated = 1; - /** The number of times the current column is repeated. */ + /** The number of times the current column is repeated. */ private int colsRepeated = 1; - /** The number of times the current column is repeated. */ + /** The number of times the current column is repeated. */ private StyleCatalog styleCat = null; + /** - * An array of column widths of the current worksheet. Width is - * measured in number of characters. + * An array of column widths of the current worksheet. + * Width is measured in number of characters. */ private ArrayList<ColumnRowInfo> ColumnRowList; /** - * A <code>SpreadsheetEncoder</code> object for encoding to - * appropriate format. + * A {@code SpreadsheetEncoder} object for encoding to appropriate format. */ protected SpreadsheetEncoder encoder = null; - /** <code>SxcDocument</code> object that this converter processes. */ + /** {@code SxcDocument} object that this converter processes. */ protected SxcDocument sxcDoc = null; - /** - * Constructor. + * Constructor. * - * @param document Input <code>SxcDocument</code> - * <code>Document</code>. + * @param document Input {@code SxcDocument} {@code Document}. */ public SxcDocumentSerializer(Document document) { fmt = new Format(); sxcDoc = (SxcDocument) document; } - /** - * <p>Method to convert a DOM <code>Document</code> into - * "Device" <code>Document</code> objects.</p> + * Method to convert a DOM {@code Document} into "Device" + * {@code Document} objects. * - * <p>This method is not thread safe for performance reasons. - * This method should not be called from within two threads. - * It would be best to call this method only once per object - * instance.</p> + * <p>This method is not thread safe for performance reasons. This method + * should not be called from within two threads. It would be best to call + * this method only once per object instance.</p> * - * @return <code>ConvertData</code> containing "Device" - * <code>Document</code> objects. + * @return {@code ConvertData} containing "Device" + * {@code Document}objects. * - * @throws ConvertException If any conversion error occurs. - * @throws IOException If any I/O error occurs. + * @throws ConvertException If any conversion error occurs. + * @throws IOException If any I/O error occurs. */ public abstract ConvertData serialize() throws ConvertException, IOException; - /** - * This method traverses <i>office:settings</i> <code>Element</code>. + * This method traverses <i>office:settings</i> {@code Element}. * - * @param node <i>office:settings</i> <code>Node</code>. + * @param node <i>office:settings</i> {@code Node}. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ public void traverseSettings(Node node) throws IOException { if (node.hasChildNodes()) { @@ -154,12 +148,12 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } } - /* - * Handles the loading of defined styles from the style.xml file as well - * as automatic styles from the content.xml file. + /** + * Handles the loading of defined styles from the style.xml file as well as + * automatic styles from the content.xml file. * - * Any change to a defined style, such as a short bold section, falls into - * the latter category. + * <p>Any change to a defined style, such as a short bold section, falls + * into the latter category. */ protected void loadStyles(SxcDocument sxcDoc) { @@ -188,11 +182,11 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } /** - * This method traverses <i>office:body</i> <code>Element</code>. + * This method traverses <i>office:body</i> {@code Element}. * - * @param node <i>office:body</i> <code>Node</code>. + * @param node <i>office:body</i> {@code Node}. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ protected void traverseBody(Node node) throws IOException { @@ -242,14 +236,12 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, Debug.log(Debug.TRACE, "</DEBUGLOG>"); } - /** - * This method traverses the <i>table:table</i> element - * <code>Node</code>. + * This method traverses the <i>table:table</i> element {@code Node}. * - * @param node A <i>table:table</i> <code>Node</code>. + * @param node A <i>table:table</i> {@code Node}. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ protected void traverseNamedExpressions(Node node) throws IOException { @@ -274,12 +266,11 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } /** - * This method traverses the <i>table:table</i> element - * <code>Node</code>. + * This method traverses the <i>table:table</i> element {@code Node}. * - * @param node A <i>table:table</i> <code>Node</code>. + * @param node A <i>table:table</i> {@code Node}. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ protected void traverseTable(Node node) throws IOException { @@ -288,7 +279,7 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, ColumnRowList = new ArrayList<ColumnRowInfo>(); // Get table attributes - // TODO - extract style from attribute + // ToDo - extract style from attribute NamedNodeMap att = node.getAttributes(); @@ -339,12 +330,11 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } /** - * This method traverses the <i>table:table-row</i> element - * <code>Node</code>. + * This method traverses the <i>table:table-row</i> element {@code Node}. * - * @param node A <i>table:table-row</i> <code>Node</code>. + * @param node A <i>table:table-row</i> {@code Node}. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ protected void traverseTableRow(Node node) throws IOException { @@ -454,12 +444,12 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, Debug.log(Debug.TRACE, "</TR>"); } - /** - * This method traverses the <i>table:table-column</i> - * <code>Node</code>. Not yet implemented. + * This method traverses the <i>table:table-column</i> {@code Node}. + * + * <p>Not yet implemented.</p> * - * @param node A <i>table:table-column</i> <code>Node</code>. + * @param node A <i>table:table-column</i> {@code Node}. * * @throws IOException If any I/O error occurs. */ @@ -527,12 +517,11 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } /** - * This method traverses a <i>table:table-cell</i> element - * <code>Node</code>. + * This method traverses a <i>table:table-cell</i> element {@code Node}. * - * @param node a <i>table:table-cell</i> <code>Node</code>. + * @param node a <i>table:table-cell</i> {@code Node}. * - * @throws IOException if any I/O error occurs. + * @throws IOException if any I/O error occurs. */ protected void traverseCell(Node node) throws IOException { @@ -541,15 +530,11 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, int debug_i=0; Node debug_attrib = null; fmt.clearFormatting(); - if (cellAtt == null || cellAtt.item(0) == null) - { + if (cellAtt == null || cellAtt.item(0) == null) { Debug.log(Debug.INFO, "No Cell Attributes\n"); // return; - } - else - { - while ((debug_attrib = cellAtt.item(debug_i++)) != null) - { + } else { + while ((debug_attrib = cellAtt.item(debug_i++)) != null) { Debug.log(Debug.INFO, "Cell Attribute " + debug_i + ": " + debug_attrib.getNodeName() + " : " + debug_attrib.getNodeValue() + "\n"); @@ -749,13 +734,12 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } - /** - * This method traverses the <i>text:p</i> element <code>Node</code>. + * This method traverses the <i>text:p</i> element {@code Node}. * - * @param node A <i>text:p</i> <code>Node</code>. + * @param node A <i>text:p</i> {@code Node}. * - * @throws IOException If any I/O error occurs. + * @throws IOException If any I/O error occurs. */ protected void traverseParagraph(Node node) throws IOException { @@ -763,14 +747,10 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, int debug_i=0; Node debug_attrib = null; - if (cellAtt == null || cellAtt.item(0) == null) - { + if (cellAtt == null || cellAtt.item(0) == null) { Debug.log(Debug.INFO, "No Paragraph Attributes\n"); - } - else - { - while ((debug_attrib = cellAtt.item(debug_i++)) != null) - { + } else { + while ((debug_attrib = cellAtt.item(debug_i++)) != null) { Debug.log(Debug.INFO, "Paragraph Attribute " + debug_i + ": " + debug_attrib.getNodeName() + " : " + debug_attrib.getNodeValue() + "\n"); @@ -821,17 +801,17 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } } - /** - * This method will take the input cell value and add - * it to the spreadsheet <code>Document</code> we are currently - * encoding. This method correctly handles cells that are - * repeated in either the row, cell, or both directions. + * This method will take the input cell value and add it to the spreadsheet + * {@code Document} we are currently encoding. * - * @param cellValue The contents of the cell we want to add - * to the spreadsheet <code>Document</code>. + * <p>This method correctly handles cells that are repeated in either the + * row, cell, or both directions.</p> * - * @throws IOException If any I/O error occurs. + * @param cellValue The contents of the cell we want to add to the + * spreadsheet {@code Document}. + * + * @throws IOException If any I/O error occurs. */ protected void addCell(String cellValue) throws IOException { @@ -852,7 +832,6 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, Debug.log(Debug.TRACE, "<TD>"); - // Add the cell data to the encoded spreadsheet document encoder.addCell(row, col, fmt, cellValue); @@ -868,23 +847,21 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } - - /** - * This method takes a <i>table:table-cell</i> <code>Node</code> - * and traverses down to the <i>text:p</i> tag. The value is - * extracted from the <i>text:p</i> tag and the number of decimal - * places is calculated. + * This method takes a <i>table:table-cell</i> {@code Node} and traverses + * down to the <i>text:p</i> tag. * - * @param node A <i>table:table-cell</i> <code>Node</code>. + * <p>The value is extracted from the <i>text:p</i> tag and the number of + * decimal places is calculated.</p> * - * @return The number of decimal places in the display - * string of the data in the input <code>Node</code>. + * @param node A <i>table:table-cell</i> {@code Node}. + * + * @return The number of decimal places in the display string of the data + * in the input {@code Node}. */ protected int getDecimalPlaces(Node node) { int decimals = 0; - Element element = null; // cast org.w3c.dom.Node to org.w3c.dom.Element @@ -902,21 +879,16 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } Node paragraph = list.item(0); - if (paragraph.hasChildNodes()) { NodeList nodeList = paragraph.getChildNodes(); - int len = nodeList.getLength(); - for (int j = 0; j < len; j++) { Node child = nodeList.item(j); - if (child.getNodeType() == Node.TEXT_NODE) { String s = child.getNodeValue(); - int k = s.lastIndexOf("."); if (k > 0) { s = s.substring(k+1); @@ -928,6 +900,4 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, return decimals; } - -} - +}
\ No newline at end of file diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java index b034dcab2dda..1b3008c637bd 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java @@ -26,50 +26,44 @@ import org.openoffice.xmerge.PluginFactory; import org.openoffice.xmerge.Document; import org.openoffice.xmerge.DocumentMergerFactory; - /** - * General implementation of the <code>PluginFactory</code> interface - * for SXC <code>Document</code> objects. + * General implementation of the {@code PluginFactory} interface for SXC + * {@code Document} objects. * - * @see org.openoffice.xmerge.DocumentDeserializer - * @see org.openoffice.xmerge.DocumentMerger - * @see org.openoffice.xmerge.DocumentSerializer + * @see org.openoffice.xmerge.DocumentDeserializer + * @see org.openoffice.xmerge.DocumentMerger + * @see org.openoffice.xmerge.DocumentSerializer */ public abstract class SxcPluginFactory extends PluginFactory implements DocumentMergerFactory { - /** - * Constructor that caches the <code>ConvertInfo</code> that - * corresponds to the registry information for this plug-in. + * Constructor that caches the {@code ConvertInfo} that corresponds to the + * registry information for this plug-in. * - * @param ci <code>ConvertInfo</code> object. + * @param ci {@code ConvertInfo} object. */ public SxcPluginFactory(ConverterInfo ci) { super(ci); } - @Override public Document createOfficeDocument(String name, InputStream is) throws IOException { - // read zipped XML stream - + // Read zipped XML stream SxcDocument doc = new SxcDocument(name); doc.read(is); return doc; } - @Override + @Override public Document createOfficeDocument(String name, InputStream is,boolean isZip) throws IOException { - // read zipped XML stream - + // Read zipped XML stream SxcDocument doc = new SxcDocument(name); doc.read(is,isZip); return doc; } -} - +}
\ No newline at end of file |