]> source.dussan.org Git - poi.git/commitdiff
Bugzilla 54070: Patch for typos in comments, javadoc and documentation
authorYegor Kozlov <yegor@apache.org>
Thu, 1 Nov 2012 15:26:27 +0000 (15:26 +0000)
committerYegor Kozlov <yegor@apache.org>
Thu, 1 Nov 2012 15:26:27 +0000 (15:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1404642 13f79535-47bb-0310-9956-ffa450edef68

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

index 6594bc1b87acd13a1aa7e73b9e7353a4e6afb474..cf94dd5f224ac5f7ad04aa1205a76e028ef9ebde 100644 (file)
@@ -70,7 +70,7 @@ workbooks then you need to have the following jars in your path:</p>
     <typedef resource="org/apache/poi/ss/excelant/antlib.xml" classpathref="excelant.path" />\r
 ]]></source>\r
 <p>\r
- Where excelant.path referes to the classpath with POI jars.\r
+ Where excelant.path refers to the classpath with POI jars.\r
  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.\r
 </p>\r
 <ul><li>Similar, but assigning a namespace URI:</li></ul> \r
index b4dc72eba1d287e7f1fe5a3176396605518cada8..b15069722a8cf20cdd7e80c6d59be26233a7f6c0 100644 (file)
@@ -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);
index dd30fcc23215b598642a40e6952bb0119d6c149a..005bdc756d75a6ad45321f2cf6d46a52d1262eb2 100644 (file)
@@ -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();\r
+\r
+        //cell style for hyperlinks\r
+        //by default hyperlinks are blue and underlined\r
+        CellStyle hlink_style = wb.createCellStyle();\r
+        Font hlink_font = wb.createFont();\r
+        hlink_font.setUnderline(Font.U_SINGLE);\r
         hlink_font.setColor(IndexedColors.BLUE.getIndex());
         hlink_style.setFont(hlink_font);
 
index 90e26927bf865689b0cda718a36d1504d938555f..f75c89020433ffbf95e20612ee064ba613770c8f 100644 (file)
@@ -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
      */
index 711c6d145e152f86f4edd1aa8b91a5c3b5356beb..6ccf46353cbb55bb39a733d3fad5110923abd3a0 100644 (file)
@@ -24,13 +24,13 @@ import org.apache.poi.ss.usermodel.Hyperlink;
  *
  * @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 {\r
+\r
+    /**\r
+     * Link to an existing file or web page\r
+     */\r
+    public static final int LINK_URL = 1;\r
+\r
     /**
      * Link to a place in this document
      */
@@ -49,13 +49,13 @@ public class HSSFHyperlink implements Hyperlink {
     /**
      * 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;\r
+\r
+    /**\r
+     * If we create a new hyperlink remember its type\r
+     */\r
+    protected int link_type;\r
+\r
     /**
      * Construct a new hyperlink
      *
@@ -173,13 +173,13 @@ public class HSSFHyperlink implements Hyperlink {
      */
     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
-     */
+    }\r
+\r
+    /**\r
+     * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.\r
+     *\r
+     * @return  the address of this hyperlink\r
+     */\r
     public String getAddress(){
         return record.getAddress();
     }
@@ -187,31 +187,31 @@ public class HSSFHyperlink implements Hyperlink {
         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);
+    /**\r
+     * Convenience method equivalent to {@link #setAddress(String)}\r
+     *\r
+     * @param textMark the place in worksheet this hyperlink refers to, e.g. 'Target Sheet'!A1'\r
+     */\r
+    public void setTextMark(String textMark) {\r
+        record.setTextMark(textMark);\r
     }
     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
-     */
+    /**\r
+     * Convenience method equivalent to {@link #setAddress(String)}\r
+     *\r
+     * @param shortFilename the path to a file this hyperlink points to, e.g. 'readme.txt'\r
+     */\r
+    public void setShortFilename(String shortFilename) {\r
+        record.setShortFilename(shortFilename);\r
+    }\r
+\r
+    /**\r
+     * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.\r
+     *\r
+     * @param address  the address of this hyperlink\r
+     */\r
     public void setAddress(String address){
         record.setAddress(address);
     }
index 1185b562a4efa7d0b75ee76aa7c57e14c6a1bd1f..58b3c561d799ee0a78b39cb866e40924a67ffe0e 100644 (file)
@@ -906,9 +906,9 @@ public final class XSSFCell implements Cell {
     }
 
     /**
-     * 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;
index dfe3423254c6e785ec34c4672d3caacf7b45b22b..e67e78431068e32c7eab482dd0a4dab4fb83a17b 100644 (file)
@@ -139,7 +139,7 @@ public class XSSFHyperlink implements Hyperlink {
     }
 
     /**
-     * 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
      */
index b4b31998fec8265db3688305c0efaf3f35af987e..bd247bd63ed38db60d089ac608023a1a0f139ff9 100644 (file)
@@ -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?">
index 8a8f843569f7464dcf259f72dfbb474ada15726e..8ffb111cc0d95c5a116ae07585ffc5d3e94fd60f 100644 (file)
@@ -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) {
index 0188e8b270204420060df7264185e9eea66f572f..be7b0b98455fbba9ebcb4da1cd13ac2d88158809 100644 (file)
@@ -220,19 +220,19 @@ public final class TestHSSFHyperlink extends BaseTestHyperlink {
         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());\r
+        assertNull(sheet.getRow(3).getCell(0).getHyperlink());\r
+\r
+        //the first hyperlink now belongs to A5\r
+        HSSFHyperlink link1_shifted = sheet.getRow(2+2).getCell(0).getHyperlink();\r
+        assertNotNull(link1_shifted);\r
+        assertEquals(4, link1_shifted.getFirstRow());\r
+        assertEquals(4, link1_shifted.getLastRow());\r
+\r
+        //the second hyperlink now belongs to A6\r
+        HSSFHyperlink link2_shifted = sheet.getRow(3+2).getCell(0).getHyperlink();\r
+        assertNotNull(link2_shifted);\r
+        assertEquals(5, link2_shifted.getFirstRow());\r
         assertEquals(5, link2_shifted.getLastRow());
     }
 }