[PATCH 8/9] Fix javadoc comments in SheetSettings.java

Nigel Hawkins n.hawkins at gmx.com
Thu Oct 28 02:15:33 PDT 2010


---
 .../xmerge/converter/xml/sxc/SheetSettings.java    |  134 ++++++++++----------
 1 files changed, 65 insertions(+), 69 deletions(-)

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 290c16b..321557d 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
@@ -1,7 +1,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@ import org.openoffice.xmerge.converter.xml.OfficeConstants;
 
 /**
  * This is a class representing the different attributes for a worksheet
- * contained in settings.xml.  
+ * contained in settings.xml.
  *
  * @author Martin Maher
  */
@@ -48,7 +48,7 @@ public class SheetSettings implements OfficeConstants {
 
     private String	sheetName;
     private int		cursorX		= 0;
-    private int		cursorY		= 0;	
+    private int		cursorY		= 0;
     private int		splitTypeX;
     private int		splitTypeY;
     private int		splitPointX	= 0;
@@ -58,51 +58,49 @@ public class SheetSettings implements OfficeConstants {
     private int		posBottom	= 0;
     private int		posTop		= 0;
     private int		paneNumber	= 2;
-    
+
     final public static int NONE	= 0x00;
     final public static int SPLIT	= 0x01;
     final public static int FREEZE	= 0x02;
-    
-    
+
     /**
-     * Default Constructor for a <code>ColumnRowInfo</code>
+     * Default Constructor for a <code>SheetSettings</code>
      *
      */
     public SheetSettings() {
     }
-    
+
     /**
      * Constructor that takes a <code>Node</code> to build a <code>SheetSettings</code>
      *
-     * @param root XML Node to read from 
+     * @param root XML Node to read from
      */
     public SheetSettings(Node root) {
         readNode(root);
     }
 
     /**
-     * Constructor for a <code>ColumnRowInfo</code>
+     * Constructor for a <code>SheetSettings</code>
      *
-     * @param dimension if it's a row the height, a column the width 
-     * @param repeated 
+     * @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 acitve cell
      *
-     * @param activeCell the current curor position 
+     * @param activeCell the current curor 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 acitve cell
      *
      * @return The position as a <code>Point</code>
      */
@@ -112,7 +110,7 @@ public class SheetSettings implements OfficeConstants {
     }
 
     /**
-     * Sets the position  of the freeze 
+     * Sets the position  of the freeze
      *
      * @param splitPoint the point at where the split occurs
      */
@@ -125,7 +123,7 @@ 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
      */
@@ -136,9 +134,9 @@ public class SheetSettings implements OfficeConstants {
         splitPointX		= (int) splitPoint.getX();
         splitPointY		= (int) splitPoint.getY();
     }
-    
+
     /**
-     * sets the position and type of the split 
+     * gets the position of the split
      *
      * @return The position as a <code>Point</code> where the split occurs
      */
@@ -146,11 +144,11 @@ public class SheetSettings implements OfficeConstants {
 
         return (new Point(splitPointX, splitPointY));
     }
-    
+
     /**
-     * sets the position and type of the split 
+     * gets the type of the split
      *
-     * @return The position as a <code>Point</code> where the split occurs
+     * @return The split type as a <code>Point</code>
      */
     public Point getSplitType() {
 
@@ -161,7 +159,7 @@ public class SheetSettings implements OfficeConstants {
      * Sets the top row visible in the lower pane and the leftmost column
      * visibile in the right pane.
      *
-     * @param top The top row visible in the lower pane 
+     * @param top The top row visible in the lower pane
      * @param left The leftmost column visibile in the right pane
      */
     public void setTopLeft(int top, int left) {
@@ -169,30 +167,28 @@ public class SheetSettings implements OfficeConstants {
         posLeft = left;
         posTop = top;
     }
-    
+
     /**
      * Gets the the leftmost column visibile 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;
     }
     /**
-     * Sets the top row visible in the lower pane and the leftmost column
-     * visibile in the right pane.
+     * Gets the top row visible in the lower pane.
      *
-     * @param top The top row visible in the lower pane 
-     * @param left The leftmost column visibile in the right pane
+     * @return The top row visible in the lower pane
      */
     public int getTop() {
 
         return posTop;
     }
-    
+
     /**
-     * Gets the active Panel  
+     * Gets the active Panel
      * 0 - Bottom Right, 1 - Top Right
      * 2 - Bottom Left, 3 - Top Left
      *
@@ -202,32 +198,32 @@ public class SheetSettings implements OfficeConstants {
 
         return paneNumber;
     }
-    
+
     /**
-     * Sets the sheetname this settings object applies to 
+     * Sets the 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
      *
-     * @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</code> apply to
      *
      * @return the name of the worksheet
      */
@@ -249,54 +245,54 @@ public class SheetSettings implements OfficeConstants {
         Element configItem = settings.createElement(TAG_CONFIG_ITEM);
         configItem.setAttribute(ATTRIBUTE_CONFIG_NAME, attribute);
         configItem.setAttribute(ATTRIBUTE_CONFIG_TYPE, type);
-                
+
         configItem.appendChild(settings.createTextNode(value));
 
         root.appendChild(configItem);
     }
 
     /**
-     * Writes out a settings.xml entry for this SheetSettings object 
+     * Writes out a settings.xml entry for this SheetSettings object
      *
-     * @param settings a <code>Document</code> object representing the settings.xml 
+     * @param settings a <code>Document</code> object representing the settings.xml
      * @param root the root xml node to add to
      */
     public void writeNode(org.w3c.dom.Document settings, Node root) {
-    
+
         this.settings = settings;
         Element configItemMapEntry		= (Element) settings.createElement(TAG_CONFIG_ITEM_MAP_ENTRY);
         configItemMapEntry.setAttribute(ATTRIBUTE_CONFIG_NAME, getSheetName());
-        addConfigItem(configItemMapEntry, "CursorPositionX", "int", Integer.toString(cursorX));	
-        addConfigItem(configItemMapEntry, "CursorPositionY", "int", Integer.toString(cursorY));	
+        addConfigItem(configItemMapEntry, "CursorPositionX", "int", Integer.toString(cursorX));
+        addConfigItem(configItemMapEntry, "CursorPositionY", "int", Integer.toString(cursorY));
 
         String splitMode = Integer.toString(splitTypeX);
         if(splitPointX==0) {
             splitMode = "0";
         }
-        addConfigItem(configItemMapEntry, "HorizontalSplitMode", "short", splitMode);	
+        addConfigItem(configItemMapEntry, "HorizontalSplitMode", "short", splitMode);
 
         splitMode = Integer.toString(splitTypeY);
         if(splitPointY==0) {
             splitMode = "0";
         }
-        addConfigItem(configItemMapEntry, "VerticalSplitMode", "short", splitMode);	
-        
-        addConfigItem(configItemMapEntry, "HorizontalSplitPosition", "int", Integer.toString(splitPointX));	
-        addConfigItem(configItemMapEntry, "VerticalSplitPosition", "int", Integer.toString(splitPointY));	
-        addConfigItem(configItemMapEntry, "ActiveSplitRange", "short", Integer.toString(paneNumber));	
-            
-        addConfigItem(configItemMapEntry, "PositionLeft", "int", "0");	
-        addConfigItem(configItemMapEntry, "PositionRight", "int", Integer.toString(posLeft));	
-        addConfigItem(configItemMapEntry, "PositionTop", "int", "0");	
-        addConfigItem(configItemMapEntry, "PositionBottom", "int", Integer.toString(posTop));	
+        addConfigItem(configItemMapEntry, "VerticalSplitMode", "short", splitMode);
+
+        addConfigItem(configItemMapEntry, "HorizontalSplitPosition", "int", Integer.toString(splitPointX));
+        addConfigItem(configItemMapEntry, "VerticalSplitPosition", "int", Integer.toString(splitPointY));
+        addConfigItem(configItemMapEntry, "ActiveSplitRange", "short", Integer.toString(paneNumber));
+
+        addConfigItem(configItemMapEntry, "PositionLeft", "int", "0");
+        addConfigItem(configItemMapEntry, "PositionRight", "int", Integer.toString(posLeft));
+        addConfigItem(configItemMapEntry, "PositionTop", "int", "0");
+        addConfigItem(configItemMapEntry, "PositionBottom", "int", Integer.toString(posTop));
         root.appendChild(configItemMapEntry);
     }
 
     /**
-     * Sets a variable based on a String value read from XML 
+     * Sets a variable based on a 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 String value fo the attribute
      */
     public void addAttribute(String name, String value) {
 
@@ -304,7 +300,7 @@ public class SheetSettings implements OfficeConstants {
             cursorX = Integer.parseInt(value);
         } else if(name.equals("CursorPositionY")) {
             cursorY = Integer.parseInt(value);
-            
+
         } else if(name.equals("HorizontalSplitPosition")) {
             splitPointX = Integer.parseInt(value);
         } else if(name.equals("VerticalSplitPosition")) {
@@ -316,7 +312,7 @@ public class SheetSettings implements OfficeConstants {
             posLeft = Integer.parseInt(value);
         } else if(name.equals("PositionBottom")) {
             posTop = Integer.parseInt(value);
-        
+
         } else if(name.equals("HorizontalSplitMode")) {
             splitTypeX = Integer.parseInt(value);
         } else if(name.equals("VerticalSplitMode")) {
@@ -327,10 +323,10 @@ public class SheetSettings implements OfficeConstants {
     /**
      * Reads document settings from xml and inits SheetSettings variables
      *
-     * @param root XML Node to read from 
+     * @param root XML Node to read from
      */
     public void readNode(Node root) {
-    
+
         NamedNodeMap sheetAtt = root.getAttributes();
 
         Node sheetNameNode = sheetAtt.getNamedItem(ATTRIBUTE_CONFIG_NAME);
@@ -348,24 +344,24 @@ public class SheetSettings implements OfficeConstants {
                     String nodeName = child.getNodeName();
 
                     if (nodeName.equals(TAG_CONFIG_ITEM)) {
-                    
+
                         NamedNodeMap cellAtt = child.getAttributes();
 
                         Node configNameNode =
                             cellAtt.getNamedItem(ATTRIBUTE_CONFIG_NAME);
-                    
+
                         String name = configNameNode.getNodeValue();
                         NodeList nodeList2 = child.getChildNodes();
                         int len2 = nodeList2.getLength();
-                        String s = "";	
+                        String s = "";
                         for (int j = 0; j < len2; j++) {
                             Node child2 = nodeList2.item(j);
                             if (child2.getNodeType() == Node.TEXT_NODE) {
                                 s = child2.getNodeValue();
                             }
                         }
-                        addAttribute(name, s);	
-                    }			
+                        addAttribute(name, s);
+                    }
                 }
             }
         }
-- 
1.7.0.4


--=-yxF8B8fCXhdiVRLw7V8t
Content-Disposition: attachment; filename="0009-Fix-javadoc-comments-in-SpreadsheetEncoder.java.patch"
Content-Type: text/x-patch; name="0009-Fix-javadoc-comments-in-SpreadsheetEncoder.java.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the LibreOffice mailing list