From: Yegor Kozlov Date: Thu, 1 Nov 2012 15:26:27 +0000 (+0000) Subject: Bugzilla 54070: Patch for typos in comments, javadoc and documentation X-Git-Tag: 3.10-beta1~109 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b5b1f94e24534d60e37143d594a957a288749e0a;p=poi.git Bugzilla 54070: Patch for typos in comments, javadoc and documentation git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1404642 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/documentation/content/xdocs/spreadsheet/excelant.xml b/src/documentation/content/xdocs/spreadsheet/excelant.xml index 6594bc1b87..cf94dd5f22 100644 --- a/src/documentation/content/xdocs/spreadsheet/excelant.xml +++ b/src/documentation/content/xdocs/spreadsheet/excelant.xml @@ -70,7 +70,7 @@ workbooks then you need to have the following jars in your path:

]]>

- 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.

diff --git a/src/documentation/content/xdocs/spreadsheet/quick-guide.xml b/src/documentation/content/xdocs/spreadsheet/quick-guide.xml index b4dc72eba1..b15069722a 100644 --- a/src/documentation/content/xdocs/spreadsheet/quick-guide.xml +++ b/src/documentation/content/xdocs/spreadsheet/quick-guide.xml @@ -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); diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java b/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java index dd30fcc232..005bdc756d 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java +++ b/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java @@ -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); diff --git a/src/java/org/apache/poi/common/usermodel/Hyperlink.java b/src/java/org/apache/poi/common/usermodel/Hyperlink.java index 90e26927bf..f75c890204 100644 --- a/src/java/org/apache/poi/common/usermodel/Hyperlink.java +++ b/src/java/org/apache/poi/common/usermodel/Hyperlink.java @@ -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 */ diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java b/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java index 711c6d145e..6ccf46353c 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java @@ -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 { + + /** + * 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 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; + + /** + * 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 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 - */ + } + + /** + * 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 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); + /** + * 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); } diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java index 1185b562a4..58b3c561d7 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java @@ -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; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java index dfe3423254..e67e784310 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java @@ -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 */ diff --git a/src/records/definitions/linked_data_record.xml b/src/records/definitions/linked_data_record.xml index b4b31998fe..bd247bd63e 100644 --- a/src/records/definitions/linked_data_record.xml +++ b/src/records/definitions/linked_data_record.xml @@ -20,7 +20,7 @@ Record Record - Describes a linked data record. This record referes to the series data or text. + Describes a linked data record. This record refers to the series data or text. Glen Stampoultzis (glens at apache.org) diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java b/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java index 8a8f843569..8ffb111cc0 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java +++ b/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java @@ -119,7 +119,7 @@ public class Picture extends SimpleShape { /** * Create a new Picture and populate the inital structure of the EscherSp record which holds information about this picture. - * @param idx the index of the picture which referes to EscherBSE container. + * @param idx the index of the picture which refers to EscherBSE container. * @return the create Picture object */ protected EscherContainerRecord createSpContainer(int idx, boolean isChild) { diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java index 0188e8b270..be7b0b9845 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java @@ -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()); + 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()); } }