You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ye...@apache.org on 2012/11/01 16:26:28 UTC

svn commit: r1404642 - in /poi/trunk/src: documentation/content/xdocs/spreadsheet/ examples/src/org/apache/poi/xssf/usermodel/examples/ java/org/apache/poi/common/usermodel/ java/org/apache/poi/hssf/usermodel/ ooxml/java/org/apache/poi/xssf/usermodel/ ...

Author: yegor
Date: Thu Nov  1 15:26:27 2012
New Revision: 1404642

URL: http://svn.apache.org/viewvc?rev=1404642&view=rev
Log:
Bugzilla 54070: Patch for typos in comments, javadoc and documentation 

Modified:
    poi/trunk/src/documentation/content/xdocs/spreadsheet/excelant.xml
    poi/trunk/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
    poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java
    poi/trunk/src/java/org/apache/poi/common/usermodel/Hyperlink.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java
    poi/trunk/src/records/definitions/linked_data_record.xml
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java

Modified: poi/trunk/src/documentation/content/xdocs/spreadsheet/excelant.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/spreadsheet/excelant.xml?rev=1404642&r1=1404641&r2=1404642&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/spreadsheet/excelant.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/spreadsheet/excelant.xml Thu Nov  1 15:26:27 2012
@@ -70,7 +70,7 @@ workbooks then you need to have the foll
     <typedef resource="org/apache/poi/ss/excelant/antlib.xml" classpathref="excelant.path" />
 ]]></source>
 <p>
- Where excelant.path referes to the classpath with POI jars.
+ Where excelant.path refers to the classpath with POI jars.
  Using this approach the provided extensions will live in the default namespace. Note that the default task/typenames (evaluate, test) may be too generic and should either be explicitly overridden or used with a namespace.
 </p>
 <ul><li>Similar, but assigning a namespace URI:</li></ul> 

Modified: poi/trunk/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/spreadsheet/quick-guide.xml?rev=1404642&r1=1404641&r2=1404642&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/spreadsheet/quick-guide.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/spreadsheet/quick-guide.xml Thu Nov  1 15:26:27 2012
@@ -1437,7 +1437,7 @@ Examples:
     CreationHelper createHelper = wb.getCreationHelper();
 
     //cell style for hyperlinks
-    //by default hypelrinks are blue and underlined
+    //by default hyperlinks are blue and underlined
     CellStyle hlink_style = wb.createCellStyle();
     Font hlink_font = wb.createFont();
     hlink_font.setUnderline(Font.U_SINGLE);

Modified: poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java?rev=1404642&r1=1404641&r2=1404642&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java Thu Nov  1 15:26:27 2012
@@ -30,13 +30,13 @@ public class HyperlinkExample {
 
     public static void main(String[]args) throws Exception{
         Workbook wb = new XSSFWorkbook(); //or new HSSFWorkbook();
-        CreationHelper createHelper = wb.getCreationHelper();
-
-        //cell style for hyperlinks
-        //by default hypelrinks are blue and underlined
-        CellStyle hlink_style = wb.createCellStyle();
-        Font hlink_font = wb.createFont();
-        hlink_font.setUnderline(Font.U_SINGLE);
+        CreationHelper createHelper = wb.getCreationHelper();
+
+        //cell style for hyperlinks
+        //by default hyperlinks are blue and underlined
+        CellStyle hlink_style = wb.createCellStyle();
+        Font hlink_font = wb.createFont();
+        hlink_font.setUnderline(Font.U_SINGLE);
         hlink_font.setColor(IndexedColors.BLUE.getIndex());
         hlink_style.setFont(hlink_font);
 

Modified: poi/trunk/src/java/org/apache/poi/common/usermodel/Hyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/common/usermodel/Hyperlink.java?rev=1404642&r1=1404641&r2=1404642&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/common/usermodel/Hyperlink.java (original)
+++ poi/trunk/src/java/org/apache/poi/common/usermodel/Hyperlink.java Thu Nov  1 15:26:27 2012
@@ -21,7 +21,7 @@ package org.apache.poi.common.usermodel;
  */
 public interface Hyperlink {
     /**
-     * Link to a existing file or web page
+     * Link to an existing file or web page
      */
     public static final int LINK_URL = 1;
 
@@ -42,14 +42,14 @@ public interface Hyperlink {
 
     
     /**
-     * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.
+     * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.
      *
      * @return  the address of this hyperlink
      */
     public String getAddress();
 
     /**
-     * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.
+     * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.
      *
      * @param address  the address of this hyperlink
      */

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java?rev=1404642&r1=1404641&r2=1404642&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java Thu Nov  1 15:26:27 2012
@@ -24,13 +24,13 @@ import org.apache.poi.ss.usermodel.Hyper
  *
  * @author Yegor Kozlov (yegor at apache dot org)
  */
-public class HSSFHyperlink implements Hyperlink {
-
-    /**
-     * Link to a existing file or web page
-     */
-    public static final int LINK_URL = 1;
-
+public class HSSFHyperlink implements Hyperlink {
+
+    /**
+     * Link to an existing file or web page
+     */
+    public static final int LINK_URL = 1;
+
     /**
      * Link to a place in this document
      */
@@ -49,13 +49,13 @@ public class HSSFHyperlink implements Hy
     /**
      * Low-level record object that stores the actual hyperlink data
      */
-    protected HyperlinkRecord record = null;
-
-    /**
-     * If we create a new hypelrink remember its type
-     */
-    protected int link_type;
-
+    protected HyperlinkRecord record = null;
+
+    /**
+     * If we create a new hyperlink remember its type
+     */
+    protected int link_type;
+
     /**
      * Construct a new hyperlink
      *
@@ -173,13 +173,13 @@ public class HSSFHyperlink implements Hy
      */
     public void setLastColumn(int col){
         record.setLastColumn((short)col);
-    }
-
-    /**
-     * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.
-     *
-     * @return  the address of this hyperlink
-     */
+    }
+
+    /**
+     * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.
+     *
+     * @return  the address of this hyperlink
+     */
     public String getAddress(){
         return record.getAddress();
     }
@@ -187,31 +187,31 @@ public class HSSFHyperlink implements Hy
         return record.getTextMark();
     }
 
-    /**
-     * Convenience method equivalent to {@link #setAddress(String)}
-     *
-     * @param textMark the place in worksheet this hypelrink referes to, e.g. 'Target Sheet'!A1'
-     */
-    public void setTextMark(String textMark) {
-        record.setTextMark(textMark);
+    /**
+     * Convenience method equivalent to {@link #setAddress(String)}
+     *
+     * @param textMark the place in worksheet this hyperlink refers to, e.g. 'Target Sheet'!A1'
+     */
+    public void setTextMark(String textMark) {
+        record.setTextMark(textMark);
     }
     public String getShortFilename(){
         return record.getShortFilename();
     }
-    /**
-     * Convenience method equivalent to {@link #setAddress(String)}
-     *
-     * @param shortFilename the path to a file this hypelrink points to, e.g. 'readme.txt'
-     */
-    public void setShortFilename(String shortFilename) {
-        record.setShortFilename(shortFilename);
-    }
-
-    /**
-     * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.
-     *
-     * @param address  the address of this hyperlink
-     */
+    /**
+     * Convenience method equivalent to {@link #setAddress(String)}
+     *
+     * @param shortFilename the path to a file this hyperlink points to, e.g. 'readme.txt'
+     */
+    public void setShortFilename(String shortFilename) {
+        record.setShortFilename(shortFilename);
+    }
+
+    /**
+     * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.
+     *
+     * @param address  the address of this hyperlink
+     */
     public void setAddress(String address){
         record.setAddress(address);
     }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java?rev=1404642&r1=1404641&r2=1404642&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java Thu Nov  1 15:26:27 2012
@@ -906,9 +906,9 @@ public final class XSSFCell implements C
     }
 
     /**
-     * Assign a hypelrink to this cell
+     * Assign a hyperlink to this cell
      *
-     * @param hyperlink the hypelrink to associate with this cell
+     * @param hyperlink the hyperlink to associate with this cell
      */
     public void setHyperlink(Hyperlink hyperlink) {
         XSSFHyperlink link = (XSSFHyperlink)hyperlink;

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java?rev=1404642&r1=1404641&r2=1404642&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java Thu Nov  1 15:26:27 2012
@@ -139,7 +139,7 @@ public class XSSFHyperlink implements Hy
     }
 
     /**
-     * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, path to a file
+     * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file
      *
      * @return the address of this hyperlink
      */

Modified: poi/trunk/src/records/definitions/linked_data_record.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/records/definitions/linked_data_record.xml?rev=1404642&r1=1404641&r2=1404642&view=diff
==============================================================================
--- poi/trunk/src/records/definitions/linked_data_record.xml (original)
+++ poi/trunk/src/records/definitions/linked_data_record.xml Thu Nov  1 15:26:27 2012
@@ -20,7 +20,7 @@
 <record id="0x1051" name="LinkedData" excel-record-id="AI" package="org.apache.poi.hssf.record">
     <suffix>Record</suffix>
     <extends>Record</extends>
-    <description>Describes a linked data record.  This record referes to the series data or text.</description>
+    <description>Describes a linked data record.  This record refers to the series data or text.</description>
     <author>Glen Stampoultzis (glens at apache.org)</author>
     <fields>
         <field type="int" size="1" name="link type" description="What type of link is this?">

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java?rev=1404642&r1=1404641&r2=1404642&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java Thu Nov  1 15:26:27 2012
@@ -119,7 +119,7 @@ public class Picture extends SimpleShape
     /**
      * Create a new Picture and populate the inital structure of the <code>EscherSp</code> record which holds information about this picture.
 
-     * @param idx the index of the picture which referes to <code>EscherBSE</code> container.
+     * @param idx the index of the picture which refers to <code>EscherBSE</code> container.
      * @return the create Picture object
      */
     protected EscherContainerRecord createSpContainer(int idx, boolean isChild) {

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java?rev=1404642&r1=1404641&r2=1404642&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java Thu Nov  1 15:26:27 2012
@@ -220,19 +220,19 @@ public final class TestHSSFHyperlink ext
         sheet.shiftRows(sheet.getFirstRowNum(), sheet.getLastRowNum(), 2);
 
         //cells A3 and A4 don't contain hyperlinks anymore
-        assertNull(sheet.getRow(2).getCell(0).getHyperlink());
-        assertNull(sheet.getRow(3).getCell(0).getHyperlink());
-
-        //the first hypelink now belongs to A5
-        HSSFHyperlink link1_shifted = sheet.getRow(2+2).getCell(0).getHyperlink();
-        assertNotNull(link1_shifted);
-        assertEquals(4, link1_shifted.getFirstRow());
-        assertEquals(4, link1_shifted.getLastRow());
-
-        //the second hypelink now belongs to A6
-        HSSFHyperlink link2_shifted = sheet.getRow(3+2).getCell(0).getHyperlink();
-        assertNotNull(link2_shifted);
-        assertEquals(5, link2_shifted.getFirstRow());
+        assertNull(sheet.getRow(2).getCell(0).getHyperlink());
+        assertNull(sheet.getRow(3).getCell(0).getHyperlink());
+
+        //the first hyperlink now belongs to A5
+        HSSFHyperlink link1_shifted = sheet.getRow(2+2).getCell(0).getHyperlink();
+        assertNotNull(link1_shifted);
+        assertEquals(4, link1_shifted.getFirstRow());
+        assertEquals(4, link1_shifted.getLastRow());
+
+        //the second hyperlink now belongs to A6
+        HSSFHyperlink link2_shifted = sheet.getRow(3+2).getCell(0).getHyperlink();
+        assertNotNull(link2_shifted);
+        assertEquals(5, link2_shifted.getFirstRow());
         assertEquals(5, link2_shifted.getLastRow());
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org