diff --git a/build.gradle b/build.gradle index 2c086de8074..411b1f0cdf1 100644 --- a/build.gradle +++ b/build.gradle @@ -367,7 +367,7 @@ subprojects { // see https://github.com/java9-modularity/gradle-modules-plugin/issues/97 // opposed to the recommendation there, it doesn't work to add ... to the dependencies // testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.7.1' - // gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module + // gradle's gradle-worker.jar is still not a JPMS module and thus runs as unnamed module '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=org.apache.poi.poi', '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED', '--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED', diff --git a/build.xml b/build.xml index 55a97e86f34..edfceb18e0f 100644 --- a/build.xml +++ b/build.xml @@ -3223,7 +3223,7 @@ under the License. -${rel_date} - POI ${version.id} available

The Apache POI team is pleased to announce the release of ${version.id}. Featured are a handful of new areas of functionality and numerous bug fixes.

diff --git a/jenkins/create_jobs.groovy b/jenkins/create_jobs.groovy index 0a5bd686577..a9f1a60988b 100644 --- a/jenkins/create_jobs.groovy +++ b/jenkins/create_jobs.groovy @@ -53,7 +53,7 @@ def poijobs = [ properties: ["-Dadditionaljar=${xercesLib}"] ], // [ name: 'POI-DSL-Maven', trigger: 'H */4 * * *', maven: true, -// // not needed any more now that we use Gradle for SonarQube +// // not needed anymore now that we use Gradle for SonarQube // disabled: true // ], [ name: 'POI-DSL-regenerate-javadoc', trigger: triggerSundays, javadoc: true @@ -92,7 +92,7 @@ def poijobs = [ [ name: 'POI-DSL-Windows-1.18', jdk: '1.18', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true, skipSpotbugs: true ], - [ name: 'POI-DSL-Github-PullRequests', trigger: '', skipcigame: true, disabled: true + [ name: 'POI-DSL-GitHub-PullRequests', trigger: '', skipcigame: true, disabled: true ], ] @@ -265,7 +265,7 @@ poijobs.each { poijob -> env('CI_BUILD', 'TRUE') if(jdkKey == '1.10') { // when using JDK 9/10 for running Ant, we need to provide more modules for the forbidden-api-checks task - // on JDK 11 and newer there is no such module any more, so do not add it here + // on JDK 11 and newer there is no such module anymore, so do not add it here env('ANT_OPTS', '--add-modules=java.xml.bind --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED') } env('FORREST_HOME', poijob.windows ? 'f:\\jenkins\\tools\\forrest\\latest' : '/home/jenkins/tools/forrest/latest') @@ -490,7 +490,7 @@ xmlbeansjobs.each { xjob -> env('LANG', 'en_US.UTF-8') if(jdkKey == '1.10') { // when using JDK 9/10 for running Ant, we need to provide more modules for the forbidden-api-checks task - // on JDK 11 and newer there is no such module any more, so do not add it here + // on JDK 11 and newer there is no such module anymore, so do not add it here env('ANT_OPTS', '--add-modules=java.xml.bind --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED') } else if (jdkKey == '1.11' || jdkKey == '1.12' || jdkKey == '1.13' || jdkKey == '1.14' || jdkKey == '1.15' || jdkKey == '1.16' || jdkKey == '1.17' || jdkKey == '1.18' || jdkKey == '1.19' || jdkKey == '1.20' || jdkKey == '1.21') { diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java b/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java index 010504140ce..18c999db400 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java @@ -165,7 +165,7 @@ public static void handleEvent(final POIFSFileSystem poiFs, final POIFSReaderEve try (InputStream is = su.get()) { final POIFSDocumentPath path = event.getPath(); - // Ensures that the directory hierarchy for a document in a POI fileystem is in place. + // Ensures that the directory hierarchy for a document in a POI filesystem is in place. // Get the root directory. It does not have to be created since it always exists in a POIFS. DirectoryEntry de = poiFs.getRoot(); if (File.separator.equals(path.toString())) { diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java b/poi-examples/src/main/java/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java index 71f4d8aa935..8ac62db1482 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java @@ -152,7 +152,7 @@ private static void handleEvent(final POIFSFileSystem poiFs, final POIFSReaderEv try (InputStream is = isSup.get()) { final POIFSDocumentPath path = event.getPath(); - // Ensures that the directory hierarchy for a document in a POI fileystem is in place. + // Ensures that the directory hierarchy for a document in a POI filesystem is in place. // Get the root directory. It does not have to be created since it always exists in a POIFS. DirectoryEntry de = poiFs.getRoot(); diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hslf/TableDemo.java b/poi-examples/src/main/java/org/apache/poi/examples/hslf/TableDemo.java index 561ec717ab3..01d23c3baaa 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/hslf/TableDemo.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/hslf/TableDemo.java @@ -44,7 +44,7 @@ public final class TableDemo { {"Total PO History Spend", "$10,172,038"} }; - //test data for the second taable + //test data for the second table static final String[][] txt2 = { {"Data Source"}, {"CAS Internal Metrics - Item Master Summary\r" + diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/InCellLists.java b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/InCellLists.java index 28c03a9bc4a..e58ee49e43f 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/InCellLists.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/InCellLists.java @@ -45,7 +45,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more * Though different methods are provided to construct single and multi-level * plain, numbered and bulleted lists, close examination will reveal that they * are not strictly necessary. If the inputs to the listInCell() and - * multilLevelListInCell() methods are constructed to include the bullet + * multiLevelListInCell() methods are constructed to include the bullet * character or the item numbers then these methods alone may be sufficient. */ @SuppressWarnings({"java:S106","java:S4823"}) diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/ZoomSheet.java b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/ZoomSheet.java index a3ddcc2f5f5..aedb0f4a020 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/ZoomSheet.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/ZoomSheet.java @@ -26,7 +26,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.hssf.usermodel.HSSFWorkbook; /** - * Sets the zoom magnication for a sheet. + * Sets the zoom magnification for a sheet. */ public class ZoomSheet { diff --git a/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java b/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java index 56ee62d271c..1649d77d0b4 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/ss/AddDimensionedImage.java @@ -91,7 +91,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more * Taken together, the first four methods define the locations of the top left * and bottom right hand corners of the image if you imagine that the image is * represented by a simple rectangle. The setDx1() and setDy1() methods locate - * the top left hand corner of the image while setDx2() and and Dy2() locate the + * the top left hand corner of the image while setDx2() and Dy2() locate the * bottom right hand corner of the image. An individual image can be inserted * into a single cell or is can lie across many cells and the latter four methods * are used to define just where the image should be positioned. They do this by @@ -211,7 +211,7 @@ public class AddDimensionedImage { // increased to accommodate the image if it is not already larger. The image // will be layed across one or many rows. // Passing EXPAND_ROW_AND_COLUMN will result in the height of the row - // bing increased along with the width of the column to accomdate the + // bing increased along with the width of the column to accommodate the // image if either is not already larger. // Passing OVERLAY_ROW_AND_COLUMN will result in the image being layed // over one or more rows and columns. No row or column will be resized, @@ -434,7 +434,7 @@ private ClientAnchorDetail fitImageToColumns(Sheet sheet, int colNumber, int pictureWidthCoordinates; ClientAnchorDetail colClientAnchorDetail = null; - // Get the colum's width in millimetres + // Get the column's width in millimetres colWidthMM = ConvertImageUnits.widthUnits2Millimetres( (short) sheet.getColumnWidth(colNumber)); @@ -632,7 +632,7 @@ private ClientAnchorDetail calculateColumnLocation(Sheet sheet, totalWidthMM += (colWidthMM + ConvertImageUnits.CELL_BORDER_WIDTH_MILLIMETRES); toColumn++; } - // De-crement by one the last column value. + // Decrement by one the last column value. toColumn--; // Highly unlikely that this will be true but, if the width of a series // of columns is exactly equal to the required width of the image, then @@ -647,9 +647,9 @@ private ClientAnchorDetail calculateColumnLocation(Sheet sheet, // A problem could occur if the image is sized to fit into one or // more columns. If that occurs, the value in the toColumn variable // will be in error. To overcome this, there are two options, to - // ibcrement the toColumn variable's value by one or to pass the - // total number of co-ordinate positions to the third paramater - // of the ClientAnchorDetail constructor. For no sepcific reason, + // increment the toColumn variable's value by one or to pass the + // total number of co-ordinate positions to the third parameter + // of the ClientAnchorDetail constructor. For no specific reason, // the latter option is used below. if (sheet instanceof HSSFSheet) { anchorDetail = new ClientAnchorDetail(startingColumn, @@ -663,13 +663,13 @@ private ClientAnchorDetail calculateColumnLocation(Sheet sheet, // necessary to calculate just how much - this will become the inset // for the ClientAnchorDetail object. else { - // Firstly, claculate how much of the image should overlap into + // Firstly, calculate how much of the image should overlap into // the next column. overlapMM = reqImageWidthMM - (totalWidthMM - colWidthMM); - // When the required size is very close indded to the column size, - // the calcaulation above can produce a negative value. To prevent - // problems occuring in later caculations, this is simply removed + // When the required size is very close indeed to the column size, + // the calculation above can produce a negative value. To prevent + // problems occurring in later calculations, this is simply removed // be setting the overlapMM value to zero. if (overlapMM < 0) { overlapMM = 0.0D; @@ -677,10 +677,10 @@ private ClientAnchorDetail calculateColumnLocation(Sheet sheet, if (sheet instanceof HSSFSheet) { // Next, from the columns width, calculate how many co-ordinate - // positons there are per millimetre + // positions there are per millimetre coordinatePositionsPerMM = (colWidthMM == 0) ? 0 : ConvertImageUnits.TOTAL_COLUMN_COORDINATE_POSITIONS / colWidthMM; - // From this figure, determine how many co-ordinat positions to + // From this figure, determine how many co-ordinate positions to // inset the left hand or bottom edge of the image. inset = (int) (coordinatePositionsPerMM * overlapMM); } else { @@ -922,16 +922,16 @@ public int getInset() { */ public static class ConvertImageUnits { - // Each cell conatins a fixed number of co-ordinate points; this number + // Each cell contains a fixed number of co-ordinate points; this number // does not vary with row height or column width or with font. These two // constants are defined below. public static final int TOTAL_COLUMN_COORDINATE_POSITIONS = 1023; public static final int TOTAL_ROW_COORDINATE_POSITIONS = 255; - // The resoultion of an image can be expressed as a specific number + // The resolution of an image can be expressed as a specific number // of pixels per inch. Displays and printers differ but 96 pixels per - // inch is an acceptable standard to beging with. + // inch is an acceptable standard to begin with. public static final int PIXELS_PER_INCH = 96; - // Cnstants that defines how many pixels and points there are in a + // Constants that defines how many pixels and points there are in a // millimetre. These values are required for the conversion algorithm. public static final double PIXELS_PER_MILLIMETRES = 3.78; public static final double POINTS_PER_MILLIMETRE = 2.83; @@ -939,7 +939,7 @@ public static class ConvertImageUnits { // positioned to exactly cover one cell are different by almost exactly // 2mm - give or take rounding errors. This constant allows that // additional amount to be accounted for when calculating how many - // celles the image ought to overlie. + // cells the image ought to overlie. public static final double CELL_BORDER_WIDTH_MILLIMETRES = 2.0D; public static final short EXCEL_COLUMN_WIDTH_FACTOR = 256; public static final int UNIT_OFFSET_LENGTH = 7; diff --git a/poi-examples/src/main/java/org/apache/poi/examples/ss/ConditionalFormats.java b/poi-examples/src/main/java/org/apache/poi/examples/ss/ConditionalFormats.java index db65f767874..564947aea94 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/ss/ConditionalFormats.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/ss/ConditionalFormats.java @@ -75,7 +75,7 @@ public static void main(String[] args) throws IOException { multiCell(wb.createSheet("MultiCell")); overlapping(wb.createSheet("Overlapping")); errors(wb.createSheet("Errors")); - hideDupplicates(wb.createSheet("Hide Dups")); + hideDuplicates(wb.createSheet("Hide Dups")); formatDuplicates(wb.createSheet("Duplicates")); inList(wb.createSheet("In List")); expiry(wb.createSheet("Expiry")); @@ -287,7 +287,7 @@ static void errors(Sheet sheet) { * and make the list easier to read. In this example, when the table is sorted by Region, * the second (and subsequent) occurrences of each region name will have white font colour. */ - static void hideDupplicates(Sheet sheet) { + static void hideDuplicates(Sheet sheet) { sheet.createRow(0).createCell(0).setCellValue("City"); sheet.createRow(1).createCell(0).setCellValue("Boston"); sheet.createRow(2).createCell(0).setCellValue("Boston"); @@ -652,7 +652,7 @@ static void dataBars(Sheet sheet) { /** * Print out a summary of the conditional formatting rules applied to cells on the given sheet. - * Only cells with a matching rule are printed, and for those, all matching rules are sumarized. + * Only cells with a matching rule are printed, and for those, all matching rules are summarized. */ static void evaluateRules(Workbook wb, String sheetName) { final WorkbookEvaluatorProvider wbEvalProv = (WorkbookEvaluatorProvider) wb.getCreationHelper().createFormulaEvaluator(); diff --git a/poi-examples/src/main/java/org/apache/poi/examples/ss/LoadEmbedded.java b/poi-examples/src/main/java/org/apache/poi/examples/ss/LoadEmbedded.java index 8eabd2ced90..ea5472a1a54 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/ss/LoadEmbedded.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/ss/LoadEmbedded.java @@ -83,8 +83,8 @@ public static void loadEmbedded(HSSFWorkbook workbook) throws IOException { } case "Presentation": { DirectoryNode dn = (DirectoryNode) obj.getDirectory(); - SlideShow embeddedSlieShow = new HSLFSlideShow(dn); - embeddedSlieShow.close(); + SlideShow embeddedSlideShow = new HSLFSlideShow(dn); + embeddedSlideShow.close(); break; } default: diff --git a/poi-examples/src/main/java/org/apache/poi/examples/ss/ToCSV.java b/poi-examples/src/main/java/org/apache/poi/examples/ss/ToCSV.java index 8c1058341d7..e7d6d9c60f7 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/ss/ToCSV.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/ss/ToCSV.java @@ -183,7 +183,7 @@ public class ToCSV { * problems during processing. * @throws java.lang.IllegalArgumentException Thrown if the values passed * to the strSource parameter refers to a file or folder that does not - * exist or if the value passed to the strDestination paramater refers + * exist or if the value passed to the strDestination parameter refers * to a folder that does not exist or simply does not refer to a * folder. */ @@ -223,7 +223,7 @@ public void convertExcelToCSV(String strSource, String strDestination) * problems during processing. * @throws java.lang.IllegalArgumentException Thrown if the values passed * to the strSource parameter refers to a file or folder that does not - * exist or if the value passed to the strDestination paramater refers + * exist or if the value passed to the strDestination parameter refers * to a folder that does not exist or simply does not refer to a * folder. */ @@ -266,7 +266,7 @@ public void convertExcelToCSV(String strSource, String strDestination, * problems during processing. * @throws java.lang.IllegalArgumentException Thrown if the values passed * to the strSource parameter refers to a file or folder that does not - * exist, if the value passed to the strDestination paramater refers + * exist, if the value passed to the strDestination parameter refers * to a folder that does not exist, if the value passed to the * strDestination parameter does not refer to a folder or if the * value passed to the formattingConvention parameter is other than @@ -284,7 +284,7 @@ public void convertExcelToCSV(String strSource, String strDestination, "file(s) cannot be found at " + source); } - // Ensure thaat the folder the user has chosen to save the CSV files + // Ensure that the folder the user has chosen to save the CSV files // away into firstly exists and secondly is a folder rather than, for // instance, a data file. File destination = new File(strDestination); @@ -306,7 +306,7 @@ public void convertExcelToCSV(String strSource, String strDestination, ToCSV.EXCEL_STYLE_ESCAPING + " or " + ToCSV.UNIX_STYLE_ESCAPING); } - // Copy the spearator character and formatting convention into local + // Copy the separator character and formatting convention into local // variables for use in other methods. this.separator = separator; this.formattingConvention = formattingConvention; @@ -374,7 +374,7 @@ private void openWorkbook(File file) throws FileNotFoundException, IOException { // Open the workbook and then create the FormulaEvaluator and // DataFormatter instances that will be needed to, respectively, - // force evaluation of forumlae found in cells and create a + // force evaluation of formulae found in cells and create a // formatted String encapsulating the cells contents. this.workbook = WorkbookFactory.create(fis); this.evaluator = this.workbook.getCreationHelper().createFormulaEvaluator(); @@ -409,7 +409,7 @@ private void convertToCSV() { // from the very first row - number 1 - even if it is missing. // Recover a reference to the row and then call another method // which will strip the data from the cells and build lines - // for inclusion in the resylting CSV file. + // for inclusion in the resulting CSV file. lastRowNum = sheet.getLastRowNum(); for(int j = 0; j <= lastRowNum; j++) { row = sheet.getRow(j); @@ -426,7 +426,7 @@ private void convertToCSV() { * @param file An instance of the File class that encapsulates a handle * referring to the CSV file. * @throws java.io.IOException Thrown to indicate and error occurred in the - * underylying file system. + * underlying file system. */ private void saveCSVFile(File file) throws IOException { ArrayList line; @@ -559,9 +559,9 @@ private void rowToCSV(Row row) { * * It is worth making one further note with regard to embedded EOL * characters. If the data in a worksheet is exported as a CSV file using - * Excel itself, then the field will be surounded with speech marks. If the + * Excel itself, then the field will be surrounded with speech marks. If the * resulting CSV file is then re-imports into another worksheet, the EOL - * character will result in the original simgle field occupying more than + * character will result in the original single field occupying more than * one cell. This same 'feature' is replicated in this classes behaviour. * * @param field An instance of the String class encapsulating the formatted @@ -573,12 +573,12 @@ private void rowToCSV(Row row) { private String escapeEmbeddedCharacters(String field) { StringBuilder buffer; - // If the fields contents should be formatted to confrom with Excel's + // If the fields contents should be formatted to conform with Excel's // convention.... if(this.formattingConvention == ToCSV.EXCEL_STYLE_ESCAPING) { // Firstly, check if there are any speech marks (") in the field; - // each occurrence must be escaped with another set of spech marks + // each occurrence must be escaped with another set of speech marks // and then the entire field should be enclosed within another // set of speech marks. Thus, "Yes" he said would become // """Yes"" he said" @@ -629,8 +629,8 @@ public static void main(String[] args) { // files should be written, - optionally - the separator character // that should be used to separate individual items (fields) on the // lines (records) of the CSV file and - again optionally - an integer - // that idicates whether the CSV file ought to obey Excel's or UNIX - // convnetions with regard to formatting fields that contain embedded + // that indicates whether the CSV file ought to obey Excel's or UNIX + // conventions with regard to formatting fields that contain embedded // separator, Speech mark or EOL character(s). // // Note that the names of the CSV files will be derived from those @@ -726,7 +726,7 @@ static class ExcelFilenameFilter implements FilenameFilter { * @param name An instance of the String class that encapsulates the * name of the file. * @return A boolean value that indicates whether the file should be - * included in the array retirned by the call to the listFiles() + * included in the array returned by the call to the listFiles() * method. In this case true will be returned if the name of the * file ends with either '.xls' or '.xlsx' and false will be * returned in all other instances. diff --git a/poi-examples/src/main/java/org/apache/poi/examples/ss/formula/CheckFunctionsSupported.java b/poi-examples/src/main/java/org/apache/poi/examples/ss/formula/CheckFunctionsSupported.java index 4135c80904f..e58a4730eb2 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/ss/formula/CheckFunctionsSupported.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/ss/formula/CheckFunctionsSupported.java @@ -86,12 +86,12 @@ public static void main(String[] args) throws Exception { System.out.println(); System.out.println("Sheet = " + sheetName); - if (probs.unevaluatableCells.isEmpty()) { + if (probs.unevaluableCells.isEmpty()) { System.out.println(" All cells evaluated without error"); } else { - for (CellReference cr : probs.unevaluatableCells.keySet()) { + for (CellReference cr : probs.unevaluableCells.keySet()) { System.out.println(" " + cr.formatAsString() + " - " + - probs.unevaluatableCells.get(cr)); + probs.unevaluableCells.get(cr)); } } } @@ -123,7 +123,7 @@ public FormulaEvaluationProblems getEvaluationProblems(int sheetIndex) { } public FormulaEvaluationProblems getEvaluationProblems(Sheet sheet) { Set unsupportedFunctions = new HashSet<>(); - Map unevaluatableCells = new HashMap<>(); + Map unevaluableCells = new HashMap<>(); for (Row r : sheet) { for (Cell c : r) { @@ -139,24 +139,24 @@ public FormulaEvaluationProblems getEvaluationProblems(Sheet sheet) { NotImplementedFunctionException nie = (NotImplementedFunctionException)e; unsupportedFunctions.add(nie.getFunctionName()); } - unevaluatableCells.put(new CellReference(c), e); + unevaluableCells.put(new CellReference(c), e); } } } - return new FormulaEvaluationProblems(unsupportedFunctions, unevaluatableCells); + return new FormulaEvaluationProblems(unsupportedFunctions, unevaluableCells); } public static class FormulaEvaluationProblems { /** Which used functions are unsupported by POI at this time */ private final Set unsupportedFunctions; - /** Which cells had unevaluatable formulas, and why? */ - private final Map unevaluatableCells; + /** Which cells had unevaluable formulas, and why? */ + private final Map unevaluableCells; protected FormulaEvaluationProblems(Set unsupportedFunctions, - Map unevaluatableCells) { + Map unevaluableCells) { this.unsupportedFunctions = Collections.unmodifiableSet(unsupportedFunctions); - this.unevaluatableCells = Collections.unmodifiableMap(unevaluatableCells); + this.unevaluableCells = Collections.unmodifiableMap(unevaluableCells); } } } diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xslf/Tutorial1.java b/poi-examples/src/main/java/org/apache/poi/examples/xslf/Tutorial1.java index d1b4768a1c9..8afbbb1085c 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xslf/Tutorial1.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xslf/Tutorial1.java @@ -60,7 +60,7 @@ public static void main(String[] args) throws IOException{ XSLFTextShape titlePlaceholder2 = ph2[0]; titlePlaceholder2.setText("This is a title"); XSLFTextShape bodyPlaceholder = ph2[1]; - // we are going to add text by paragraphs. Clear the default placehoder text before that + // we are going to add text by paragraphs. Clear the default placeholder text before that bodyPlaceholder.clearText(); XSLFTextParagraph p1 = bodyPlaceholder.addNewTextParagraph(); p1.setIndentLevel(0); diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java index f0562be0b81..70fdcd2ef66 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java @@ -54,7 +54,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * Demonstrates a workaround you can use to generate large workbooks and avoid OutOfMemory exception. *

- * Note - You probably don't want to use this approach any more! POI + * Note - You probably don't want to use this approach anymore! POI * now includes the SXSSF which handles all of this for you, you should * be using that instead! This code remains mostly for historical interest. *

diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/HyperlinkExample.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/HyperlinkExample.java index 519631960ed..a95f87f7de3 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/HyperlinkExample.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/HyperlinkExample.java @@ -88,7 +88,7 @@ public static void main(String[]args) throws IOException { cell.setHyperlink(link2); cell.setCellStyle(hlink_style); - try (FileOutputStream out = new FileOutputStream("hyperinks.xlsx")) { + try (FileOutputStream out = new FileOutputStream("hyperlinks.xlsx")) { wb.write(out); } } diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/WorkingWithPageSetup.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/WorkingWithPageSetup.java index 2fe5e9c826e..76590f95111 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/WorkingWithPageSetup.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/WorkingWithPageSetup.java @@ -37,7 +37,7 @@ public static void main(String[]args) throws Exception { * * This function Contains 5 parameters: * The first parameter is the index to the sheet (0 = first sheet). - * The second and third parameters specify the range for the columns to repreat. + * The second and third parameters specify the range for the columns to repeat. * To stop the columns from repeating pass in -1 as the start and end column. * The fourth and fifth parameters specify the range for the rows to repeat. * To stop the columns from repeating pass in -1 as the start and end rows. diff --git a/poi-excelant/src/main/java/org/apache/poi/ss/excelant/ExcelAntTest.java b/poi-excelant/src/main/java/org/apache/poi/ss/excelant/ExcelAntTest.java index b2be5c50389..6fe5f5cff70 100644 --- a/poi-excelant/src/main/java/org/apache/poi/ss/excelant/ExcelAntTest.java +++ b/poi-excelant/src/main/java/org/apache/poi/ss/excelant/ExcelAntTest.java @@ -180,7 +180,7 @@ public void execute() throws BuildException { } catch( NullPointerException npe ) { // this means the cell reference in the test is bad. log( "Cell assignment " + eval.getCell() + " in test " + getName() + - " appears to point to an empy cell. Please check the " + + " appears to point to an empty cell. Please check the " + " reference in the ant script.", Project.MSG_ERR ); } } diff --git a/poi-excelant/src/test/java/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java b/poi-excelant/src/test/java/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java index 545801c7229..db9aa44ac0f 100644 --- a/poi-excelant/src/test/java/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java +++ b/poi-excelant/src/test/java/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java @@ -62,8 +62,8 @@ void testStringConstructor() { @Test void testLoadNotExistingFile() { - BuildException e = assertThrows(BuildException.class, () -> new ExcelAntWorkbookUtilTestHelper("notexistingFile")); - assertTrue(e.getMessage().contains("notexistingFile")); + BuildException e = assertThrows(BuildException.class, () -> new ExcelAntWorkbookUtilTestHelper("nonexistentFile")); + assertTrue(e.getMessage().contains("nonexistentFile")); } @Test @@ -295,11 +295,11 @@ void testSetString() { @Test void testSetNotExistingSheet() { - String cell = "'NotexistingSheet'!C14" ; + String cell = "'NonexistentSheet'!C14" ; fixture = new ExcelAntWorkbookUtilTestHelper(mortgageCalculatorFileName); BuildException e = assertThrows(BuildException.class, () -> fixture.setStringValue(cell, "some")); - assertTrue(e.getMessage().contains("NotexistingSheet")); + assertTrue(e.getMessage().contains("NonexistentSheet")); } @Test diff --git a/poi-excelant/src/test/java/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtilFactory.java b/poi-excelant/src/test/java/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtilFactory.java index e7e7f3099c1..a958d0f6e94 100644 --- a/poi-excelant/src/test/java/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtilFactory.java +++ b/poi-excelant/src/test/java/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtilFactory.java @@ -24,7 +24,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** - * Tests for the ExcelAntWorbookUtilFactory. + * Tests for the ExcelAntWorkbookUtilFactory. */ class TestExcelAntWorkbookUtilFactory { diff --git a/poi-integration/build.xml b/poi-integration/build.xml index 7585fb69351..5edc7292685 100644 --- a/poi-integration/build.xml +++ b/poi-integration/build.xml @@ -125,7 +125,7 @@ Before running this, you should execute the "jar" target in the main build.gradl diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java index 11467117054..09a030f7837 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java @@ -1314,7 +1314,7 @@ public PackageRelationshipCollection getRelationshipsByType( } /** - * Retrieves all relationships with specified id (normally just ine because + * Retrieves all relationships with specified id (normally just fine because * a relationship id is supposed to be unique). * * @param id @@ -1432,7 +1432,7 @@ public void removeUnmarshaller(String contentType) { } - /* Accesseurs */ + /* Accessors */ /** * Get the package access mode. diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java index eae8234b9f6..f0a22bd973b 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java @@ -1164,7 +1164,7 @@ public void addCachedCertificate(String alias, byte[] x509Bytes) throws KeyStore addCachedCertificate(null, x509); } - public X509Certificate getCachedCertificateByPrinicipal(String principalName) { + public X509Certificate getCachedCertificateByPrincipal(String principalName) { if (keyStore == null) { return null; } diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java index e429c22d229..6bd076fdc98 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java @@ -187,7 +187,7 @@ public byte[] timeStamp(SignatureInfo signatureInfo, byte[] data, RevocationData X509CertificateHolder parentHolder = certificateMap.get(issuer.getName()); child = (parentHolder != null) ? x509converter.getCertificate(parentHolder) - : signatureConfig.getCachedCertificateByPrinicipal(issuer.getName()); + : signatureConfig.getCachedCertificateByPrincipal(issuer.getName()); if (child != null) { retrieveCRL(signatureConfig, child).forEach(revocationData::addCRL); } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGImageRenderer.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGImageRenderer.java index 2bd46c4876a..6e1df454b3e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGImageRenderer.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGImageRenderer.java @@ -50,7 +50,7 @@ public class SVGImageRenderer implements ImageRenderer { public SVGImageRenderer() { String parser = XMLResourceDescriptor.getXMLParserClassName(); - // TOOO: tell the batik guys to use secure parsing feature + // TODO: tell the batik guys to use secure parsing feature svgFact = new SAXSVGDocumentFactory(parser); SVGUserAgent agent = new SVGUserAgent(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFColor.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFColor.java index 796a072b9f0..d287cbb1830 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFColor.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFColor.java @@ -268,7 +268,7 @@ private static int getRawValue(CTSchemeColor phClr, XmlObject xmlObject, String } /** - * Read a perecentage value from the supplied xml bean. + * Read a percentage value from the supplied xml bean. * Example: * * diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFObjectShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFObjectShape.java index ae3459e5907..1fa6ff2099f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFObjectShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFObjectShape.java @@ -238,7 +238,7 @@ static CTGraphicalObjectFrame prototype(int shapeId, String picRel){ CTGraphicalObjectFrameNonVisual nvGr = frame.addNewNvGraphicFramePr(); CTNonVisualDrawingProps cnv = nvGr.addNewCNvPr(); - // usually the shape name has its index based on the n-th embeding, but having + // usually the shape name has its index based on the n-th embedding, but having // the prototype separate from the actual updating of the object, we use the shape id cnv.setName("Object " + shapeId); cnv.setId(shapeId); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java index 269a0df884c..16c32e1c6d2 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java @@ -764,7 +764,7 @@ void copy(XSLFShape sh){ /** * Specifies the line end decoration, such as a triangle or arrowhead. * - * @param style the line end docoration style + * @param style the line end decoration style */ @SuppressWarnings("WeakerAccess") public void setLineHeadDecoration(DecorationShape style) { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/util/PPTX2PNG.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/util/PPTX2PNG.java index a589855795b..d56ca2c559d 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/util/PPTX2PNG.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/util/PPTX2PNG.java @@ -82,7 +82,7 @@ private static void usage(String error){ " -charset sets the default charset to be used, defaults to Windows-1252\n" + " -emfHeaderBounds force the usage of the emf header bounds to calculate the bounding box\n" + " -fontdir

(PDF only) font directories separated by \";\" - use $HOME for current users home dir\n" + - " defaults to the usual plattform directories\n" + + " defaults to the usual platform directories\n" + " -fontTtf (PDF only) regex to match the .ttf filenames\n" + " -fontMap \";\"-separated list of font mappings :"; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java index 55fe271c795..12cd285dc22 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java @@ -89,7 +89,7 @@ public XSSFReader(OPCPackage pkg) throws IOException, OpenXML4JException { /** * Creates a new XSSFReader, for the given package * - * @param pkg an {@code OPCPackage} representing a spreasheet file + * @param pkg an {@code OPCPackage} representing a spreadsheet file * @param allowStrictOoxmlFiles whether to try to handle Strict OOXML format files * @throws OpenXML4JException if the package format is invalid * @throws IOException if there is an I/O issue reading the data diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SharedStringsTable.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SharedStringsTable.java index b83f5f297ed..0935843788f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SharedStringsTable.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SharedStringsTable.java @@ -180,7 +180,7 @@ public int getUniqueCount() { * *

* If the Shared String table already contains this CTRst bean, its index is returned. - * Otherwise a new entry is aded. + * Otherwise a new entry is added. *

* * @param st the entry to add diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFPicture.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFPicture.java index 329125fc287..aec0f0a008c 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFPicture.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFPicture.java @@ -85,7 +85,7 @@ public CTPicture getCTPicture(){ *

* Please note, that this method works correctly only for workbooks * with the default font size (Calibri 11pt for .xlsx). - * If the default font is changed the resized image can be streched vertically or horizontally. + * If the default font is changed the resized image can be stretched vertically or horizontally. *

*/ @Override @@ -98,7 +98,7 @@ public void resize(){ *

* Please note, that this method works correctly only for workbooks * with the default font size (Calibri 11pt for .xlsx). - * If the default font is changed the resized image can be streched vertically or horizontally. + * If the default font is changed the resized image can be stretched vertically or horizontally. *

* * @param scale the amount by which image dimensions are multiplied relative to the original size. @@ -201,7 +201,7 @@ private float getColumnWidthInPixels(int columnIndex){ private float getRowHeightInPixels(int rowIndex) { // THE FOLLOWING THREE LINES ARE THE MAIN CHANGE compared to the non-streaming version: use the SXSSF sheet, - // not the XSSF sheet (which never contais rows when using SXSSF) + // not the XSSF sheet (which never contains rows when using SXSSF) XSSFSheet xssfSheet = getSheet(); SXSSFSheet sxSheet = _wb.getSXSSFSheet(xssfSheet); Sheet sheet = sxSheet == null ? xssfSheet : sxSheet; @@ -222,7 +222,7 @@ protected static Dimension getImageDimension(PackagePart part, int type){ try (InputStream stream = part.getInputStream()) { return ImageUtils.getImageDimension(stream, type); } catch (IOException e){ - //return a "singulariry" if ImageIO failed to read the image + //return a "singularity" if ImageIO failed to read the image LOG.atWarn().withThrowable(e).log("Failed to read image"); return new Dimension(); } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java index f976485556b..42f719b52f7 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java @@ -535,11 +535,11 @@ public void remove() * equal to the row number of the argument SXSSFRow * *
  • - * a value less than 0 if the row number of this this SXSSFRow is + * a value less than 0 if the row number of this SXSSFRow is * numerically less than the row number of the argument SXSSFRow *
  • *
  • - * a value greater than 0 if the row number of this this SXSSFRow is + * a value greater than 0 if the row number of this SXSSFRow is * numerically greater than the row number of the argument SXSSFRow *
  • * diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java index 7d0964126f8..ea1c7e1bfb5 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java @@ -1145,7 +1145,7 @@ public boolean isDisplayRowColHeadings() { * Breaks occur above the specified row and left of the specified column inclusive. * * For example, {@code sheet.setColumnBreak(2);} breaks the sheet into two parts - * with columns A,B,C in the first and D,E,... in the second. Simuilar, {@code sheet.setRowBreak(2);} + * with columns A,B,C in the first and D,E,... in the second. Similar, {@code sheet.setRowBreak(2);} * breaks the sheet into two parts with first three rows (rownum=1...3) in the first part * and rows starting with rownum=4 in the second. * diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java index eccbc02e225..c92579576c9 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java @@ -1360,7 +1360,7 @@ public boolean getForceFormulaRecalculation(){ } /** - * Returns the spreadsheet version (EXCLE2007) of this workbook + * Returns the spreadsheet version (EXCEL2007) of this workbook * * @return EXCEL2007 SpreadsheetVersion enum * @since 3.14 beta 2 diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java index aeb7874a6c3..b9944a58d94 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java @@ -56,7 +56,7 @@ protected XSSFChartSheet(PackagePart part) { @Override protected void read(InputStream is) throws IOException { - //initialize the supeclass with a blank worksheet + //initialize the superclass with a blank worksheet super.read(UnsynchronizedByteArrayInputStream.builder().setByteArray(BLANK_WORKSHEET).get()); try { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java index 7d75ddf3943..245f63da8ea 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java @@ -405,7 +405,7 @@ private XSSFGraphicFrame createGraphicFrame(XSSFClientAnchor anchor) { XSSFGraphicFrame graphicFrame = new XSSFGraphicFrame(this, ctGraphicFrame); graphicFrame.setAnchor(anchor); graphicFrame.setId(frameId); - graphicFrame.setName("Diagramm" + frameId); + graphicFrame.setName("Diagram" + frameId); return graphicFrame; } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvenFooter.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvenFooter.java index 118fa793aa6..ace7fd018ae 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvenFooter.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvenFooter.java @@ -33,7 +33,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more *

    * Creating an even header or footer sets this property by default, so all you need to do to * get an even header or footer to display is to create one. Likewise, if both the even header - * and footer are usnset, then this property is unset, and the odd header and footer are used + * and footer are unset, then this property is unset, and the odd header and footer are used * for even pages. *

    */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvenHeader.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvenHeader.java index 45600cfc9d2..87edf9136eb 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvenHeader.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvenHeader.java @@ -33,7 +33,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more *

    * Creating an even header or footer sets this property by default, so all you need to do to * get an even header or footer to display is to create it. Likewise, if both the even header - * and footer are usnset, then this property is unset, and the odd header and footer are used + * and footer are unset, then this property is unset, and the odd header and footer are used * for even pages. *

    */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFirstFooter.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFirstFooter.java index 6902066b6fc..8ef41646c62 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFirstFooter.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFirstFooter.java @@ -32,7 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more *

    * Creating a first page header or footer sets this property by default, so all you need to do to * get an first page header or footer to display is to create one. Likewise, if both the first page - * header and footer are usnset, then this property is unset, and the first page header and footer + * header and footer are unset, then this property is unset, and the first page header and footer * are ignored. *

    */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java index a28a113523c..0f964fa92ce 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java @@ -31,7 +31,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more *

    * Creating a first page header or footer sets this property by default, so all you need to do to * get an first page header or footer to display is to create one. Likewise, if both the first page - * header and footer are usnset, then this property is unset, and the first page header and footer + * header and footer are unset, then this property is unset, and the first page header and footer * are ignored. */ public class XSSFFirstHeader extends XSSFHeaderFooter implements Header{ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java index ec60fdfae3e..7a4c01dc664 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java @@ -73,7 +73,7 @@ public void setEscapementType(short escapementType){ } /** - * XMLBeans and the XSD make this look like it can have multiple values, but it is maxOccurrs=1. + * XMLBeans and the XSD make this look like it can have multiple values, but it is maxOccurs=1. * Use get*Array(), it is much faster than get*List(). * * @see org.apache.poi.ss.usermodel.FontFormatting#isStruckout() diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java index 47d9c22dd0c..010e8fe81ca 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java @@ -88,7 +88,7 @@ protected static CTGraphicalObjectFrame prototype() { CTGraphicalObjectFrameNonVisual nvGraphic = graphicFrame.addNewNvGraphicFramePr(); CTNonVisualDrawingProps props = nvGraphic.addNewCNvPr(); props.setId(0); - props.setName("Diagramm 1"); + props.setName("Diagram 1"); nvGraphic.addNewCNvGraphicFramePr(); CTTransform2D transform = graphicFrame.addNewXfrm(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFName.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFName.java index 1e9047009e4..ebfcf68db35 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFName.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFName.java @@ -110,7 +110,7 @@ public final class XSSFName implements Name { /** * Creates an XSSFName object - called internally by XSSFWorkbook. * - * @param name - the xml bean that holds data represenring this defined name. + * @param name - the xml bean that holds data representing this defined name. * @param workbook - the workbook object associated with the name * @see org.apache.poi.xssf.usermodel.XSSFWorkbook#createName() */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java index 3980a7cb001..4ed750d1202 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java @@ -161,7 +161,7 @@ public void resize(double scale) { *

    * Please note, that this method works correctly only for workbooks * with the default font size (Calibri 11pt for .xlsx). - * If the default font is changed the resized image can be streched vertically or horizontally. + * If the default font is changed the resized image can be stretched vertically or horizontally. *

    * {@code resize(1.0,1.0)} keeps the original size,
    * {@code resize(0.5,0.5)} resize to 50% of the original,
    @@ -243,7 +243,7 @@ protected static Dimension getImageDimension(PackagePart part, int type){ try (InputStream stream = part.getInputStream()) { return ImageUtils.getImageDimension(stream, type); } catch (IOException e){ - //return a "singulariry" if ImageIO failed to read the image + //return a "singularity" if ImageIO failed to read the image LOG.atWarn().withThrowable(e).log("Failed to read image"); return new Dimension(); } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java index e5709c01e9a..f1dfd1a5c92 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java @@ -55,7 +55,7 @@ public XSSFPivotCacheDefinition() { } /** - * Creates an XSSFPivotCacheDefintion representing the given package part and relationship. + * Creates an XSSFPivotCacheDefinition representing the given package part and relationship. * Should only be called when reading in an existing file. * * @param part - The package part that holds xml data representing this pivot cache definition. diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java index f7db5c755d1..e96084e97a5 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java @@ -191,7 +191,7 @@ protected void setDefaultPivotTableDefinition() { pivotTableDefinition.setIndent(0); //The pivot version which created the pivot cache set to default value pivotTableDefinition.setCreatedVersion(CREATED_VERSION); - //Minimun version required to update the pivot cache + //Minimum version required to update the pivot cache pivotTableDefinition.setMinRefreshableVersion(MIN_REFRESHABLE_VERSION); //Version of the application which "updated the spreadsheet last" pivotTableDefinition.setUpdatedVersion(UPDATED_VERSION); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java index fe3e27b10d6..52cacd99301 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java @@ -40,7 +40,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** - * Rich text unicode string. These strings can have fonts applied to arbitary parts of the string. + * Rich text unicode string. These strings can have fonts applied to arbitrary parts of the string. * *

    * Most strings in a workbook have formatting applied at the cell level, that is, the entire string in the cell has the diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFRow.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFRow.java index bceb6cddfa3..5144729fa3b 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFRow.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFRow.java @@ -144,11 +144,11 @@ public Spliterator spliterator() { * equal to the row number of the argument {@code XSSFRow} * *

  • - * a value less than {@code 0} if the row number of this this {@code XSSFRow} is + * a value less than {@code 0} if the row number of this {@code XSSFRow} is * numerically less than the row number of the argument {@code XSSFRow} *
  • *
  • - * a value greater than {@code 0} if the row number of this this {@code XSSFRow} is + * a value greater than {@code 0} if the row number of this {@code XSSFRow} is * numerically greater than the row number of the argument {@code XSSFRow} *
  • * diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java index 70ed47e89e8..ce38d2791f4 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java @@ -140,7 +140,7 @@ public XSSFWorkbook getWorkbook() { } /** - * Initialize worksheet data when reading in an exisiting file. + * Initialize worksheet data when reading in an existing file. */ @Override protected void onDocumentRead() { @@ -1942,7 +1942,7 @@ private void setBreak(int id, CTPageBreak ctPgBreak, int lastIndex) { * Breaks occur above the specified row and left of the specified column inclusive. * * For example, {@code sheet.setColumnBreak(2);} breaks the sheet into two parts - * with columns A,B,C in the first and D,E,... in the second. Simuilar, {@code sheet.setRowBreak(2);} + * with columns A,B,C in the first and D,E,... in the second. Similar, {@code sheet.setRowBreak(2);} * breaks the sheet into two parts with first three rows (rownum=1...3) in the first part * and rows starting with rownum=4 in the second. * @@ -2080,9 +2080,9 @@ public void removeRowBreak(int row) { *

    * *

    - * It is recommended to force recalcuation of formulas on workbook level using + * It is recommended to force recalculation of formulas on workbook level using * {@link Workbook#setForceFormulaRecalculation(boolean)} - * to ensure that all cross-worksheet formuals and external dependencies are updated. + * to ensure that all cross-worksheet formulas and external dependencies are updated. *

    * @param value true if the application will perform a full recalculation of * this worksheet values when the workbook is opened @@ -2181,7 +2181,7 @@ public void setAutobreaks(boolean value) { * Breaks occur above the specified row and left of the specified column inclusive. * * For example, {@code sheet.setColumnBreak(2);} breaks the sheet into two parts - * with columns A,B,C in the first and D,E,... in the second. Simuilar, {@code sheet.setRowBreak(2);} + * with columns A,B,C in the first and D,E,... in the second. Similar, {@code sheet.setRowBreak(2);} * breaks the sheet into two parts with first three rows (rownum=1...3) in the first part * and rows starting with rownum=4 in the second. * @@ -2560,7 +2560,7 @@ public void setColumnHidden(int columnIndex, boolean hidden) { * using the default font (first font in the workbook). *
    * Unless you are using a very special font, the default character is '0' (zero), - * this is true for Arial (default font font in HSSF) and Calibri (default font in XSSF) + * this is true for Arial (default font in HSSF) and Calibri (default font in XSSF) *

    * *

    @@ -4639,7 +4639,7 @@ private XSSFPivotTable createPivotTable() { pivotTables.add(pivotTable); XSSFWorkbook workbook = getWorkbook(); - //Create relationship between the pivot cache defintion and the workbook + //Create relationship between the pivot cache definition and the workbook XSSFPivotCacheDefinition pivotCacheDefinition = (XSSFPivotCacheDefinition) workbook. createRelationship(XSSFRelation.PIVOT_CACHE_DEFINITION, getWorkbook().getXssfFactory(), tableId); String rId = workbook.getRelationId(pivotCacheDefinition); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java index 535683be6a0..bd3a18a9358 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java @@ -458,7 +458,7 @@ public AreaReference getCellReferences() { /** * Set the area reference for the cells which this table covers. The area - * includes includes header rows and totals rows. Automatically synchronizes + * includes header rows and totals rows. Automatically synchronizes * any changes by calling {@link #updateHeaders()}. * * Note: The area's width should be identical to the amount of columns in diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java index cc7284e04b0..a2012450acb 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java @@ -568,7 +568,7 @@ public int addPicture(byte[] pictureData, int format) { /** * Adds a picture to the workbook. * - * @param is The sream to read image from + * @param is The stream to read image from * @param format The format of the picture. * * @return the index to this picture (0 based), the added picture can be obtained from {@link #getAllPictures()} . @@ -1900,19 +1900,19 @@ public boolean isDate1904() { */ @Override public List getAllEmbeddedParts() throws OpenXML4JException { - List embedds = new LinkedList<>(); + List embedded = new LinkedList<>(); for(XSSFSheet sheet : sheets){ // Get the embeddings for the workbook for(PackageRelationship rel : sheet.getPackagePart().getRelationshipsByType(XSSFRelation.OLEEMBEDDINGS.getRelation())) { - embedds.add( sheet.getPackagePart().getRelatedPart(rel) ); + embedded.add( sheet.getPackagePart().getRelatedPart(rel) ); } for(PackageRelationship rel : sheet.getPackagePart().getRelationshipsByType(XSSFRelation.PACKEMBEDDINGS.getRelation())) { - embedds.add( sheet.getPackagePart().getRelatedPart(rel) ); + embedded.add( sheet.getPackagePart().getRelatedPart(rel) ); } } - return embedds; + return embedded; } @Override @@ -2416,7 +2416,7 @@ public void setVBAProject(XSSFWorkbook macroWorkbook) throws IOException, Invali } /** - * Returns the spreadsheet version (EXCLE2007) of this workbook + * Returns the spreadsheet version (EXCEL2007) of this workbook * * @return EXCEL2007 SpreadsheetVersion enum * @since 3.14 beta 2 diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/extensions/XSSFCellAlignment.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/extensions/XSSFCellAlignment.java index b006afc5e26..e7504916d15 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/extensions/XSSFCellAlignment.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/extensions/XSSFCellAlignment.java @@ -31,7 +31,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more * Cell settings available in the Format/Alignment tab */ public class XSSFCellAlignment { - private final CTCellAlignment cellAlignement; + private final CTCellAlignment cellAlignment; /** * Creates a Cell Alignment from the supplied XML definition @@ -39,17 +39,17 @@ public class XSSFCellAlignment { * @param cellAlignment The low-level XML definition of the cell alignment */ public XSSFCellAlignment(CTCellAlignment cellAlignment) { - this.cellAlignement = cellAlignment; + this.cellAlignment = cellAlignment; } /** * Get the type of vertical alignment for the cell * - * @return the type of aligment + * @return the type of alignment * @see VerticalAlignment */ public VerticalAlignment getVertical() { - STVerticalAlignment.Enum align = cellAlignement.getVertical(); + STVerticalAlignment.Enum align = cellAlignment.getVertical(); if (align == null) align = STVerticalAlignment.BOTTOM; return VerticalAlignment.values()[align.intValue() - 1]; @@ -62,17 +62,17 @@ public VerticalAlignment getVertical() { * @see VerticalAlignment */ public void setVertical(VerticalAlignment align) { - cellAlignement.setVertical(STVerticalAlignment.Enum.forInt(align.ordinal() + 1)); + cellAlignment.setVertical(STVerticalAlignment.Enum.forInt(align.ordinal() + 1)); } /** * Get the type of horizontal alignment for the cell * - * @return the type of aligment + * @return the type of alignment * @see HorizontalAlignment */ public HorizontalAlignment getHorizontal() { - STHorizontalAlignment.Enum align = cellAlignement.getHorizontal(); + STHorizontalAlignment.Enum align = cellAlignment.getHorizontal(); if (align == null) align = STHorizontalAlignment.GENERAL; return HorizontalAlignment.values()[align.intValue() - 1]; @@ -85,7 +85,7 @@ public HorizontalAlignment getHorizontal() { * @see HorizontalAlignment */ public void setHorizontal(HorizontalAlignment align) { - cellAlignement.setHorizontal(STHorizontalAlignment.Enum.forInt(align.ordinal() + 1)); + cellAlignment.setHorizontal(STHorizontalAlignment.Enum.forInt(align.ordinal() + 1)); } /** @@ -95,7 +95,7 @@ public void setHorizontal(HorizontalAlignment align) { * @see ReadingOrder */ public void setReadingOrder(ReadingOrder order) { - cellAlignement.setReadingOrder(order.getCode()); + cellAlignment.setReadingOrder(order.getCode()); } /** @@ -105,8 +105,8 @@ public void setReadingOrder(ReadingOrder order) { * @see ReadingOrder */ public ReadingOrder getReadingOrder() { - if(cellAlignement != null && cellAlignement.isSetReadingOrder()) { - return ReadingOrder.forLong(cellAlignement.getReadingOrder()); + if(cellAlignment != null && cellAlignment.isSetReadingOrder()) { + return ReadingOrder.forLong(cellAlignment.getReadingOrder()); } return ReadingOrder.CONTEXT; } @@ -117,7 +117,7 @@ public ReadingOrder getReadingOrder() { * @return indent - number of spaces */ public long getIndent() { - return cellAlignement.getIndent(); + return cellAlignment.getIndent(); } /** @@ -126,7 +126,7 @@ public long getIndent() { * @param indent - number of spaces */ public void setIndent(long indent) { - cellAlignement.setIndent(indent); + cellAlignment.setIndent(indent); } /** @@ -144,7 +144,7 @@ public void setIndent(long indent) { * @return rotation degrees (between 0 and 180 degrees) */ public long getTextRotation() { - return cellAlignement.isSetTextRotation() ? cellAlignement.getTextRotation().longValue() : 0; + return cellAlignment.isSetTextRotation() ? cellAlignment.getTextRotation().longValue() : 0; } /** @@ -170,7 +170,7 @@ public void setTextRotation(long rotation) { if(rotation < 0 && rotation >= -90) { rotation = 90 + ((-1)*rotation); } - cellAlignement.setTextRotation(BigInteger.valueOf(rotation)); + cellAlignment.setTextRotation(BigInteger.valueOf(rotation)); } /** @@ -179,7 +179,7 @@ public void setTextRotation(long rotation) { * @return a boolean value indicating if the text in a cell should be line-wrapped within the cell. */ public boolean getWrapText() { - return cellAlignement.getWrapText(); + return cellAlignment.getWrapText(); } /** @@ -188,15 +188,15 @@ public boolean getWrapText() { * @param wrapped a boolean value indicating if the text in a cell should be line-wrapped within the cell. */ public void setWrapText(boolean wrapped) { - cellAlignement.setWrapText(wrapped); + cellAlignment.setWrapText(wrapped); } public boolean getShrinkToFit() { - return cellAlignement.getShrinkToFit(); + return cellAlignment.getShrinkToFit(); } public void setShrinkToFit(boolean shrink) { - cellAlignement.setShrinkToFit(shrink); + cellAlignment.setShrinkToFit(shrink); } /** @@ -204,6 +204,6 @@ public void setShrinkToFit(boolean shrink) { */ @Internal public CTCellAlignment getCTCellAlignment() { - return cellAlignement; + return cellAlignment; } } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java index c56963685ad..873e1a0fc9e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java @@ -58,7 +58,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more *

    code for "text font size", where font size is a font size in points.
    *
    &K
    *
    code for "text font color" RGB Color is specified as RRGGBB Theme Color - * is specifed as TTSNN where TT is the theme color Id, S is either "+" or "-" + * is specified as TTSNN where TT is the theme color Id, S is either "+" or "-" * of the tint/shade value, NN is the tint/shade value.
    *
    &S
    *
    code for "text strikethrough" on / off
    diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/HeaderFooterHelper.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/HeaderFooterHelper.java index 5e3c4ee0240..c2759e04018 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/HeaderFooterHelper.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/HeaderFooterHelper.java @@ -73,7 +73,7 @@ private String[] getParts(String string) { int rAt = 0; while( - // Ensure all indicies get updated, then -1 tested + // Ensure all indices get updated, then -1 tested (lAt = string.indexOf(HeaderFooterEntity_L)) > -2 && (cAt = string.indexOf(HeaderFooterEntity_C)) > -2 && (rAt = string.indexOf(HeaderFooterEntity_R)) > -2 && diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/model/XWPFHeaderFooterPolicy.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/model/XWPFHeaderFooterPolicy.java index b446473f9d9..ed50e243556 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/model/XWPFHeaderFooterPolicy.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/model/XWPFHeaderFooterPolicy.java @@ -267,7 +267,7 @@ private CTHdrFtr buildHdr(Enum type, XWPFHeaderFooter wrapper, XWPFParagraph[] p * text. The reason was that this line of code; CTHdrFtr ftr = CTHdrFtr.Factory.newInstance(); * created a brand new instance of the CTHDRFtr class which was then populated with data when * it should have recovered the CTHdrFtr object encapsulated within the XWPFHeaderFooter object - * that had previoulsy been instantiated in the createHeader(int, XWPFParagraph[]) or + * that had previously been instantiated in the createHeader(int, XWPFParagraph[]) or * createFooter(int, XWPFParagraph[]) methods. */ private CTHdrFtr buildHdrFtr(XWPFParagraph[] paragraphs, XWPFHeaderFooter wrapper) { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakClear.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakClear.java index 332e9c2d82a..2b13b2139dc 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakClear.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakClear.java @@ -68,7 +68,7 @@ public enum BreakClear { * *
  • If this line is not broken into multiple regions, then treat this * break as a text wrapping break of type none.
  • - *
  • If the parent paragraph is right to left, then these beha viors are + *
  • If the parent paragraph is right to left, then these behaviors are * also reversed.
  • * */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/PositionInParagraph.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/PositionInParagraph.java index 4cd688c2055..08bffa69276 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/PositionInParagraph.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/PositionInParagraph.java @@ -19,8 +19,8 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** - * postion of a character in a paragrapho - * 1st RunPositon + * position of a character in a paragraph + * 1st RunPosition * 2nd TextPosition * 3rd CharacterPosition */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFComments.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFComments.java index 1aff90af298..5fb922f4f1a 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFComments.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFComments.java @@ -61,7 +61,7 @@ public XWPFComments(POIXMLDocumentPart parent, PackagePart part) { super(parent, part); if (!(getParent() instanceof XWPFDocument)) { - throw new IllegalStateException("Parent is not a XWPFDocuemnt: " + getParent()); + throw new IllegalStateException("Parent is not a XWPFDocument: " + getParent()); } this.document = (XWPFDocument) getParent(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java index ee285455f45..3733a863f3a 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java @@ -612,19 +612,19 @@ public CTStyles getStyle() throws XmlException, IOException { */ @Override public List getAllEmbeddedParts() throws OpenXML4JException { - List embedds = new LinkedList<>(); + List embedded = new LinkedList<>(); // Get the embeddings for the workbook PackagePart part = getPackagePart(); for (PackageRelationship rel : getPackagePart().getRelationshipsByType(OLE_OBJECT_REL_TYPE)) { - embedds.add(part.getRelatedPart(rel)); + embedded.add(part.getRelatedPart(rel)); } for (PackageRelationship rel : getPackagePart().getRelationshipsByType(PACK_OBJECT_REL_TYPE)) { - embedds.add(part.getRelatedPart(rel)); + embedded.add(part.getRelatedPart(rel)); } - return embedds; + return embedded; } /** @@ -1309,7 +1309,7 @@ public void enforceReadonlyProtection() { * * @param password the plaintext password, if null no password will be applied * @param hashAlgo the hash algorithm - only md2, m5, sha1, sha256, sha384 and sha512 are supported. - * if null, it will default default to sha1 + * if null, it will default to sha1 */ public void enforceReadonlyProtection(String password, HashAlgorithm hashAlgo) { settings.setEnforcementEditValue(STDocProtect.READ_ONLY, password, hashAlgo); @@ -1345,7 +1345,7 @@ public void enforceFillingFormsProtection() { * * @param password the plaintext password, if null no password will be applied * @param hashAlgo the hash algorithm - only md2, m5, sha1, sha256, sha384 and sha512 are supported. - * if null, it will default default to sha1 + * if null, it will default to sha1 */ public void enforceFillingFormsProtection(String password, HashAlgorithm hashAlgo) { settings.setEnforcementEditValue(STDocProtect.FORMS, password, hashAlgo); @@ -1381,7 +1381,7 @@ public void enforceCommentsProtection() { * * @param password the plaintext password, if null no password will be applied * @param hashAlgo the hash algorithm - only md2, m5, sha1, sha256, sha384 and sha512 are supported. - * if null, it will default default to sha1 + * if null, it will default to sha1 */ public void enforceCommentsProtection(String password, HashAlgorithm hashAlgo) { settings.setEnforcementEditValue(STDocProtect.COMMENTS, password, hashAlgo); @@ -1417,7 +1417,7 @@ public void enforceTrackedChangesProtection() { * * @param password the plaintext password, if null no password will be applied * @param hashAlgo the hash algorithm - only md2, m5, sha1, sha256, sha384 and sha512 are supported. - * if null, it will default default to sha1 + * if null, it will default to sha1 */ public void enforceTrackedChangesProtection(String password, HashAlgorithm hashAlgo) { settings.setEnforcementEditValue(STDocProtect.TRACKED_CHANGES, password, hashAlgo); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java index 56e0c6d8f29..7057a450685 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRun.java @@ -768,7 +768,7 @@ public String getFontName() { * If fcr is null, the font char range "ascii" is used * * @param fcr the font char range, defaults to "ansi" - * @return a string representing the font famil + * @return a string representing the font family */ public String getFontFamily(FontCharRange fcr) { CTRPr pr = getRunProperties(false); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java index 90753d3b92e..2f365da237a 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java @@ -192,7 +192,7 @@ public void setEnforcementEditValue(org.openxmlformats.schemas.wordprocessingml. * @param editValue the protection type * @param password the plaintext password, if null no password will be applied * @param hashAlgo the hash algorithm - only md2, m5, sha1, sha256, sha384 and sha512 are supported. - * if null, it will default default to sha1 + * if null, it will default to sha1 */ public void setEnforcementEditValue(org.openxmlformats.schemas.wordprocessingml.x2006.main.STDocProtect.Enum editValue, String password, HashAlgorithm hashAlgo) { @@ -464,7 +464,7 @@ public boolean getMirrorMargins() { * Turn mirrored margins on or off * * @param enable {@code true} to turn on mirrored margins, - * {@code false} to turn off mirrored marginss. + * {@code false} to turn off mirrored margins. */ public void setMirrorMargins(boolean enable) { CTOnOff onOff = CTOnOff.Factory.newInstance(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java index 82c08e260c6..86d7c771434 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java @@ -263,7 +263,7 @@ public XWPFTableRow createRow() { /** * @param pos - index of the row - * @return the row at the position specified or null if no rows is defined or if the position is greather than the max size of rows array + * @return the row at the position specified or null if no rows is defined or if the position is greater than the max size of rows array */ public XWPFTableRow getRow(int pos) { if (pos >= 0 && pos < ctTbl.sizeOfTrArray()) { diff --git a/poi-ooxml/src/test/java/org/apache/poi/extractor/ooxml/TestExtractorFactory.java b/poi-ooxml/src/test/java/org/apache/poi/extractor/ooxml/TestExtractorFactory.java index b4f6fe09a0b..8799d2ae45b 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/extractor/ooxml/TestExtractorFactory.java +++ b/poi-ooxml/src/test/java/org/apache/poi/extractor/ooxml/TestExtractorFactory.java @@ -64,7 +64,7 @@ class TestExtractorFactory { @SuppressWarnings("unused") private static final File xlsxStrict = getFileAndCheck(ssTests, "SampleSS.strict.xlsx"); private static final File xltx = getFileAndCheck(ssTests, "test.xltx"); - private static final File xlsEmb = getFileAndCheck(ssTests, "excel_with_embeded.xls"); + private static final File xlsEmb = getFileAndCheck(ssTests, "excel_with_embedded.xls"); private static final File xlsb = getFileAndCheck(ssTests, "testVarious.xlsb"); private static final POIDataSamples wpTests = POIDataSamples.getDocumentInstance(); @@ -73,8 +73,8 @@ class TestExtractorFactory { private static final File doc95 = getFileAndCheck(wpTests, "Word95.doc"); private static final File docx = getFileAndCheck(wpTests, "SampleDoc.docx"); private static final File dotx = getFileAndCheck(wpTests, "test.dotx"); - private static final File docEmb = getFileAndCheck(wpTests, "word_with_embeded.doc"); - private static final File docEmbOOXML = getFileAndCheck(wpTests, "word_with_embeded_ooxml.doc"); + private static final File docEmb = getFileAndCheck(wpTests, "word_with_embedded.doc"); + private static final File docEmbOOXML = getFileAndCheck(wpTests, "word_with_embedded_ooxml.doc"); private static final POIDataSamples slTests = POIDataSamples.getSlideShowInstance(); private static final File ppt = getFileAndCheck(slTests, "SampleShow.ppt"); diff --git a/poi-ooxml/src/test/java/org/apache/poi/ooxml/TestDetectAsOOXML.java b/poi-ooxml/src/test/java/org/apache/poi/ooxml/TestDetectAsOOXML.java index 6d3708c139d..c0aae595335 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/ooxml/TestDetectAsOOXML.java +++ b/poi-ooxml/src/test/java/org/apache/poi/ooxml/TestDetectAsOOXML.java @@ -36,7 +36,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.junit.jupiter.params.provider.CsvSource; /** - * Class to test that HXF correctly detects OOXML + * Class to test that FileMagic correctly detects OOXML * documents */ @SuppressWarnings("deprecation") diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackage.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackage.java index d0d0514a80d..127ed40f592 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackage.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackage.java @@ -946,7 +946,7 @@ void testBug56479() throws Exception { } @Test - void unparseableCentralDirectory() throws IOException { + void unparsableCentralDirectory() throws IOException { File f = getSampleFile("at.pzp.www_uploads_media_PP_Scheinecker-jdk6error.pptx"); try (SlideShow ppt = SlideShowFactory.create(f, null, true)) { assertNotNull(ppt); diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackageCoreProperties.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackageCoreProperties.java index 5979190252a..891a9548812 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackageCoreProperties.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackageCoreProperties.java @@ -54,7 +54,7 @@ public final class TestPackageCoreProperties { void testGetProperties() throws Exception { // Open the package @SuppressWarnings("resource") - OPCPackage p = OPCPackage.open(openSampleStream("TestPackageCoreProperiesGetters.docx")); + OPCPackage p = OPCPackage.open(openSampleStream("TestPackageCorePropertiesGetters.docx")); compareProperties(p); p.revert(); } @@ -64,9 +64,9 @@ void testGetProperties() throws Exception { */ @Test void testSetProperties() throws Exception { - String inputPath = getSampleFileName("TestPackageCoreProperiesSetters.docx"); + String inputPath = getSampleFileName("TestPackageCorePropertiesSetters.docx"); - File outputFile = OpenXML4JTestDataSamples.getOutputFile("TestPackageCoreProperiesSettersOUTPUT.docx"); + File outputFile = OpenXML4JTestDataSamples.getOutputFile("TestPackageCorePropertiesSettersOUTPUT.docx"); // Open package @SuppressWarnings("resource") diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java index 714d81180be..49b05db4394 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java @@ -51,7 +51,7 @@ void testRelativizeURI() throws Exception { // Document to itself is the same place (empty URI) URI retURI2 = PackagingURIHelper.relativizeURI(uri1, uri1); // YK: the line below used to assert empty string which is wrong - // if source and target are the same they should be relaitivized as the last segment, + // if source and target are the same they should be relativized as the last segment, // see Bugzilla 51187 assertEquals("document.xml", retURI2.getPath()); @@ -138,7 +138,7 @@ void testCreateURIFromString() throws Exception { @Test void test53734() throws Exception { URI uri = PackagingURIHelper.toURI("javascript://"); - // POI appends a trailing slash tpo avoid "Expected authority at index 13: javascript://" + // POI appends a trailing slash to avoid "Expected authority at index 13: javascript://" // https://issues.apache.org/bugzilla/show_bug.cgi?id=53734 assertEquals("javascript:///", uri.toASCIIString()); } diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java index ce63f811a80..64e81d237fa 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java @@ -48,7 +48,7 @@ class TestRelationships { /** * Test relationships are correctly loaded. This at the moment fails (as of r499) - * whenever a document is loaded before its correspondig .rels file has been found. + * whenever a document is loaded before its corresponding .rels file has been found. * The code in this case assumes there are no relationships defined, but it should * really look also for not yet loaded parts. */ diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/util/TestXSSFWorkbookWithMemoryConfigs.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/util/TestXSSFWorkbookWithMemoryConfigs.java index 536b9bf065e..356e81408bd 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/util/TestXSSFWorkbookWithMemoryConfigs.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/util/TestXSSFWorkbookWithMemoryConfigs.java @@ -31,7 +31,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more @Isolated //changes IOUtils and other static changes class TestXSSFWorkbookWithMemoryConfigs { @Test - void loadXslsxWithLowThreshold() { + void loadXslxWithLowThreshold() { final int defaultMaxEntrySize = ZipArchiveFakeEntry.getMaxEntrySize(); ZipArchiveFakeEntry.setMaxEntrySize(100); try { diff --git a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/usermodel/TestEmbedOLEPackage.java b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/usermodel/TestEmbedOLEPackage.java index ea7067a1493..968d6d304af 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/usermodel/TestEmbedOLEPackage.java +++ b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/usermodel/TestEmbedOLEPackage.java @@ -101,12 +101,12 @@ void embedPDF() throws IOException { assertTrue(digestMatch); final String expLabel = "Apache_POI_project_logo_(2018).pdf"; - final String expFilenName = "C:\\Dell\\Apache_POI_project_logo_(2018).pdf"; + final String expFilename = "C:\\Dell\\Apache_POI_project_logo_(2018).pdf"; final String expCmd1 = "C:\\Users\\KIWIWI~1\\AppData\\Local\\Temp\\{84287F34-B79C-4F3A-9A92-6BB664586F48}\\Apache_POI_project_logo_(2018).pdf"; final String expCmd2 = "C:\\Users\\KIWIWI~1\\AppData\\Local\\Temp\\{84287F34-B79C-4F3A-9A92-6BB664586F48}\\Apache_POI_project_logo_(2).pdf"; assertTrue(ole10s.stream().map(Ole10Native::getLabel).allMatch(expLabel::equals)); - assertTrue(ole10s.stream().map(Ole10Native::getFileName).allMatch(expFilenName::equals)); + assertTrue(ole10s.stream().map(Ole10Native::getFileName).allMatch(expFilename::equals)); assertEquals(expCmd1, ole10s.get(0).getCommand()); assertEquals(expCmd2, ole10s.get(1).getCommand()); @@ -116,9 +116,9 @@ void embedPDF() throws IOException { assertEquals(o.getFileName(), o.getFileName2()); } - Ole10Native scratch = new Ole10Native(expLabel, expFilenName, expCmd1, ole10s.get(0).getDataBuffer()); + Ole10Native scratch = new Ole10Native(expLabel, expFilename, expCmd1, ole10s.get(0).getDataBuffer()); scratch.setLabel2(expLabel); - scratch.setFileName2(expFilenName); + scratch.setFileName2(expFilename); scratch.setCommand2(expCmd1); try (POIFSFileSystem scratchFS = new POIFSFileSystem(); diff --git a/poi-ooxml/src/test/java/org/apache/poi/util/tests/TestIdentifierManager.java b/poi-ooxml/src/test/java/org/apache/poi/util/tests/TestIdentifierManager.java index d2397546926..0b894f03aae 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/util/tests/TestIdentifierManager.java +++ b/poi-ooxml/src/test/java/org/apache/poi/util/tests/TestIdentifierManager.java @@ -142,7 +142,7 @@ void testBounds() { // now the manager is exhausted assertThrows(IllegalStateException.class, () -> manager.reserve(10), - "No more ids left any more"); + "No more ids left anymore"); assertThrows(IllegalArgumentException.class, () -> manager.release(9), diff --git a/poi-ooxml/src/test/java/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java b/poi-ooxml/src/test/java/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java index 137d3901faf..8bea979e33d 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java @@ -67,7 +67,7 @@ void setup() { final XDDFValueAxis bottomAxis = chart.createValueAxis(AxisPosition.BOTTOM); final XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT); - // Initialize data data sources + // Initialize data sources final Double dX[] = new Double[5]; final Double dY1[] = new Double[5]; diff --git a/poi-ooxml/src/test/java/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java b/poi-ooxml/src/test/java/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java index 2e8afed92b8..9d57f09ba85 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java @@ -97,7 +97,7 @@ void testPolylineTo() throws IOException { } @Test - void testGithub260() throws IOException { + void testGitHub260() throws IOException { XmlVisioDocument document; try (InputStream is = SAMPLES.openResourceAsStream("github260.vsdx")) { document = new XmlVisioDocument(is); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFAutoShape.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFAutoShape.java index 330f6629e7a..5cca4b7a43f 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFAutoShape.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFAutoShape.java @@ -38,7 +38,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more class TestXSLFAutoShape { @Test - void testTextBodyProperies() throws IOException { + void testTextBodyProperties() throws IOException { XMLSlideShow ppt = new XMLSlideShow(); XSLFSlide slide = ppt.createSlide(); @@ -69,7 +69,7 @@ void testTextBodyProperies() throws IOException { shape.setRightInset(0.0); assertEquals(0.0, shape.getRightInset(), 0); - // unset to defauls + // unset to defaults shape.setBottomInset(-1); assertEquals(3.6, shape.getBottomInset(), 0); shape.setTopInset(-1); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFFreeformShape.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFFreeformShape.java index 6f57d117908..7f6a6613c8e 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFFreeformShape.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFFreeformShape.java @@ -43,7 +43,7 @@ void testSetPath() throws IOException { XMLSlideShow ppt = new XMLSlideShow(); XSLFSlide slide = ppt.createSlide(); XSLFFreeformShape shape1 = slide.createFreeform(); - // comples path consisting of a rectangle and an ellipse inside it + // complex path consisting of a rectangle and an ellipse inside it Path2D.Double path1 = new Path2D.Double(new Rectangle2D.Double(150, 150, 300, 300)); path1.append(new Ellipse2D.Double(200, 200, 100, 50), false); shape1.setPath(path1); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextBox.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextBox.java index fc62cc945b1..a010488fae0 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextBox.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextBox.java @@ -44,7 +44,7 @@ void testPlaceholder() throws IOException { } /** - * text box inherits default text proeprties from presentation.xml + * text box inherits default text properties from presentation.xml */ @Test void testDefaultTextStyle() throws IOException { diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java index f6c5570003c..510a6fbe454 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java @@ -344,7 +344,7 @@ void testParagraphProperties() throws IOException { assertNull(p.getIndent()); p.setIndent(72.0); assertEquals(72.0, p.getIndent(), 0); - p.setIndent(-1d); // the value of -1.0 resets to the defaults (not any more ...) + p.setIndent(-1d); // the value of -1.0 resets to the defaults (not anymore ...) assertEquals(-1d, p.getIndent(), 0); p.setIndent(null); assertNull(p.getIndent()); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextShape.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextShape.java index 397db98d12c..d4bba228720 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextShape.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextShape.java @@ -220,7 +220,7 @@ void verifySlide2(XSLFSlide slide){ assertNull(getSpPr(shape2).getXfrm()); XSLFTextShape masterShape2 = (XSLFTextShape)layout.getPlaceholder(ph2); - // anchor of the body text is missing in the slide layout, llokup in the slide master + // anchor of the body text is missing in the slide layout, lookup in the slide master assertNull(getSpPr(masterShape2).getXfrm()); masterShape2 = (XSLFTextShape)layout.getSlideMaster().getPlaceholder(ph2); assertNotNull(getSpPr(masterShape2).getXfrm()); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/BaseTestXSSFPivotTable.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/BaseTestXSSFPivotTable.java index d989dca8708..4766c8522f2 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/BaseTestXSSFPivotTable.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/BaseTestXSSFPivotTable.java @@ -71,10 +71,10 @@ void testAddRowLabelToPivotTable() { assertEquals(0, pivotTable.getRowLabelColumns().size()); pivotTable.addRowLabel(0); - CTPivotTableDefinition defintion = pivotTable.getCTPivotTableDefinition(); + CTPivotTableDefinition definition = pivotTable.getCTPivotTableDefinition(); - assertEquals(0, defintion.getRowFields().getFieldArray(0).getX()); - assertEquals(1, defintion.getRowFields().getCount()); + assertEquals(0, definition.getRowFields().getFieldArray(0).getX()); + assertEquals(1, definition.getRowFields().getCount()); assertEquals(1, pivotTable.getRowLabelColumns().size()); pivotTable.addRowLabel(1); @@ -100,9 +100,9 @@ void testAddOneColumnLabelToPivotTableDoesNotCreateColField() { int columnIndex = 0; pivotTable.addColumnLabel(DataConsolidateFunction.SUM, columnIndex); - CTPivotTableDefinition defintion = pivotTable.getCTPivotTableDefinition(); + CTPivotTableDefinition definition = pivotTable.getCTPivotTableDefinition(); - assertNull(defintion.getColFields()); + assertNull(definition.getColFields()); } /** @@ -117,9 +117,9 @@ void testAddThreeDifferentColumnLabelsToPivotTable() { pivotTable.addColumnLabel(DataConsolidateFunction.SUM, columnOne); pivotTable.addColumnLabel(DataConsolidateFunction.MAX, columnTwo); pivotTable.addColumnLabel(DataConsolidateFunction.MIN, columnThree); - CTPivotTableDefinition defintion = pivotTable.getCTPivotTableDefinition(); + CTPivotTableDefinition definition = pivotTable.getCTPivotTableDefinition(); - assertEquals(3, defintion.getDataFields().getDataFieldList().size()); + assertEquals(3, definition.getDataFields().getDataFieldList().size()); } @@ -135,9 +135,9 @@ void testAddThreeSametColumnLabelsToPivotTable() { pivotTable.addColumnLabel(DataConsolidateFunction.SUM, columnOne); pivotTable.addColumnLabel(DataConsolidateFunction.SUM, columnTwo); pivotTable.addColumnLabel(DataConsolidateFunction.SUM, columnThree); - CTPivotTableDefinition defintion = pivotTable.getCTPivotTableDefinition(); + CTPivotTableDefinition definition = pivotTable.getCTPivotTableDefinition(); - assertEquals(3, defintion.getDataFields().getDataFieldList().size()); + assertEquals(3, definition.getDataFields().getDataFieldList().size()); } /** @@ -150,9 +150,9 @@ void testAddTwoColumnLabelsToPivotTable() { pivotTable.addColumnLabel(DataConsolidateFunction.SUM, columnOne); pivotTable.addColumnLabel(DataConsolidateFunction.SUM, columnTwo); - CTPivotTableDefinition defintion = pivotTable.getCTPivotTableDefinition(); + CTPivotTableDefinition definition = pivotTable.getCTPivotTableDefinition(); - assertEquals(defintion.getColFields().getFieldArray(0).getX(), -2); + assertEquals(definition.getColFields().getFieldArray(0).getX(), -2); } /** @@ -162,11 +162,11 @@ void testAddTwoColumnLabelsToPivotTable() { void testColumnLabelCreatesDataField() { pivotTable.addColumnLabel(DataConsolidateFunction.SUM, 0); - CTPivotTableDefinition defintion = pivotTable.getCTPivotTableDefinition(); + CTPivotTableDefinition definition = pivotTable.getCTPivotTableDefinition(); - assertEquals(0, defintion.getDataFields().getDataFieldArray(0).getFld()); + assertEquals(0, definition.getDataFields().getDataFieldArray(0).getFld()); assertSame(STDataConsolidateFunction.Enum.forInt(DataConsolidateFunction.SUM.getValue()), - defintion.getDataFields().getDataFieldArray(0).getSubtotal()); + definition.getDataFields().getDataFieldArray(0).getSubtotal()); } /** @@ -180,10 +180,10 @@ void testColumnLabelSetCustomName() { pivotTable.addColumnLabel(DataConsolidateFunction.SUM, columnIndex, customName); - CTPivotTableDefinition defintion = pivotTable.getCTPivotTableDefinition(); + CTPivotTableDefinition definition = pivotTable.getCTPivotTableDefinition(); - assertEquals(defintion.getDataFields().getDataFieldArray(0).getFld(), columnIndex); - assertEquals(defintion.getDataFields().getDataFieldArray(0).getName(), customName); + assertEquals(definition.getDataFields().getDataFieldArray(0).getFld(), columnIndex); + assertEquals(definition.getDataFields().getDataFieldArray(0).getName(), customName); } /** @@ -197,10 +197,10 @@ void testColumnLabelSetDataFormat() { pivotTable.addColumnLabel(DataConsolidateFunction.SUM, columnIndex, null, format); - CTPivotTableDefinition defintion = pivotTable.getCTPivotTableDefinition(); + CTPivotTableDefinition definition = pivotTable.getCTPivotTableDefinition(); - assertEquals(defintion.getDataFields().getDataFieldArray(0).getFld(), columnIndex); - assertEquals(defintion.getDataFields().getDataFieldArray(0).getNumFmtId(), wb.createDataFormat().getFormat(format)); + assertEquals(definition.getDataFields().getDataFieldArray(0).getFld(), columnIndex); + assertEquals(definition.getDataFields().getDataFieldArray(0).getNumFmtId(), wb.createDataFormat().getFormat(format)); } /** @@ -292,10 +292,10 @@ void testAddColLabelToPivotTable() { assertEquals(0, pivotTable.getColLabelColumns().size()); pivotTable.addColLabel(0); - CTPivotTableDefinition defintion = pivotTable.getCTPivotTableDefinition(); + CTPivotTableDefinition definition = pivotTable.getCTPivotTableDefinition(); - assertEquals(0, defintion.getColFields().getFieldArray(0).getX()); - assertEquals(1, defintion.getColFields().getCount()); + assertEquals(0, definition.getColFields().getFieldArray(0).getX()); + assertEquals(1, definition.getColFields().getCount()); assertEquals(1, pivotTable.getColLabelColumns().size()); pivotTable.addColLabel(1); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java index 7b735206d44..699813fb605 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -1377,7 +1377,7 @@ void bug48703() throws IOException { } /** - * Bugzilla 51710: problems reading shared formuals from .xlsx + * Bugzilla 51710: problems reading shared formulas from .xlsx */ @Test void bug51710() throws IOException { @@ -1689,7 +1689,7 @@ void bug56702() throws IOException { /** * Formulas which reference named ranges, either in other * sheets, or workbook scoped but in other workbooks. - * Used to fail with with errors like + * Used to fail with errors like * org.apache.poi.ss.formula.FormulaParseException: Cell reference expected after sheet name at index 9 * org.apache.poi.ss.formula.FormulaParseException: Parse error near char 0 '[' in specified formula '[0]!NR_Global_B2'. Expected number, string, or defined name */ @@ -2049,7 +2049,7 @@ void bug57482(PackageAccess access) throws IOException, InvalidFormatException { // Try to write-out and read again, should only work // in read-write mode, not read-only mode try (XSSFWorkbook wb2 = writeOutAndReadBack(wb1)) { - assertNotEquals(PackageAccess.READ, access, "Shouln't be able to write from read-only mode"); + assertNotEquals(PackageAccess.READ, access, "Shouldn't be able to write from read-only mode"); // Check again s = wb2.getSheetAt(0); @@ -3357,7 +3357,7 @@ void testBug63845() throws IOException { cellBack.setCellValue("123"); assertEquals("123", cellBack.getStringCellValue(), "String value should be set now"); - assertNull(((XSSFCell) cellBack).getCTCell().getF(), "No formula should be set any more"); + assertNull(((XSSFCell) cellBack).getCTCell().getF(), "No formula should be set anymore"); } } } @@ -3809,7 +3809,7 @@ void testBug66436() throws IOException, InvalidFormatException, GeneralSecurityE } } - // for the decrytped bytes + // for the decrypted bytes UnsynchronizedByteArrayOutputStream bosDec = UnsynchronizedByteArrayOutputStream.builder().get(); /* decrypt excel by poi */ diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFCell.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFCell.java index ec06fa81f29..d8db1e5c83e 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFCell.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFCell.java @@ -320,7 +320,7 @@ void testMissingRAttributeBug54288() throws IOException { // Test idea: iterate over cells in the reference worksheet, they all have the R attribute set. // For each cell from the reference sheet find the corresponding cell in the problematic file (with missing R) // and assert that POI reads them equally: - DataFormatter formater = new DataFormatter(); + DataFormatter formatter = new DataFormatter(); for(Row r : sheetRef){ XSSFRow rowRef = (XSSFRow)r; XSSFRow row = sheet.getRow(rowRef.getRowNum()); @@ -338,8 +338,8 @@ void testMissingRAttributeBug54288() throws IOException { if(!cell.getCTCell().isSetR()){ assertTrue(cellRef.getCTCell().isSetR(), "R must e set in cellRef"); - String valRef = formater.formatCellValue(cellRef); - String val = formater.formatCellValue(cell); + String valRef = formatter.formatCellValue(cellRef); + String val = formatter.formatCellValue(cell); assertEquals(valRef, val); } diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFFont.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFFont.java index 6c62954cc73..afbeda95bb5 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFFont.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFFont.java @@ -377,7 +377,7 @@ void testCanComputeWidthXSSF() throws IOException { @Test void testCanComputeWidthInvalidFont() { Font font = new XSSFFont(CTFont.Factory.newInstance()); - font.setFontName("some non existing font name"); + font.setFontName("some nonexistent font name"); // Even with invalid fonts we still get back useful data most of the time... assertDoesNotThrow(() -> SheetUtil.canComputeColumnWidth(font)); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRowsAndColumns.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRowsAndColumns.java index e31332027a8..9f9b812e1fa 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRowsAndColumns.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRowsAndColumns.java @@ -56,7 +56,7 @@ public TestXSSFSheetShiftRowsAndColumns() { } /** - * This creates a workbook with one worksheet. It then puts data in rows 0 to numRows-1 and colulmns + * This creates a workbook with one worksheet. It then puts data in rows 0 to numRows-1 and columns * 0 to numCols-1. */ @BeforeEach diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java index 10ccde01fab..a5253f06a02 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java @@ -1119,7 +1119,7 @@ void getTable() throws IOException { // If workbook does not contain any data tables matching the provided name, getTable should return null assertNull(wb.getTable(null), "Null table name should not throw NPE"); - assertNull(wb.getTable("Foglio1"), "Should not be able to find non-existent table"); + assertNull(wb.getTable("Foglio1"), "Should not be able to find nonexistent table"); // If a table is added after getTable is called it should still be reachable by XSSFWorkbook.getTable // This test makes sure that if any caching is done that getTable never uses a stale cache @@ -1411,7 +1411,7 @@ void checkNewFileForR1C1Refs() throws IOException { } @Test - void testGithub321() throws Exception { + void testGitHub321() throws Exception { try (XSSFWorkbook wb = openSampleWorkbook("github-321.xlsx")) { XSSFSheet xssfSheet = wb.getSheetAt(0); DataFormatter dataFormatter = new DataFormatter(); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java b/poi-ooxml/src/test/java/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java index 90f4c817a51..b5f382e7627 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java @@ -48,7 +48,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import javax.xml.namespace.QName; /** - * Tests for HXFWordExtractor + * Tests for XWPFWordExtractor */ class TestXWPFWordExtractor { diff --git a/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFHeader.java b/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFHeader.java index 73d2eebe202..5ca2f5dc3ed 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFHeader.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFHeader.java @@ -127,7 +127,7 @@ void testSetHeader() throws IOException { assertEquals(0, headerF.getParagraphs().size()); - // As an additional check, recover the defauls footer and + // As an additional check, recover the defaults footer and // make sure that it contains two paragraphs of text and that // both do hold what is expected. footerD = policy.getDefaultFooter(); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/Chunk.java b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/Chunk.java index b85592f1121..c3242494a55 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/Chunk.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/Chunk.java @@ -282,7 +282,7 @@ private Command(CommandDefinition definition) { public Object getValue() { return value; } } /* - * A special kind of command that is an artificat of how we + * A special kind of command that is an artifact of how we * process CommandDefinitions, and so doesn't actually exist * in the chunk */ diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfFont.java b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfFont.java index c7f189f1d54..fec3f672a36 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfFont.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfFont.java @@ -348,7 +348,7 @@ public int init(LittleEndianInputStream leis, long recordSize) throws IOExceptio } // A string of 64 Unicode characters that contains the font's full name. - // Ifthe length of this string is less than 64 characters, a terminating + // If the length of this string is less than 64 characters, a terminating // NULL MUST be present, after which the remainder of this field MUST be ignored. readBytes = readString(leis, sb, 64); if (readBytes == -1) { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfText.java b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfText.java index 3b6aaddd753..8dddf89dab1 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfText.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfText.java @@ -110,7 +110,7 @@ public long init(LittleEndianInputStream leis, long recordSize, long recordId) t // A WMF PointL object that specifies the coordinates of the reference point used to position the string. // The reference point is defined by the last EMR_SETTEXTALIGN record. - // If no such record has been set, the defaulint alignment is TA_LEFT,TA_TOP. + // If no such record has been set, the default alignment is TA_LEFT,TA_TOP. size += readPointL(leis, reference); // A 32-bit unsigned integer that specifies the number of characters in the string. stringLength = (int)leis.readUInt(); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusDraw.java b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusDraw.java index 9bcc88382eb..e5461af2916 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusDraw.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusDraw.java @@ -703,7 +703,7 @@ public long init(LittleEndianInputStream leis, long dataSize, long recordId, int int size = 4 * LittleEndianConsts.INT_SIZE; - // TOOD: implement Non-Cmap-Lookup correctly + // TODO: implement Non-Cmap-Lookup correctly // If the CMAP_LOOKUP flag in the optionsFlags field is set, each value in this array specifies a // Unicode character. Otherwise, each value specifies an index to a character glyph in the EmfPlusFont diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/PPTXMLDump.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/PPTXMLDump.java index 7940dae77d4..db38c841c33 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/PPTXMLDump.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/PPTXMLDump.java @@ -200,7 +200,7 @@ public static void main(String[] args) throws Exception { if (arg.startsWith("-")) { if ("-f".equals(arg)) { - //write ouput to a file + //write output to a file outFile = true; } } else { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/SlideShowDumper.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/SlideShowDumper.java index d457ee63b77..581b1345a23 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/SlideShowDumper.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/SlideShowDumper.java @@ -152,7 +152,7 @@ public void printDump() throws IOException { // If it has a length, depending on its type it may have children or data // If it has children, these will follow straight away // > - // If it has data, this will come straigh after, and run for the length + // If it has data, this will come straight after, and run for the length // // All lengths given exclude the 8 byte record header // (Data records are known as Atoms) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/SlideShowRecordDumper.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/SlideShowRecordDumper.java index 005da134728..16e6e5a73ff 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/SlideShowRecordDumper.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/dev/SlideShowRecordDumper.java @@ -37,7 +37,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * This class provides a way to view the contents of a powerpoint file. - * It will use the recored layer to grok the contents of the file, and + * It will use the record layer to grok the contents of the file, and * will print out what it finds. */ public final class SlideShowRecordDumper { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/TextPFException9.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/TextPFException9.java index 63d0adcf06b..0b07718ded0 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/TextPFException9.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/TextPFException9.java @@ -32,7 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * This structure store text autonumber scheme and start number. * If a paragraph has an autonumber(fBulletHasAutoNumber = 0x0001) but start number and scheme are empty, - * this means the default values will be used: statNumber=1 and sheme=ANM_ArabicPeriod + * this means the default values will be used: statNumber=1 and scheme=ANM_ArabicPeriod * @see * http://social.msdn.microsoft.com/Forums/mr-IN/os_binaryfile/thread/650888db-fabd-4b95-88dc-f0455f6e2d28 */ diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ColorSchemeAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ColorSchemeAtom.java index 2b4561c2f5e..a8f39f0ecc1 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ColorSchemeAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ColorSchemeAtom.java @@ -95,7 +95,7 @@ public void setAccentAndFollowingHyperlinkColourRGB(int rgb) /* *************** record code follows ********************** */ /** - * For the Colour Scheme (ColorSchem) Atom + * For the Colour Scheme (ColorScheme) Atom */ protected ColorSchemeAtom(byte[] source, int start, int len) { // Sanity Checking - we're always 40 bytes long diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/CurrentUserAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/CurrentUserAtom.java index 70e422b838e..94f4fe4b063 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/CurrentUserAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/CurrentUserAtom.java @@ -125,7 +125,7 @@ public CurrentUserAtom(DirectoryNode dir) throws IOException { // If it's clearly junk, bail out if(docProps.getSize() > 131072) { - throw new CorruptPowerPointFileException("The Current User stream is implausably long. It's normally 28-200 bytes long, but was " + docProps.getSize() + " bytes"); + throw new CorruptPowerPointFileException("The Current User stream is implausibly long. It's normally 28-200 bytes long, but was " + docProps.getSize() + " bytes"); } // Grab the contents diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExEmbedAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExEmbedAtom.java index 247b14900d2..de06c9c99ca 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExEmbedAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExEmbedAtom.java @@ -135,7 +135,7 @@ public boolean getNoSizeToServerB() { } /** - * Getswhether the object is a Word table. + * Gets whether the object is a Word table. * * @return {@code true} if the object is a Word table. */ diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExHyperlinkAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExHyperlinkAtom.java index e73f7cbaf54..6829c368143 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExHyperlinkAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExHyperlinkAtom.java @@ -28,7 +28,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.util.LittleEndian; /** - * Tne atom that holds metadata on a specific Link in the document. + * The atom that holds metadata on a specific Link in the document. * (The actual link is held in a sibling CString record) */ public final class ExHyperlinkAtom extends RecordAtom { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExObjList.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExObjList.java index 160f6bd428a..9b7636fd393 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExObjList.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/ExObjList.java @@ -24,7 +24,7 @@ import org.apache.poi.util.LittleEndian; /** - * This class holds the links to exernal objects referenced from the document. + * This class holds the links to external objects referenced from the document. */ public class ExObjList extends RecordContainer { private byte[] _header; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/HeadersFootersContainer.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/HeadersFootersContainer.java index 6c1d9c3b56f..6f504a21e88 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/HeadersFootersContainer.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/HeadersFootersContainer.java @@ -40,12 +40,12 @@ Licensed to the Apache Software Foundation (ASF) under one or more public final class HeadersFootersContainer extends RecordContainer { /** - * "instance" field in the record header indicating that this HeadersFootersContaine + * "instance" field in the record header indicating that this HeadersFootersContainer * is applied for slides */ public static final short SlideHeadersFootersContainer = 0x3F; /** - * "instance" field in the record header indicating that this HeadersFootersContaine + * "instance" field in the record header indicating that this HeadersFootersContainer * is applied for notes and handouts */ public static final short NotesHeadersFootersContainer = 0x4F; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/InteractiveInfoAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/InteractiveInfoAtom.java index fe48a9395fa..d95a55ede97 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/InteractiveInfoAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/InteractiveInfoAtom.java @@ -31,7 +31,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.util.LittleEndian; /** - * Tne atom that holds metadata on Links in the document. + * The atom that holds metadata on Links in the document. * (The actual link is held Document.ExObjList.ExHyperlink) */ public class InteractiveInfoAtom extends RecordAtom { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/OEPlaceholderAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/OEPlaceholderAtom.java index 28247886a77..cedf9081c36 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/OEPlaceholderAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/OEPlaceholderAtom.java @@ -97,7 +97,7 @@ public OEPlaceholderAtom(){ * Returns the placement Id.

    * * The placement Id is a number assigned to the placeholder. It goes from -1 to the number of placeholders. - * It SHOULD be unique among all PlacholderAtom records contained in the corresponding slide. + * It SHOULD be unique among all PlaceholderAtom records contained in the corresponding slide. * The value 0xFFFFFFFF specifies that the corresponding shape is not a placeholder shape. * * @return the placement Id. @@ -110,7 +110,7 @@ public int getPlacementId(){ * Sets the placement Id.

    * * The placement Id is a number assigned to the placeholder. It goes from -1 to the number of placeholders. - * It SHOULD be unique among all PlacholderAtom records contained in the corresponding slide. + * It SHOULD be unique among all PlaceholderAtom records contained in the corresponding slide. * The value 0xFFFFFFFF specifies that the corresponding shape is not a placeholder shape. * * @param id the placement Id. diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/OutlineTextRefAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/OutlineTextRefAtom.java index e56a9aec161..624f5b50d99 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/OutlineTextRefAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/OutlineTextRefAtom.java @@ -32,7 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more * What MSDN says about OutlineTextRefAtom: *

    * Appears in a slide to indicate a text that is already contained in the document, - * in a SlideListWithText containter. Sometimes slide texts are not contained + * in a SlideListWithText container. Sometimes slide texts are not contained * within the slide container to be able to delay loading a slide and still display * the title and body text in outline view. */ diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/PPDrawingGroup.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/PPDrawingGroup.java index 08ab371e63c..3bc08502aea 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/PPDrawingGroup.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/PPDrawingGroup.java @@ -36,7 +36,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more * Container records which always exists inside Document. * It always acts as a holder for escher DGG container * which may contain which Escher BStore container information - * about pictures containes in the presentation (if any). + * about pictures contained in the presentation (if any). */ public final class PPDrawingGroup extends RecordAtom { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/PersistPtrHolder.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/PersistPtrHolder.java index db3482f0aad..df6a219c419 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/PersistPtrHolder.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/PersistPtrHolder.java @@ -171,7 +171,7 @@ public void updateOtherRecordReferences(Map oldToNewReferencesL if (newPos == null) { Integer id = me.getKey(); LOG.atWarn().log("Couldn't find the new location of the \"slide\" with id {} that used to " + - "be at {}. Not updating the position of it, you probably won't be able to find it any more " + + "be at {}. Not updating the position of it, you probably won't be able to find it anymore " + "(if you ever could!)", id, oldPos); } else { me.setValue(newPos); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/Record.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/Record.java index 1b07189f024..295e1125b16 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/Record.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/Record.java @@ -166,7 +166,7 @@ public static Record createRecordForType(long type, byte[] b, int start, int len // We use the RecordTypes class to provide us with the right // class to use for a given type // A spot of reflection gets us the (byte[],int,int) constructor - // From there, we instanciate the class + // From there, we instantiate the class // Any special record handling occurs once we have the class RecordTypes recordType = RecordTypes.forTypeID((short) type); RecordConstructor c = recordType.recordConstructor; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlideListWithText.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlideListWithText.java index c937edb21ba..d90532ff130 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlideListWithText.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlideListWithText.java @@ -38,7 +38,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more * and then the next SlidePersistAtom. * * Eventually, Slides will find the blocks that interest them from all - * the SlideListWithText entries, and refere to them + * the SlideListWithText entries, and refer to them * * For now, we scan through looking for interesting bits, then creating * the helpful Sheet from model for them diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlidePersistAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlidePersistAtom.java index 28638211a85..8c69fc8cd33 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlidePersistAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlidePersistAtom.java @@ -107,7 +107,7 @@ protected SlidePersistAtom(byte[] source, int start, int len) { slideIdentifier = LittleEndian.getInt(source,start+20); // Finally you have typically 4 or 8 bytes of reserved fields, - // all zero running from 24 bytes in to the end + // all zero running from 24 bytes into the end reservedFields = IOUtils.safelyClone(source,start+24, len-24, MAX_RECORD_LENGTH); } diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/TxInteractiveInfoAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/TxInteractiveInfoAtom.java index 995c7b9e3e2..5577ea23113 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/TxInteractiveInfoAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/TxInteractiveInfoAtom.java @@ -28,7 +28,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.util.LittleEndian; /** - * Tne atom that holds starting and ending character positions of a hyperlink + * The atom that holds starting and ending character positions of a hyperlink */ public final class TxInteractiveInfoAtom extends RecordAtom { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureData.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureData.java index cfb44383b9c..e04efcfd115 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureData.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureData.java @@ -349,13 +349,13 @@ private static HSLFPictureData newInstance( } /** - * Return 24 byte header which preceeds the actual picture data. + * Return 24 byte header which precedes the actual picture data. *

    * The header consists of 2-byte signature, 2-byte type, * 4-byte image size and 16-byte checksum of the image data. *

    * - * @return the 24 byte header which preceeds the actual picture data. + * @return the 24 byte header which precedes the actual picture data. */ public byte[] getHeader() { byte[] header = new byte[CHECKSUM_SIZE + PREAMBLE_SIZE]; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureShape.java index 416fe4147bc..0cad2fae9b8 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureShape.java @@ -181,7 +181,7 @@ public void setPictureName(String name){ } /** - * By default set the orininal image size + * By default set the original image size */ @Override protected void afterInsert(HSLFSheet sh){ diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShape.java index 8dd66e94fee..82010346fae 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShape.java @@ -69,7 +69,7 @@ public abstract class HSLFShape implements Shape { private static final Logger LOG = LogManager.getLogger(HSLFShape.class); /** - * Either EscherSpContainer or EscheSpgrContainer record + * Either EscherSpContainer or EscherSpgrContainer record * which holds information about this shape. */ private EscherContainerRecord _escherContainer; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSheet.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSheet.java index 543ed418285..9ce908e8e85 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSheet.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSheet.java @@ -241,7 +241,7 @@ public boolean removeShape(HSLFShape shape) { } /** - * Called by SlideShow ater a new sheet is created + * Called by SlideShow after a new sheet is created */ public void onCreate(){ diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlide.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlide.java index 6f205c9e578..cd5fa25c607 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlide.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlide.java @@ -148,7 +148,7 @@ public void setSlideNumber(int newSlideNumber) { } /** - * Called by SlideShow ater a new slide is created. + * Called by SlideShow after a new slide is created. *

    * For Slide we need to do the following: *

      @@ -184,7 +184,7 @@ public void onCreate(){ } } - //PPT doen't increment the number of saved shapes for group descriptor and background + //PPT doesn't increment the number of saved shapes for group descriptor and background dg.setNumShapes(1); } @@ -205,7 +205,7 @@ public HSLFTextBox addTitle() { } - // Complex Accesser methods follow + // Complex Accessor methods follow /** *

      @@ -257,7 +257,7 @@ public org.apache.poi.hslf.record.Slide getSlideRecord() { } /** - * @return set of records inside {@code SlideListWithtext} container + * @return set of records inside {@code SlideListWithText} container * which hold text data for this slide (typically for placeholders). */ public SlideAtomsSet getSlideAtomsSet() { return _atomSet; } diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideMaster.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideMaster.java index 513c8319c32..65dcf6dda52 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideMaster.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideMaster.java @@ -65,7 +65,7 @@ public List> getTextParagraphs() { } /** - * Returns null since SlideMasters doen't have master sheet. + * Returns null since SlideMasters doesn't have master sheet. */ @Override public HSLFMasterSheet getMasterSheet() { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java index 15476e48f3e..357350a4f97 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java @@ -104,7 +104,7 @@ enum LoadSavePhase { // Pointers to the most recent versions of the core records // (Document, Notes, Slide etc) private Record[] _mostRecentCoreRecords; - // Lookup between the PersitPtr "sheet" IDs, and the position + // Lookup between the PersistPtr "sheet" IDs, and the position // in the mostRecentCoreRecords array private Map _sheetIdToCoreRecordsLookup; @@ -351,7 +351,7 @@ private void buildSlidesAndNotes() { // SlideAtomsSet for each Notes // These SlideAtomsSets will not normally contain text // - // Having indentified the masters, slides and notes + their orders, + // Having identified the masters, slides and notes + their orders, // we have to go and find their matching records // We always use the latest versions of these records, and use the // SlideAtom/NotesAtom to match them with the StyleAtomSet @@ -795,7 +795,7 @@ public HSLFSlide createSlide() { slide.setSlideShow(this); slide.onCreate(); - // Add in to the list of Slides + // Add into the list of Slides _slides.add(slide); LOG.atInfo().log("Added slide {} with ref {} and identifier {}", box(_slides.size()),box(sp.getRefID()),box(sp.getSlideIdentifier())); @@ -1060,7 +1060,7 @@ public int addEmbed(POIFSFileSystem poiData) { } ExEmbed exEmbed = new ExEmbed(); - // remove unneccessary infos, so we don't need to specify the type + // remove unnecessary infos, so we don't need to specify the type // of the ole object multiple times Record[] children = exEmbed.getChildRecords(); exEmbed.removeChild(children[2]); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java index 8c7effc7f3d..f98c05fec17 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java @@ -230,7 +230,7 @@ protected void decryptPicture(byte[] pictstream, int offset) { int endOffset = offset + rlen; if (recType == 0xF007) { - // TOOD: get a real example file ... to actual test the FBSE entry + // TODO: get a real example file ... to actual test the FBSE entry // not sure where the foDelay block is // File BLIP Store Entry (FBSE) @@ -308,7 +308,7 @@ protected void encryptPicture(byte[] pictstream, int offset) { int endOffset = offset + rlen; if (recType == 0xF007) { - // TOOD: get a real example file ... to actual test the FBSE entry + // TODO: get a real example file ... to actual test the FBSE entry // not sure where the foDelay block is // File BLIP Store Entry (FBSE) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java index 54edf47faa6..e1e189e64ea 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java @@ -252,7 +252,7 @@ private void buildRecords() throws IOException { // If it has a length, depending on its type it may have children or data // If it has children, these will follow straight away // > - // If it has data, this will come straigh after, and run for the length + // If it has data, this will come straight after, and run for the length // // All lengths given exclude the 8 byte record header // (Data records are known as Atoms) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java index 4e9c89dd376..27a414d9e07 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java @@ -584,7 +584,7 @@ public void setBulletStyle(Object... styles) { } else if (ostyle instanceof String) { setBulletFont((String)ostyle); } else if (ostyle instanceof AutoNumberingScheme) { - throw new HSLFException("setting bullet auto-numberin scheme for HSLF not supported ... yet"); + throw new HSLFException("setting bullet auto-numbering scheme for HSLF not supported ... yet"); } } } diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java index 8d99617e7b0..58f2d1946a6 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java @@ -280,11 +280,11 @@ private void createEmptyParagraph() { StyleTextPropAtom sta = (StyleTextPropAtom)_txtbox.findFirstOfType(StyleTextPropAtom._type); TextPropCollection paraStyle = null, charStyle = null; if (sta == null) { - int parSiz = text.length(); - sta = new StyleTextPropAtom(parSiz+1); + int parSize = text.length(); + sta = new StyleTextPropAtom(parSize+1); if (_paragraphs.isEmpty()) { - paraStyle = sta.addParagraphTextPropCollection(parSiz+1); - charStyle = sta.addCharacterTextPropCollection(parSiz+1); + paraStyle = sta.addParagraphTextPropCollection(parSize+1); + charStyle = sta.addCharacterTextPropCollection(parSize+1); } else { for (HSLFTextParagraph htp : _paragraphs) { int runsLen = 0; @@ -466,14 +466,14 @@ public void setVerticalAlignment(VerticalAlignment vAlign) { * and the bottom of the inscribed rectangle of the shape that contains the text. * Default value is 1/20 inch. * - * @return the botom margin + * @return the bottom margin */ public double getBottomInset(){ return getInset(EscherPropertyTypes.TEXT__TEXTBOTTOM, .05); } /** - * Sets the botom margin. + * Sets the bottom margin. * @see #getBottomInset() * * @param margin the bottom margin @@ -860,7 +860,7 @@ public List getHyperlinks() { @Override public void setTextPlaceholder(TextPlaceholder placeholder) { - // TOOD: check for correct placeholder handling - see org.apache.poi.hslf.model.Placeholder + // TODO: check for correct placeholder handling - see org.apache.poi.hslf.model.Placeholder Placeholder ph = null; int runType; switch (placeholder) { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/util/LocaleDateFormat.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/util/LocaleDateFormat.java index eb156e01776..8d474593672 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/util/LocaleDateFormat.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/util/LocaleDateFormat.java @@ -35,7 +35,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more public final class LocaleDateFormat { /** - * Enum to specify initial remapping of the FormatID based on thd LCID + * Enum to specify initial remapping of the FormatID based on the LCID */ public enum MapFormatId { NONE, PPT diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MAPIProperty.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MAPIProperty.java index b09e39cc7aa..fd46dad786e 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MAPIProperty.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MAPIProperty.java @@ -996,8 +996,8 @@ public class MAPIProperty { new MAPIProperty(0x3a17, ASCII_STRING, "Title", "PR_TITLE"); public static final MAPIProperty TNEF_CORRELATION_KEY = new MAPIProperty(0x7f, BINARY, "TnefCorrelationKey", "PR_TNEF_CORRELATION_KEY"); - public static final MAPIProperty TRANSMITABLE_DISPLAY_NAME = - new MAPIProperty(0x3a20, ASCII_STRING, "TransmitableDisplayName", "PR_TRANSMITABLE_DISPLAY_NAME"); + public static final MAPIProperty TRANSMITTABLE_DISPLAY_NAME = + new MAPIProperty(0x3a20, ASCII_STRING, "TransmittableDisplayName", "PR_TRANSMITTABLE_DISPLAY_NAME"); public static final MAPIProperty TRANSPORT_KEY = new MAPIProperty(0xe16, LONG, "TransportKey", "PR_TRANSPORT_KEY"); public static final MAPIProperty TRANSPORT_MESSAGE_HEADERS = diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java index 482f8a941b3..e01a7ce5925 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java @@ -41,7 +41,7 @@ public class MessageSubmissionChunk extends Chunk { private String rawId; private Calendar date; - private static final Pattern datePatern = Pattern + private static final Pattern datePattern = Pattern .compile("(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)Z?"); /** @@ -87,7 +87,7 @@ public void readValue(InputStream value) throws IOException { } if (dateS != null) { // Should be yymmddhhmmssZ - Matcher m = datePatern.matcher(dateS); + Matcher m = datePattern.matcher(dateS); if (m.matches()) { date = LocaleUtil.getLocaleCalendar(); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfBinaryRasterOp.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfBinaryRasterOp.java index 75de4457b99..c73c7e97ee7 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfBinaryRasterOp.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfBinaryRasterOp.java @@ -22,7 +22,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * The BinaryRasterOperation Enumeration section lists the binary raster-operation codes. - * Rasteroperation codes define how metafile processing combines the bits from the selected + * Raster operation codes define how metafile processing combines the bits from the selected * pen with the bits in the destination bitmap. * * Each raster-operation code represents a Boolean operation in which the values of the pixels in the diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfEscape.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfEscape.java index 39586fdd7e9..91127c0e700 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfEscape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfEscape.java @@ -331,7 +331,7 @@ public int init(LittleEndianInputStream leis, long recordSize, EscapeFunction es // A 32-bit unsigned integer that specifies the number of bytes in the EMF stream that remain to be // processed after this record. Those additional EMF bytes MUST follow in the EnhancedMetafileData - // fields of subsequent META_ESCAPE_ENHANDED_METAFILE escape records. + // fields of subsequent META_ESCAPE_ENHANCED_METAFILE escape records. remainingBytes = leis.readInt(); // A 32-bit unsigned integer that specifies the total size of the EMF stream embedded in this diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfFont.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfFont.java index c5ea678edc3..9a21acdae86 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfFont.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfFont.java @@ -224,7 +224,7 @@ public enum WmfFontQuality { /** * Specifies that the character quality of the font is less important than the - * matching of logical attribuetes. For rasterized fonts, scaling SHOULD be enabled, which + * matching of logical attributes. For rasterized fonts, scaling SHOULD be enabled, which * means that more font sizes are available. */ DRAFT_QUALITY (0x01), @@ -534,7 +534,7 @@ public Map> getGenericProperties() { final Map> m = new LinkedHashMap<>(); m.put("height", this::getHeight); m.put("width", this::getWidth); - m.put("escapment", this::getEscapement); + m.put("escapement", this::getEscapement); m.put("weight", this::getWeight); m.put("italic", this::isItalic); m.put("underline", this::isUnderline); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfPalette.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfPalette.java index efaa774497f..d2cd8d70dbc 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfPalette.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfPalette.java @@ -167,7 +167,7 @@ int getPaletteStart() { public Map> getGenericProperties() { return GenericRecordUtil.getGenericProperties( "paletteStart", this::getPaletteStart, - "pallete", this::getPaletteCopy + "palette", this::getPaletteCopy ); } } diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfPenStyle.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfPenStyle.java index fced0a24a5c..8f918af9d26 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfPenStyle.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfPenStyle.java @@ -176,7 +176,7 @@ public HwmfLineDash getLineDash() { } /** - * Convienence method which should be used instead of accessing {@link HwmfLineDash#dashes} + * Convenience method which should be used instead of accessing {@link HwmfLineDash#dashes} * directly, so an subclass can provide user-style dashes * * @return the dash pattern diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java index da220c941e1..6a6f4f0bc94 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java @@ -128,7 +128,7 @@ public HwmfPicture(InputStream inputStream) throws IOException { consumedSize += wr.init(leis, recordSize, recordFunction); int remainingSize = (int)(recordSize - consumedSize); if (remainingSize < 0) { - throw new RecordFormatException("read too many bytes. record size: "+recordSize + "; comsumed size: "+consumedSize); + throw new RecordFormatException("read too many bytes. record size: "+recordSize + "; consumed size: "+consumedSize); } else if(remainingSize > 0) { long skipped = IOUtils.skipFully(leis, remainingSize); if (skipped != (long)remainingSize) { @@ -161,7 +161,7 @@ public void draw(Graphics2D ctx, Rectangle2D graphicsBounds) { state.backup(ctx); try { Rectangle2D wmfBounds = getBounds(); - Rectangle2D innerBounds = getInnnerBounds(); + Rectangle2D innerBounds = getInnerBounds(); if (innerBounds == null) { innerBounds = wmfBounds; } @@ -204,7 +204,7 @@ public Rectangle2D getBounds() { if (placeableHeader != null) { return placeableHeader.getBounds(); } - Rectangle2D inner = getInnnerBounds(); + Rectangle2D inner = getInnerBounds(); if (inner != null) { return inner; } @@ -216,7 +216,7 @@ public Rectangle2D getBounds() { * * @return the bounding box or null, if the WmfSetWindowOrg/Ext records aren't set */ - public Rectangle2D getInnnerBounds() { + public Rectangle2D getInnerBounds() { WmfSetWindowOrg wOrg = null; WmfSetWindowExt wExt = null; for (HwmfRecord r : getRecords()) { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java index 53c37ffe8fb..22f266c852e 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java @@ -44,7 +44,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.hwpf.model.RevisionMarkAuthorTable; import org.apache.poi.hwpf.model.SavedByTable; import org.apache.poi.hwpf.model.SectionTable; -import org.apache.poi.hwpf.model.SinglentonTextPiece; +import org.apache.poi.hwpf.model.SingletonTextPiece; import org.apache.poi.hwpf.model.StyleSheet; import org.apache.poi.hwpf.model.SubdocumentType; import org.apache.poi.hwpf.model.TextPiece; @@ -319,7 +319,7 @@ public HWPFDocument(DirectoryNode directory) throws IOException { if (!preserveTextTable) { _cft = new ComplexFileTable(); _tpt = _cft.getTextPieceTable(); - final TextPiece textPiece = new SinglentonTextPiece(_text); + final TextPiece textPiece = new SingletonTextPiece(_text); _tpt.add(textPiece); _text = textPiece.getStringBuilder(); } @@ -441,10 +441,10 @@ public Range getRange() { private Range getRange(SubdocumentType subdocument) { int startCp = 0; - for (SubdocumentType previos : SubdocumentType.ORDERED) { + for (SubdocumentType previous : SubdocumentType.ORDERED) { int length = getFileInformationBlock() - .getSubdocumentTextStreamLength(previos); - if (subdocument == previos) { + .getSubdocumentTextStreamLength(previous); + if (subdocument == previous) { return new Range(startCp, startCp + length, this); } startCp += length; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordConverter.java index d6f410d2865..1cac89f8650 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordConverter.java @@ -603,7 +603,7 @@ public String toString() { } LOG.atWarn().log(debug); - Range deadFieldValueSubrage = new Range(range.getCharacterRun( + Range deadFieldValueSubrange = new Range(range.getCharacterRun( separatorMark).getStartOffset() + 1, range.getCharacterRun( endMark).getStartOffset(), range) { @Override @@ -615,7 +615,7 @@ public String toString() { // just output field value if (separatorMark + 1 < endMark) { processCharacters(wordDocument, currentTableLevel, - deadFieldValueSubrage, currentBlock); + deadFieldValueSubrange, currentBlock); } } @@ -911,7 +911,7 @@ protected abstract void processParagraph(HWPFDocumentCore wordDocument, Element parentElement, int currentTableLevel, Paragraph paragraph, String bulletText); - protected void processParagraphes(HWPFDocumentCore wordDocument, Element flow, Range range, int currentTableLevel) { + protected void processParagraphs(HWPFDocumentCore wordDocument, Element flow, Range range, int currentTableLevel) { final int paragraphs = range.numParagraphs(); for (int p = 0; p < paragraphs; p++) { Paragraph paragraph = range.getParagraph(p); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/HtmlDocumentFacade.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/HtmlDocumentFacade.java index fe75ad14993..aaa130d5073 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/HtmlDocumentFacade.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/HtmlDocumentFacade.java @@ -86,9 +86,9 @@ public void addMeta( final String name, String value ) public void addStyleClass( Element element, String classNamePrefix, String style ) { - String exising = element.getAttribute( "class" ); + String existing = element.getAttribute( "class" ); String addition = getOrCreateCssClass( classNamePrefix, style ); - String newClassValue = AbstractWordUtils.isEmpty( exising ) ? addition : ( exising + " " + addition ); + String newClassValue = AbstractWordUtils.isEmpty( existing ) ? addition : ( existing + " " + addition ); element.setAttribute( "class", newClassValue ); } diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToFoConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToFoConverter.java index fb96e1eb363..4ae0b12d9ca 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToFoConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToFoConverter.java @@ -463,7 +463,7 @@ protected void processSection( HWPFDocumentCore wordDocument, Element flow = foDocumentFacade.addFlowToPageSequence( pageSequence, "xsl-region-body" ); - processParagraphes( wordDocument, flow, section, Integer.MIN_VALUE ); + processParagraphs( wordDocument, flow, section, Integer.MIN_VALUE ); if ( endnotes != null && !endnotes.isEmpty() ) { @@ -532,7 +532,7 @@ protected void processTable( HWPFDocumentCore wordDocument, Element flow, tableCellElement.setAttribute( "number-rows-spanned", String.valueOf( rowSpan ) ); - processParagraphes( wordDocument, tableCellElement, tableCell, + processParagraphs( wordDocument, tableCellElement, tableCell, table.getTableLevel() ); if ( !tableCellElement.hasChildNodes() ) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToHtmlConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToHtmlConverter.java index e829a997ece..add30703ed8 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToHtmlConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToHtmlConverter.java @@ -70,12 +70,12 @@ public class WordToHtmlConverter extends AbstractWordConverter * Holds properties values, applied to current {@code p} element. Those * properties shall not be doubled in children {@code span} elements. */ - private static class BlockProperies + private static class BlockProperties { final String pFontName; final int pFontSize; - public BlockProperies( String pFontName, int pFontSize ) + public BlockProperties( String pFontName, int pFontSize ) { this.pFontName = pFontName; this.pFontSize = pFontSize; @@ -84,7 +84,7 @@ public BlockProperies( String pFontName, int pFontSize ) private static final Logger LOG = LogManager.getLogger(WordToHtmlConverter.class); - private final Deque blocksProperies = new LinkedList<>(); + private final Deque blocksProperties = new LinkedList<>(); private final HtmlDocumentFacade htmlDocumentFacade; @@ -194,16 +194,16 @@ protected void outputCharacters( Element pElement, pElement.appendChild( span ); StringBuilder style = new StringBuilder(); - BlockProperies blockProperies = this.blocksProperies.peek(); + BlockProperties blockProperties = this.blocksProperties.peek(); Triplet triplet = getCharacterRunTriplet( characterRun ); if ( AbstractWordUtils.isNotEmpty( triplet.fontName ) && !Objects.equals( triplet.fontName, - blockProperies.pFontName ) ) + blockProperties.pFontName ) ) { style.append("font-family:").append(triplet.fontName).append(";"); } - if ( characterRun.getFontSize() / 2 != blockProperies.pFontSize ) + if ( characterRun.getFontSize() / 2 != blockProperties.pFontSize ) { style.append("font-size:").append(characterRun.getFontSize() / 2).append("pt;"); } @@ -465,14 +465,14 @@ protected void processNoteAutonumbered( HWPFDocument doc, String type, span.setAttribute( "class", type + "notetext" ); note.appendChild( span ); - this.blocksProperies.add( new BlockProperies( "", -1 ) ); + this.blocksProperties.add( new BlockProperties( "", -1 ) ); try { processCharacters( doc, Integer.MIN_VALUE, noteTextRange, span ); } finally { - this.blocksProperies.pop(); + this.blocksProperties.pop(); } } @@ -531,7 +531,7 @@ protected void processParagraph( HWPFDocumentCore hwpfDocument, pFontSize = -1; pFontName = AbstractWordUtils.EMPTY; } - blocksProperies.push( new BlockProperies( pFontName, pFontSize ) ); + blocksProperties.push( new BlockProperties( pFontName, pFontSize ) ); } try { @@ -581,7 +581,7 @@ protected void processParagraph( HWPFDocumentCore hwpfDocument, } finally { - blocksProperies.pop(); + blocksProperties.pop(); } if ( style.length() > 0 ) { @@ -599,7 +599,7 @@ protected void processSection( HWPFDocumentCore wordDocument, htmlDocumentFacade.addStyleClass( div, "d", getSectionStyle( section ) ); htmlDocumentFacade.getBody().appendChild( div ); - processParagraphes( wordDocument, div, section, Integer.MIN_VALUE ); + processParagraphs( wordDocument, div, section, Integer.MIN_VALUE ); } @Override @@ -609,7 +609,7 @@ protected void processSingleSection( HWPFDocumentCore wordDocument, htmlDocumentFacade.addStyleClass( htmlDocumentFacade.getBody(), "b", getSectionStyle( section ) ); - processParagraphes( wordDocument, htmlDocumentFacade.getBody(), section, + processParagraphs( wordDocument, htmlDocumentFacade.getBody(), section, Integer.MIN_VALUE ); } @@ -688,7 +688,7 @@ protected void processTable( HWPFDocumentCore hwpfDocument, Element flow, String.valueOf( rowSpan ) ); } - processParagraphes( hwpfDocument, tableCellElement, tableCell, + processParagraphs( hwpfDocument, tableCellElement, tableCell, table.getTableLevel() ); if ( !tableCellElement.hasChildNodes() ) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToTextConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToTextConverter.java index ddd7ff68d58..d0618c8a2a5 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToTextConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToTextConverter.java @@ -407,7 +407,7 @@ protected void processSection( HWPFDocumentCore wordDocument, Section section, int s ) { Element sectionElement = textDocumentFacade.createBlock(); - processParagraphes( wordDocument, sectionElement, section, + processParagraphs( wordDocument, sectionElement, section, Integer.MIN_VALUE ); sectionElement.appendChild( textDocumentFacade.createText( "\n" ) ); textDocumentFacade.body.appendChild( sectionElement ); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/dev/HWPFLister.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/dev/HWPFLister.java index 214af0afa1c..dda54f75349 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/dev/HWPFLister.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/dev/HWPFLister.java @@ -497,19 +497,19 @@ public void dumpPapx( boolean withProperties, boolean withSprms ) { } } - public void dumpParagraphs( boolean dumpAssotiatedPapx ) { + public void dumpParagraphs( boolean dumpAssociatedPapx ) { for ( Map.Entry entry : paragraphs.entrySet() ) { Integer endOfParagraphCharOffset = entry.getKey(); System.out.println( "[...; " + ( endOfParagraphCharOffset + 1 ) + "): " + entry.getValue() ); - if ( dumpAssotiatedPapx ) { - boolean hasAssotiatedPapx = false; + if ( dumpAssociatedPapx ) { + boolean hasAssociatedPapx = false; for ( PAPX papx : _doc.getParagraphTable().getParagraphs() ) { if ( papx.getStart() <= endOfParagraphCharOffset && endOfParagraphCharOffset < papx .getEnd() ) { - hasAssotiatedPapx = true; + hasAssociatedPapx = true; System.out.println( "* " + papx ); SprmIterator sprmIt = new SprmIterator( @@ -517,9 +517,9 @@ public void dumpParagraphs( boolean dumpAssotiatedPapx ) { dumpSprms( sprmIt, "** " ); } } - if ( !hasAssotiatedPapx ) { + if ( !hasAssociatedPapx ) { System.out.println( "* " - + "NO PAPX ASSOTIATED WITH PARAGRAPH!" ); + + "NO PAPX ASSOCIATED WITH PARAGRAPH!" ); } } } diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Ffn.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Ffn.java index 3f925f86265..dfa31460843 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Ffn.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Ffn.java @@ -47,7 +47,7 @@ public final class Ffn { private byte[] _panose = new byte[10];//???? private byte[] _fontSig = new byte[24];//???? - // zero terminated string that records name of font, cuurently not + // zero terminated string that records name of font, currently not // supporting Extended chars private char[] _xszFfn; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFfn.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFfn.java index 38c0d53cab6..75932f6a4e5 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFfn.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFfn.java @@ -78,7 +78,7 @@ static OldFfn build(byte[] buf, int offset, int fontTableEnd) { charset = charset == null ? StringUtil.WIN_1252 : charset; offset += LittleEndianConsts.BYTE_SIZE; //if this byte here == 7, it _may_ signify existence of - //an altername font name + //an alternate font name //not sure what the byte after the _chs does offset += LittleEndianConsts.BYTE_SIZE; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java index 785f6924058..efb893a9593 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java @@ -94,7 +94,7 @@ public void fill(List filler) } /** - * Used when writing out a Word docunment. This method is part of a sequence + * Used when writing out a Word document. This method is part of a sequence * that is necessary because there is no easy and efficient way to * determine the number PAPX's that will fit into one FKP. THe sequence is * as follows: diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PicturesTable.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PicturesTable.java index 45e726e5649..0995f89111d 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PicturesTable.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PicturesTable.java @@ -45,7 +45,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more *

      * Word stores images as is within so called "Data stream" - the stream within a Word docfile containing various data * that hang off of characters in the main stream. For example, binary data describing in-line pictures and/or - * formfields an also embedded objects-native data. Word picture structures are concatenated one after the other in + * form fields an also embedded objects-native data. Word picture structures are concatenated one after the other in * the data stream if the document contains pictures. * Data stream is easily reachable via HWPFDocument._dataStream property. * A picture is represented in the document text stream as a special character, an Unicode \u0001 whose diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/SinglentonTextPiece.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/SingletonTextPiece.java similarity index 83% rename from poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/SinglentonTextPiece.java rename to poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/SingletonTextPiece.java index 6622cc7d10f..2287076261f 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/SinglentonTextPiece.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/SingletonTextPiece.java @@ -20,12 +20,12 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.util.StringUtil; @Internal -public class SinglentonTextPiece extends TextPiece { - public SinglentonTextPiece(SinglentonTextPiece other) { +public class SingletonTextPiece extends TextPiece { + public SingletonTextPiece(SingletonTextPiece other) { super(other); } - public SinglentonTextPiece( StringBuilder buffer ) { + public SingletonTextPiece( StringBuilder buffer ) { super( 0, buffer.length(), StringUtil.getToUnicodeLE(buffer.toString()), new PieceDescriptor( new byte[8], 0 ) ); } @@ -61,11 +61,11 @@ public int getStart() public String toString() { - return "SinglentonTextPiece (" + characterLength() + " chars)"; + return "SingletonTextPiece (" + characterLength() + " chars)"; } @Override - public SinglentonTextPiece copy() { - return new SinglentonTextPiece(this); + public SingletonTextPiece copy() { + return new SingletonTextPiece(this); } } diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleSheet.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleSheet.java index 348c23677fd..7813f2b5b76 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleSheet.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleSheet.java @@ -193,7 +193,7 @@ public int hashCode() { } /** - * Creates a PartagraphProperties object from a papx stored in the + * Creates a ParagraphProperties object from a papx stored in the * StyleDescription at the index istd in the StyleDescription array. The PAP * is placed in the StyleDescription at istd after its been created. Not * every StyleDescription will contain a papx. In these cases this function diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/TextPiece.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/TextPiece.java index 4dada2805ba..20f039e3dbd 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/TextPiece.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/TextPiece.java @@ -136,7 +136,7 @@ public String substring(int start, int end) { } /** - * Adjusts the internal string for deletinging + * Adjusts the internal string for deleting * some characters within this. * * @param start The start position for the delete, in characters diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/UnhandledDataStructure.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/UnhandledDataStructure.java index 3e69c5979ae..a56b3fdc24e 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/UnhandledDataStructure.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/UnhandledDataStructure.java @@ -44,7 +44,7 @@ public UnhandledDataStructure(byte[] buf, int offset, int length) if (offset < 0 || length < 0) { throw new IndexOutOfBoundsException("Offset and Length must both be >= 0, negative " + - "indicies are not permitted - code is tried to read " + length + " from offset " + offset); + "indices are not permitted - code is tried to read " + length + " from offset " + offset); } // Save that requested portion of the data diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/CHPAbstractType.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/CHPAbstractType.java index 4e9c83f585d..b19b469f6a4 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/CHPAbstractType.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/CHPAbstractType.java @@ -2181,7 +2181,7 @@ public boolean isFStrike() /** * Sets the fObj field value. - * Embedded objec + * Embedded object */ @Internal public void setFObj( boolean value ) @@ -2190,7 +2190,7 @@ public void setFObj( boolean value ) } /** - * Embedded objec + * Embedded object * @return the fObj field value. */ @Internal diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/FLDAbstractType.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/FLDAbstractType.java index 7be124641ae..fac2ed63ea0 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/FLDAbstractType.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/FLDAbstractType.java @@ -76,7 +76,7 @@ public String toString() { } /** - * Size of record (exluding 4 byte header) + * Size of record (excluding 4 byte header) */ public static int getSize() { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/HRESIAbstractType.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/HRESIAbstractType.java index 82d52013547..ff8705c5d44 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/HRESIAbstractType.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/HRESIAbstractType.java @@ -58,7 +58,7 @@ public void serialize( byte[] data, int offset ) } /** - * Size of record (exluding 4 byte header) + * Size of record (excluding 4 byte header) */ public static int getSize() { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/TLPAbstractType.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/TLPAbstractType.java index 6d0e4269894..f224f497d8b 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/TLPAbstractType.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/types/TLPAbstractType.java @@ -73,7 +73,7 @@ public String toString() { } /** - * Size of record (exluding 4 byte header) + * Size of record (excluding 4 byte header) */ public int getSize() { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java index 372393945e9..513beb9ac70 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java @@ -148,7 +148,7 @@ private static Integer getIstd( byte[] grpprl, int offset ) * * @param oldCHP The base CharacterProperties. * @param newCHP The current CharacterProperties. - * @param sprm an SPRM opearation + * @param sprm an SPRM operation */ static void unCompressCHPOperation (CharacterProperties oldCHP, CharacterProperties newCHP, diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java index d1d41919fc9..b41ccf07ceb 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java @@ -154,7 +154,7 @@ static void unCompressPAPOperation (ParagraphProperties newPAP, SprmOperation sp newPAP.setFNoLnn (sprm.getOperand() != 0); break; case 0xd: - // handle tabs . variable parameter. seperate processing needed + // handle tabs . variable parameter. separate processing needed handleTabs(newPAP, sprm); break; case 0xe: @@ -203,7 +203,7 @@ static void unCompressPAPOperation (ParagraphProperties newPAP, SprmOperation sp break; case 0x1b: byte param = (byte)sprm.getOperand(); - // TODO: handle paragraph postioning + // TODO: handle paragraph positioning byte pcVert = (byte) ((param & 0x0c) >> 2); byte pcHorz = (byte) (param & 0x03); if (pcVert != 3) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java index 267f6b68759..f544f2abbd6 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java @@ -148,7 +148,7 @@ static void unCompressTAPOperation (TableProperties newTAP, SprmOperation sprm) short itcMac = grpprl[offset]; short[] rgdxaCenter = new short[itcMac + 1]; TableCellDescriptor[] rgtc = new TableCellDescriptor[itcMac]; - //I use varParam[0] and newTAP._itcMac interchangably + //I use varParam[0] and newTAP._itcMac interchangeably newTAP.setItcMac (itcMac); newTAP.setRgdxaCenter (rgdxaCenter); newTAP.setRgtc (rgtc); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/HWPFList.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/HWPFList.java index 0ba89ec9faf..da7ca4e679b 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/HWPFList.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/HWPFList.java @@ -47,7 +47,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more */ public final class HWPFList { - private boolean _ignoreLogicalLeftIdentation; + private boolean _ignoreLogicalLeftIndentation; private LFO _lfo; private LFOData _lfoData; private ListData _listData; @@ -92,7 +92,7 @@ else if ( 0xF802 <= ilfo && ilfo <= 0xFFFF ) int nilfo = ilfo ^ 0xFFFF; _lfo = listTables.getLfo( nilfo ); _lfoData = listTables.getLfoData( nilfo ); - _ignoreLogicalLeftIdentation = true; + _ignoreLogicalLeftIndentation = true; } else { @@ -174,9 +174,9 @@ public byte getTypeOfCharFollowingTheNumber( char level ) return getLVL( level ).getTypeOfCharFollowingTheNumber(); } - public boolean isIgnoreLogicalLeftIdentation() + public boolean isIgnoreLogicalLeftIndentation() { - return _ignoreLogicalLeftIdentation; + return _ignoreLogicalLeftIndentation; } /** @@ -204,10 +204,10 @@ public boolean isStartAtOverriden(char level ) && !lfolvl.isFormatting(); } - public void setIgnoreLogicalLeftIdentation( - boolean ignoreLogicalLeftIdentation ) + public void setIgnoreLogicalLeftIndentation( + boolean ignoreLogicalLeftIndentation ) { - this._ignoreLogicalLeftIdentation = ignoreLogicalLeftIdentation; + this._ignoreLogicalLeftIndentation = ignoreLogicalLeftIndentation; } /** diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Picture.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Picture.java index 7ba7892b283..45b40516b0a 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Picture.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Picture.java @@ -93,7 +93,7 @@ private static boolean matchSignature( byte[] pictureData, private final List _blipRecords; private byte[] content; - private int dataBlockStartOfsset; + private int dataBlockStartOffset; private int height = -1; private int width = -1; @@ -112,11 +112,11 @@ public Picture( EscherBlipRecord blipRecord ) * Builds a Picture object for a Picture stored in the * DataStream */ - public Picture( int dataBlockStartOfsset, byte[] _dataStream, boolean fillBytes ) { // NOSONAR - _picfAndOfficeArtData = new PICFAndOfficeArtData( _dataStream, dataBlockStartOfsset ); + public Picture( int dataBlockStartOffset, byte[] _dataStream, boolean fillBytes ) { // NOSONAR + _picfAndOfficeArtData = new PICFAndOfficeArtData( _dataStream, dataBlockStartOffset ); _picf = _picfAndOfficeArtData.getPicf(); - this.dataBlockStartOfsset = dataBlockStartOfsset; + this.dataBlockStartOffset = dataBlockStartOffset; _blipRecords = _picfAndOfficeArtData.getBlipRecords(); @@ -457,7 +457,7 @@ public int getSize() */ public int getStartOffset() { - return dataBlockStartOfsset; + return dataBlockStartOffset; } /** @@ -484,7 +484,7 @@ public int getWidth() /** * returns the description stored in the alternative text * - * @return pictue description + * @return picture description */ public String getDescription() { @@ -524,7 +524,7 @@ public String suggestFileExtension() public String suggestFullFileName() { String fileExt = suggestFileExtension(); - return Integer.toHexString( dataBlockStartOfsset ) + return Integer.toHexString( dataBlockStartOffset ) + ( fileExt.length() > 0 ? "." + fileExt : "" ); } @@ -592,7 +592,7 @@ public PictureType suggestPictureType() { * @param out * a stream to write to * @throws IOException - * if some exception is occured while writing to specified out + * if some exception is occurred while writing to specified out */ public void writeImageContent( OutputStream out ) throws IOException { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Range.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Range.java index 08d3840e563..9db64f1b19d 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Range.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Range.java @@ -213,7 +213,7 @@ protected Range(Range other) { /** - * Ensures that the start and end were were given are actually valid, to + * Ensures that the start and end were given are actually valid, to * avoid issues later on if they're not */ private void sanityCheckStartEnd() { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Section.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Section.java index ac0e6f25aff..45acccf6873 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Section.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Section.java @@ -103,7 +103,7 @@ public int getPageWidth() * * section.setMarginBottom( (int) 1.5 * AbstractWordUtils.TWIPS_PER_INCH ); * - * @param marginWidth A primitive int whose value will indciate how high the margin should + * @param marginWidth A primitive int whose value will indicate how high the margin should * be - in twips. */ public void setMarginBottom(int marginWidth) @@ -118,7 +118,7 @@ public void setMarginBottom(int marginWidth) * * section.setMarginLeft( (int) 1.5 * AbstractWordUtils.TWIPS_PER_INCH ); * - * @param marginWidth A primitive int whose value will indciate how high the margin should + * @param marginWidth A primitive int whose value will indicate how high the margin should * be - in twips. */ public void setMarginLeft(int marginWidth) @@ -133,7 +133,7 @@ public void setMarginLeft(int marginWidth) * * section.setMarginRight( (int) 1.5 * AbstractWordUtils.TWIPS_PER_INCH ); * - * @param marginWidth A primitive int whose value will indciate how high the margin should + * @param marginWidth A primitive int whose value will indicate how high the margin should * be - in twips. */ public void setMarginRight(int marginWidth) @@ -148,7 +148,7 @@ public void setMarginRight(int marginWidth) * * section.setMarginTop( (int) 1.5 * AbstractWordUtils.TWIPS_PER_INCH ); * - * @param marginWidth A primitive int whose value will indciate how high the margin should + * @param marginWidth A primitive int whose value will indicate how high the margin should * be - in twips. */ public void setMarginTop(int marginWidth) @@ -170,7 +170,7 @@ public boolean isColumnsEvenlySpaced() *

      {@code 0x02}
      If the numbering restarts on every page
      * * - * @return an Rnc, as decribed above, specifying when and where footnote numbering restarts + * @return an Rnc, as described above, specifying when and where footnote numbering restarts */ public short getFootnoteRestartQualifier() { return _props.getRncFtn(); @@ -203,7 +203,7 @@ public int getFootnoteNumberingFormat() { *
      {@code 0x02}
      If the numbering restarts on every page
      * * - * @return an Rnc, as decribed above, specifying when and where endnote numbering restarts + * @return an Rnc, as described above, specifying when and where endnote numbering restarts */ public short getEndnoteRestartQualifier() { return _props.getRncEdn(); diff --git a/poi-scratchpad/src/main/resources/org/apache/poi/hdgf/chunks_parse_cmds.tbl b/poi-scratchpad/src/main/resources/org/apache/poi/hdgf/chunks_parse_cmds.tbl index 7cb715abd6d..03308791a5b 100644 --- a/poi-scratchpad/src/main/resources/org/apache/poi/hdgf/chunks_parse_cmds.tbl +++ b/poi-scratchpad/src/main/resources/org/apache/poi/hdgf/chunks_parse_cmds.tbl @@ -44,7 +44,7 @@ # Lines start with # are comments. # Every list of commands starts with 'start ch_type' # and ends with 'end'. -# In between start and end are space-separeted lines +# In between start and end are space-separated lines # with 'type', 'offset', 'name' values. # Atm I use 'atoi', so only decimal value is allowed for ch_type, type and offset. # The possible values for 'type' are: @@ -332,7 +332,7 @@ start 133 4 50 LineEndEnd 5 50 LineEndBegin 6 50 EndSize -7 50 SqueareCap +7 50 SquareCap 0 51 BeginSize 11 54 BlockStarts 21 54 BlockStarts @@ -484,7 +484,7 @@ start 148 0 31 AllCaps 1 31 InitCaps 0 32 Subscript -1 32 Superscipt +1 32 Superscript 25 33 Scale*100 % 8 35 LangCode 31 36 Size diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hslf/dev/TestSlideShowDumper.java b/poi-scratchpad/src/test/java/org/apache/poi/hslf/dev/TestSlideShowDumper.java index 1b62833aece..73cbb66b268 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hslf/dev/TestSlideShowDumper.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hslf/dev/TestSlideShowDumper.java @@ -60,7 +60,7 @@ void runOneFile(File pFile) throws Exception { SlideShowDumper.main(new String[]{pFile.getAbsolutePath()}); } catch (ArrayIndexOutOfBoundsException e) { - // some corrupted documents currently can cause this excpetion + // some corrupted documents currently can cause this exception if (!FAILING.contains(pFile.getName()) && !ENCRYPTED_FILES.contains(pFile.getName())) { throw e; } diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hslf/extractor/TestExtractor.java b/poi-scratchpad/src/test/java/org/apache/poi/hslf/extractor/TestExtractor.java index 6b8a08ff2df..afe2d728fc8 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hslf/extractor/TestExtractor.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hslf/extractor/TestExtractor.java @@ -174,8 +174,8 @@ void testMissingCoreRecords() throws IOException { } @Test - void testExtractFromEmbeded() throws IOException { - try (final InputStream is = POIDataSamples.getSpreadSheetInstance().openResourceAsStream("excel_with_embeded.xls"); + void testExtractFromEmbedded() throws IOException { + try (final InputStream is = POIDataSamples.getSpreadSheetInstance().openResourceAsStream("excel_with_embedded.xls"); final POIFSFileSystem fs = new POIFSFileSystem(is)) { final DirectoryNode root = fs.getRoot(); @@ -200,8 +200,8 @@ void testExtractFromEmbeded() throws IOException { * A powerpoint file with embedded powerpoint files */ @Test - void testExtractFromOwnEmbeded() throws IOException { - try (SlideShowExtractor ppe = openExtractor("ppt_with_embeded.ppt")) { + void testExtractFromOwnEmbedded() throws IOException { + try (SlideShowExtractor ppe = openExtractor("ppt_with_embedded.ppt")) { List> shapes = ppe.getOLEShapes(); assertEquals(6, shapes.size(), "Expected 6 ole shapes"); int num_ppt = 0, num_doc = 0, num_xls = 0; diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hslf/model/TestSlideMaster.java b/poi-scratchpad/src/test/java/org/apache/poi/hslf/model/TestSlideMaster.java index 8c00994768b..179e6a049b9 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hslf/model/TestSlideMaster.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hslf/model/TestSlideMaster.java @@ -252,8 +252,8 @@ void testChangeSlideMaster() throws IOException { } /** - * Varify we can read attrubutes for different identtation levels. - * (typical for the "bullted body" placeholder) + * Verify we can read attributes for different indentation levels. + * (typical for the "bulleted body" placeholder) */ @Test void testIndentation() throws IOException { diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hslf/model/TestTable.java b/poi-scratchpad/src/test/java/org/apache/poi/hslf/model/TestTable.java index b97dcef4135..7bb321f2dd5 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hslf/model/TestTable.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hslf/model/TestTable.java @@ -105,7 +105,7 @@ void test45889() throws IOException { // Table(rownum, colnum) must throw IllegalArgumentException if any of the arguments is less than 1 @Test - void testIllegalRowCnstruction() throws IOException { + void testIllegalRowConstruction() throws IOException { try (HSLFSlideShow ppt = new HSLFSlideShow()) { HSLFSlide slide = ppt.createSlide(); assertThrows(IllegalArgumentException.class, () -> slide.createTable(0, 5)); @@ -127,7 +127,7 @@ void testIllegalColConstruction() throws IOException { */ @Test void test57820() throws IOException { - try (SlideShow ppt = getSlideShow("bug57820-initTableNullRefrenceException.ppt")) { + try (SlideShow ppt = getSlideShow("bug57820-initTableNullReferenceException.ppt")) { List> slides = ppt.getSlides(); assertEquals(1, slides.size()); diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestFontCollection.java b/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestFontCollection.java index bb7eab1dbbf..1143ae031c8 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestFontCollection.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestFontCollection.java @@ -78,7 +78,7 @@ void testAddFont() { Record[] child = fonts.getChildRecords(); assertEquals(3, child.length); - // Check we get the right font name for the indicies + // Check we get the right font name for the indices fi = fonts.getFontInfo(0); assertNotNull(fi); assertEquals("Times New Roman", fi.getTypeface()); diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestStyleTextPropAtom.java b/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestStyleTextPropAtom.java index e155df07b84..3880b6a2b25 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestStyleTextPropAtom.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestStyleTextPropAtom.java @@ -72,7 +72,7 @@ public final class TestStyleTextPropAtom { 0, 0x18, 0, 0, // mask is 0x1800 0, 0, // left aligned 0x50, 0, // line spacing 80 - 0x1C, 0, 0, 0, // paragprah is 28 long + 0x1C, 0, 0, 0, // paragraph is 28 long 0, 0, // paragraph reserved field 0, 0x10, 0, 0, // mask is 0x1000 0x50, 0, // line spacing 80 @@ -763,9 +763,9 @@ void test45815() throws IOException { // changed original data: ... 0x41 and 0x06 don't match // the bitmask text properties will sanitize the bytes and thus the bytes differ - byte[] exptected = data.clone(); - exptected[18] = 0; + byte[] expected = data.clone(); + expected[18] = 0; - doReadWrite(data, exptected, length); + doReadWrite(data, expected, length); } } diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestBugs.java b/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestBugs.java index 1cd5be3cf60..0b418ca6422 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestBugs.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestBugs.java @@ -531,7 +531,7 @@ void bug49541() throws IOException { "41246-1.ppt, 36", "41246-2.ppt, 16", // Bug 44770: java.lang.RuntimeException: Couldn't instantiate the class for - // type with id 1036 on class class org.apache.poi.hslf.record.PPDrawing + // type with id 1036 on class org.apache.poi.hslf.record.PPDrawing "44770.ppt, 19", // Bug 42486: Failure parsing a seemingly valid PPT "42486.ppt, 33" diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hsmf/TestSimpleFileRead.java b/poi-scratchpad/src/test/java/org/apache/poi/hsmf/TestSimpleFileRead.java index ecbb8f25509..755bcdb5365 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hsmf/TestSimpleFileRead.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hsmf/TestSimpleFileRead.java @@ -28,7 +28,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * Tests to verify that we can read a simple msg file, that is in plain/text - * format with no attachments or extra recipents. + * format with no attachments or extra recipients. */ public final class TestSimpleFileRead { private final MAPIMessage mapiMessage; diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java b/poi-scratchpad/src/test/java/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java index bb3c4b3cd08..abbc73e4c26 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java @@ -122,7 +122,7 @@ void testConstructors() throws Exception { * recipients in an email we sent. */ @Test - void testSentWithMulipleRecipients() throws Exception { + void testSentWithMultipleRecipients() throws Exception { // To: 'Ashutosh Dandavate' , // 'Paul Holmes-Higgin' , // 'Mike Farman' @@ -191,7 +191,7 @@ void testReceivedWithMultipleRecipients() throws Exception { } /** - * See also {@link org.apache.poi.extractor.ooxml.TestExtractorFactory#testEmbeded()} + * See also {@link org.apache.poi.extractor.ooxml.TestExtractorFactory#testEmbedded()} */ @SuppressWarnings("JavadocReference") @Test @@ -213,7 +213,7 @@ void testWithAttachments() throws Exception { assertContains(text, "Attachment: pj1.txt\n"); assertContains(text, "contenu"); - // Embeded bits are checked in + // Embedded bits are checked in // TestExtractorFactory } } diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java index 4ef67c44c8c..72015be6dc2 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java @@ -137,8 +137,8 @@ void testExtractFromTextPieces() throws IOException { * Test that we can get data from two different embedded word documents */ @Test - void testExtractFromEmbeded() throws IOException { - InputStream is = POIDataSamples.getSpreadSheetInstance().openResourceAsStream("excel_with_embeded.xls"); + void testExtractFromEmbedded() throws IOException { + InputStream is = POIDataSamples.getSpreadSheetInstance().openResourceAsStream("excel_with_embedded.xls"); POIFSFileSystem fs = new POIFSFileSystem(is); is.close(); diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestBorderCode.java b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestBorderCode.java index 8c998ebd62a..c5ad74e54d5 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestBorderCode.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestBorderCode.java @@ -26,7 +26,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.junit.jupiter.api.Test; /** - * API for BorderCode, see Bugzill 49919 + * API for BorderCode, see Bugzilla 49919 */ public final class TestBorderCode { diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestBugs.java b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestBugs.java index be98329282c..8cd3ab517aa 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestBugs.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestBugs.java @@ -592,7 +592,7 @@ void testBug51944() throws Exception { @CsvSource({ // Bug 51834 - Opening and Writing .doc file results in corrupt document // we don't have Java test for this file - it should be checked using - // Microsoft BFF Validator. But check read-write-read anyway. -- sergey + // Microsoft Office Binary File Format Validator. But check read-write-read anyway. -- sergey "Bug51834.doc, true", // Bug 52032 - ArrayIndexOutOfBoundsException with no stack trace (broken after revision 1178063) "Bug52032_1.doc, true", diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestHeaderStories.java b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestHeaderStories.java index 07cb7da2d9f..9a5aa539bb9 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestHeaderStories.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestHeaderStories.java @@ -67,9 +67,9 @@ void testHeader() { assertEquals(60, hs.getRange().text().length()); - // Should have the usual 6 separaters + // Should have the usual 6 separators // Then all 6 of the different header/footer kinds - // Finally a terminater + // Finally a terminator assertEquals(13, hs.getPlcfHdd().length()); assertEquals(215, hs.getRange().getStartOffset()); diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestPictures.java b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestPictures.java index 96caa82a240..ebea49783a6 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestPictures.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestPictures.java @@ -144,10 +144,10 @@ void testFastSaved(String file) throws IOException { * Check that we can properly read one of these */ @Test - void testEmbededDocumentIcon() { + void testEmbeddedDocumentIcon() { // This file has two embedded excel files, an embedded powerpoint // file and an embedded word file, in that order - HWPFDocument doc = openSampleFile("word_with_embeded.doc"); + HWPFDocument doc = openSampleFile("word_with_embedded.doc"); // Check we don't break loading the pictures doc.getPicturesTable().getAllPictures(); diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestRangeProperties.java b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestRangeProperties.java index cdb9663f340..1aea8843f73 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestRangeProperties.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestRangeProperties.java @@ -96,7 +96,7 @@ void testAsciiTextParagraphs() { // no PAP reconstruction // assertEquals( 7, r.numParagraphs() ); - // with PAP reconstructon + // with PAP reconstruction assertEquals( 8, r.numParagraphs() ); String[] p1_parts = a_page_1.split("\r"); diff --git a/poi/models/writeFilesystemSequenceDiagram.pgml b/poi/models/writeFilesystemSequenceDiagram.pgml index fc5746c2669..6c2179e1b0b 100644 --- a/poi/models/writeFilesystemSequenceDiagram.pgml +++ b/poi/models/writeFilesystemSequenceDiagram.pgml @@ -1486,7 +1486,7 @@ strokecolor="-16777216" font="dialog" textsize="9" - > : add the propert to the block + > : add the property to the block * * Note that {@code options} is an internal field. @@ -191,7 +191,7 @@ public int serialize( int offset, byte[] data) public abstract int serialize( int offset, byte[] data, EscherSerializationListener listener ); /** - * Subclasses should effeciently return the number of bytes required to + * Subclasses should efficiently return the number of bytes required to * serialize the record. * * @return number of bytes @@ -218,7 +218,7 @@ public void setRecordId( short recordId ) { /** * @return Returns the children of this record. By default this will - * be an empty list. EscherCotainerRecord is the only record + * be an empty list. EscherContainerRecord is the only record * that may contain children. * * @see EscherContainerRecord diff --git a/poi/src/main/java/org/apache/poi/ddf/EscherRecordTypes.java b/poi/src/main/java/org/apache/poi/ddf/EscherRecordTypes.java index 4f11dab6c09..a73afa84bcf 100644 --- a/poi/src/main/java/org/apache/poi/ddf/EscherRecordTypes.java +++ b/poi/src/main/java/org/apache/poi/ddf/EscherRecordTypes.java @@ -24,7 +24,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import java.util.stream.Stream; public enum EscherRecordTypes { - // records greater then 0xF000 belong to Microsoft Office Drawing format also known as Escher + // records greater than 0xF000 belong to Microsoft Office Drawing format also known as Escher /** * {@link EscherContainerRecord Container} for all OfficeArt file records that contain document-wide data. diff --git a/poi/src/main/java/org/apache/poi/ddf/EscherSpRecord.java b/poi/src/main/java/org/apache/poi/ddf/EscherSpRecord.java index 208e22bcbce..1ebde2fdcc7 100644 --- a/poi/src/main/java/org/apache/poi/ddf/EscherSpRecord.java +++ b/poi/src/main/java/org/apache/poi/ddf/EscherSpRecord.java @@ -101,7 +101,7 @@ public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory * * @param offset The offset into data to start writing the record data to. * @param data The byte array to serialize to. - * @param listener A listener to retrieve start and end callbacks. Use a NullEscherSerailizationListener to ignore these events. + * @param listener A listener to retrieve start and end callbacks. Use a NullEscherSerializationListener to ignore these events. * @return The number of bytes written. * * @see NullEscherSerializationListener diff --git a/poi/src/main/java/org/apache/poi/extractor/ExtractorFactory.java b/poi/src/main/java/org/apache/poi/extractor/ExtractorFactory.java index 5c94c4c8929..b3c6ef05143 100644 --- a/poi/src/main/java/org/apache/poi/extractor/ExtractorFactory.java +++ b/poi/src/main/java/org/apache/poi/extractor/ExtractorFactory.java @@ -95,7 +95,7 @@ private ExtractorFactory() { * (usermodel extractors tend to be more accurate, but use more memory) * Default is false. * - * @return true if event extractors should be preferred in the current thread, fals otherwise. + * @return true if event extractors should be preferred in the current thread, false otherwise. */ public static boolean getThreadPrefersEventExtractors() { return threadPreferEventExtractors.get(); @@ -106,7 +106,7 @@ public static boolean getThreadPrefersEventExtractors() { * (usermodel extractors tend to be more accurate, but use more memory) * Default is to use the thread level setting, which defaults to false. * - * @return true if event extractors should be preferred in all threads, fals otherwise. + * @return true if event extractors should be preferred in all threads, false otherwise. */ public static Boolean getAllThreadsPreferEventExtractors() { return allPreferEventExtractors; diff --git a/poi/src/main/java/org/apache/poi/extractor/POITextExtractor.java b/poi/src/main/java/org/apache/poi/extractor/POITextExtractor.java index 4c36c37fc88..fe840ae8fee 100644 --- a/poi/src/main/java/org/apache/poi/extractor/POITextExtractor.java +++ b/poi/src/main/java/org/apache/poi/extractor/POITextExtractor.java @@ -67,7 +67,7 @@ public interface POITextExtractor extends Closeable { /** * Allows to free resources of the Extractor as soon as - * it is not needed any more. This may include closing + * it is not needed anymore. This may include closing * open file handles and freeing memory. * * The Extractor cannot be used after close has been called. diff --git a/poi/src/main/java/org/apache/poi/hpsf/ClassID.java b/poi/src/main/java/org/apache/poi/hpsf/ClassID.java index 7e0ec5e2d88..8cda8e1579c 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/ClassID.java +++ b/poi/src/main/java/org/apache/poi/hpsf/ClassID.java @@ -216,7 +216,7 @@ public boolean equals(final Object o) { } /** - * Checks whether this {@code ClassID} is equal to another ClassID with inverted endianess, + * Checks whether this {@code ClassID} is equal to another ClassID with inverted endianness, * because there are apparently not only version 1 GUIDs (aka "network" with big-endian encoding), * but also version 2 GUIDs (aka "native" with little-endian encoding) out there. * diff --git a/poi/src/main/java/org/apache/poi/hpsf/DocumentSummaryInformation.java b/poi/src/main/java/org/apache/poi/hpsf/DocumentSummaryInformation.java index f96e12ac75e..b39c2c5a63e 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/DocumentSummaryInformation.java +++ b/poi/src/main/java/org/apache/poi/hpsf/DocumentSummaryInformation.java @@ -727,7 +727,7 @@ public void removeLanguage() { * Gets the document version as a string, which is normally unset and empty * (or {@code null}). * - * @return the document verion + * @return the document version */ public String getDocumentVersion() { return getPropertyStringValue(PropertyIDMap.PID_DOCVERSION); diff --git a/poi/src/main/java/org/apache/poi/hpsf/PropertySetFactory.java b/poi/src/main/java/org/apache/poi/hpsf/PropertySetFactory.java index b08b68dfe18..298d785363d 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/PropertySetFactory.java +++ b/poi/src/main/java/org/apache/poi/hpsf/PropertySetFactory.java @@ -34,7 +34,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more public class PropertySetFactory { /** * Creates the most specific {@link PropertySet} from an entry - * in the specified POIFS Directory. This is preferrably a {@link + * in the specified POIFS Directory. This is preferably a {@link * DocumentSummaryInformation} or a {@link SummaryInformation}. If * the specified entry does not contain a property set stream, an * exception is thrown. If no entry is found with the given name, @@ -59,7 +59,7 @@ public static PropertySet create(final DirectoryEntry dir, final String name) /** * Creates the most specific {@link PropertySet} from an {@link - * InputStream}. This is preferrably a {@link + * InputStream}. This is preferably a {@link * DocumentSummaryInformation} or a {@link SummaryInformation}. If * the specified {@link InputStream} does not contain a property * set stream, an exception is thrown and the {@link InputStream} diff --git a/poi/src/main/java/org/apache/poi/hpsf/Section.java b/poi/src/main/java/org/apache/poi/hpsf/Section.java index 1f127fb48a7..c16b2ee4b7c 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/Section.java +++ b/poi/src/main/java/org/apache/poi/hpsf/Section.java @@ -582,7 +582,7 @@ private void padSectionBytes() { * was available or not. This information might be important for * callers of {@link #getPropertyIntValue} since the latter * returns 0 if the property does not exist. Using {@link - * #wasNull} the caller can distiguish this case from a property's + * #wasNull} the caller can distinguish this case from a property's * real value of 0. * * @return {@code true} if the last call to {@link diff --git a/poi/src/main/java/org/apache/poi/hpsf/UnicodeString.java b/poi/src/main/java/org/apache/poi/hpsf/UnicodeString.java index e89e47e5a03..5641596714d 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/UnicodeString.java +++ b/poi/src/main/java/org/apache/poi/hpsf/UnicodeString.java @@ -81,7 +81,7 @@ public String toJavaString() { } if ( terminator != result.length() - 1 ) { - LOG.atWarn().log("String terminator (\\0) for UnicodeString property value occured before the end of " + + LOG.atWarn().log("String terminator (\\0) for UnicodeString property value occurred before the end of " + "string. Trimming and hope for the best."); } return result.substring( 0, terminator ); diff --git a/poi/src/main/java/org/apache/poi/hpsf/VariantSupport.java b/poi/src/main/java/org/apache/poi/hpsf/VariantSupport.java index f6da239c8b8..aac14506c71 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/VariantSupport.java +++ b/poi/src/main/java/org/apache/poi/hpsf/VariantSupport.java @@ -231,7 +231,7 @@ public static Object read( LittleEndianByteArrayInputStream lei, * * August 20, 2009 */ - // l1 = LittleEndian.getInt(src, o1); o1 += LittleEndianConts.INT_SIZE; + // l1 = LittleEndian.getInt(src, o1); o1 += LittleEndianConsts.INT_SIZE; // } // final byte[] v = new byte[l1]; // System.arraycopy(src, o1, v, 0, v.length); diff --git a/poi/src/main/java/org/apache/poi/hpsf/VariantTypeException.java b/poi/src/main/java/org/apache/poi/hpsf/VariantTypeException.java index c2d2e8f66f5..12ba9876c4e 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/VariantTypeException.java +++ b/poi/src/main/java/org/apache/poi/hpsf/VariantTypeException.java @@ -19,7 +19,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** *

      This exception is thrown if HPSF encounters a problem with a variant type. - * Concrete subclasses specifiy the problem further.

      + * Concrete subclasses specify the problem further.

      */ public abstract class VariantTypeException extends HPSFException { diff --git a/poi/src/main/java/org/apache/poi/hssf/eventusermodel/MissingRecordAwareHSSFListener.java b/poi/src/main/java/org/apache/poi/hssf/eventusermodel/MissingRecordAwareHSSFListener.java index 48e68262330..da12535cde6 100644 --- a/poi/src/main/java/org/apache/poi/hssf/eventusermodel/MissingRecordAwareHSSFListener.java +++ b/poi/src/main/java/org/apache/poi/hssf/eventusermodel/MissingRecordAwareHSSFListener.java @@ -122,7 +122,7 @@ public void processRecord(org.apache.poi.hssf.record.Record record) { break; case MulRKRecord.sid: // This is multiple consecutive number cells in one record - // Exand this out into multiple regular number cells + // Expand this out into multiple regular number cells MulRKRecord mrk = (MulRKRecord)record; expandedRecords = RecordFactory.convertRKRecords(mrk); break; diff --git a/poi/src/main/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java b/poi/src/main/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java index f9af178a5a7..51a5e435767 100644 --- a/poi/src/main/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java +++ b/poi/src/main/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java @@ -128,7 +128,7 @@ public void setFormulasNotResults(boolean formulasNotResults) { /** - * Retreives the text contents of the file + * Retrieves the text contents of the file */ public String getText() { String text; diff --git a/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java b/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java index 4bba3cea618..184741f7f42 100644 --- a/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java +++ b/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java @@ -800,7 +800,7 @@ public RowRecord getRow(int rownum) { } /** - * creates the CalcMode record and sets it to 1 (automatic formula caculation) + * creates the CalcMode record and sets it to 1 (automatic formula calculation) */ private static CalcModeRecord createCalcMode() { CalcModeRecord retval = new CalcModeRecord(); @@ -885,7 +885,7 @@ private static GridsetRecord createGridset() { } /** - * creates the Guts record and sets leftrow/topcol guttter and rowlevelmax/collevelmax to 0 + * creates the Guts record and sets leftrow/topcol gutter and rowlevelmax/collevelmax to 0 */ private static GutsRecord createGuts() { GutsRecord retval = new GutsRecord(); diff --git a/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java b/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java index 424ab6eda81..53e2a84351f 100644 --- a/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java +++ b/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java @@ -497,7 +497,7 @@ public FontRecord createNewFont() { /** * Removes the given font record from the * file's list. This will make all - * subsequent font indicies drop by one, + * subsequent font indices drop by one, * so you'll need to update those yourself! * * @param rec the font record @@ -840,7 +840,7 @@ public ExtendedFormatRecord getExFormatAt(int index) { /** * Removes the given ExtendedFormatRecord record from the * file's list. This will make all - * subsequent font indicies drop by one, + * subsequent font indices drop by one, * so you'll need to update those yourself! * * @param rec the ExtendedFormatRecord @@ -853,7 +853,7 @@ public void removeExFormatRecord(ExtendedFormatRecord rec) { /** * Removes ExtendedFormatRecord record with given index from the * file's list. This will make all - * subsequent font indicies drop by one, + * subsequent font indices drop by one, * so you'll need to update those yourself! * @param index of the Extended format record (0-based) */ @@ -1735,7 +1735,7 @@ public int createFormat(String formatString) { /** - * Returns the first occurance of a record matching a particular sid. + * Returns the first occurrence of a record matching a particular sid. * * @param sid the sid * @@ -1767,7 +1767,7 @@ public int findFirstRecordLocBySid(short sid) { } /** - * Returns the next occurance of a record matching a particular sid. + * Returns the next occurrence of a record matching a particular sid. * * @param sid the sid * @param pos specifies the n-th matching sid @@ -2041,7 +2041,7 @@ public boolean isWriteProtected() { } /** - * protect a workbook with a password (not encypted, just sets writeprotect + * protect a workbook with a password (not encrypted, just sets writeprotect * flags and the password. * * @param password the password @@ -2080,7 +2080,7 @@ public String resolveNameXText(int refIndex, int definedNameIndex) { * * @param name the name of an external function, typically a name of a UDF * @param sheetRefIndex the sheet ref index, or -1 if not known - * @param udf locator of user-defiend functions to resolve names of VBA and Add-In functions + * @param udf locator of user-defined functions to resolve names of VBA and Add-In functions * @return the external name or null */ public NameXPtg getNameXPtg(String name, int sheetRefIndex, UDFFinder udf) { @@ -2232,7 +2232,7 @@ record = new RecalcIdRecord(); * Changes an external referenced file to another file. * A formular in Excel which refers a cell in another file is saved in two parts: * The referenced file is stored in an reference table. the row/cell information is saved separate. - * This method invokation will only change the reference in the lookup-table itself. + * This method invocation will only change the reference in the lookup-table itself. * @param oldUrl The old URL to search for and which is to be replaced * @param newUrl The URL replacement * @return true if the oldUrl was found and replaced with newUrl. Otherwise false diff --git a/poi/src/main/java/org/apache/poi/hssf/model/LinkTable.java b/poi/src/main/java/org/apache/poi/hssf/model/LinkTable.java index fe5848ca53a..2db67fd4b11 100644 --- a/poi/src/main/java/org/apache/poi/hssf/model/LinkTable.java +++ b/poi/src/main/java/org/apache/poi/hssf/model/LinkTable.java @@ -649,7 +649,7 @@ public NameXPtg addNameXPtg(String name) { int nameIndex = extBlock.addExternalName(extNameRecord); int supLinkIndex = 0; - // find the posistion of the Add-In SupBookRecord in the workbook stream, + // find the position of the Add-In SupBookRecord in the workbook stream, // the created ExternalNameRecord will be appended to it for (org.apache.poi.hssf.record.Record record : _workbookRecordList.getRecords()) { if (record instanceof SupBookRecord && ((SupBookRecord) record).isAddInFunctions()) { @@ -682,7 +682,7 @@ private int findRefIndexFromExtBookIndex(int extBookIndex) { * Changes an external referenced file to another file. * A formular in Excel which refers a cell in another file is saved in two parts: * The referenced file is stored in an reference table. the row/cell information is saved separate. - * This method invokation will only change the reference in the lookup-table itself. + * This method invocation will only change the reference in the lookup-table itself. * * @param oldUrl The old URL to search for and which is to be replaced * @param newUrl The URL replacement diff --git a/poi/src/main/java/org/apache/poi/hssf/package-info.java b/poi/src/main/java/org/apache/poi/hssf/package-info.java index 43f8bcbe65f..a5738a524ca 100644 --- a/poi/src/main/java/org/apache/poi/hssf/package-info.java +++ b/poi/src/main/java/org/apache/poi/hssf/package-info.java @@ -16,7 +16,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more ==================================================================== */ /** - * Horrible SpreadSheet Format API's for reading/writting Excel files using pure Java. + * Horrible SpreadSheet Format API's for reading/writing Excel files using pure Java. * * @see Overview, tutorials, examples, guides, and tool documentation */ diff --git a/poi/src/main/java/org/apache/poi/hssf/record/CFHeader12Record.java b/poi/src/main/java/org/apache/poi/hssf/record/CFHeader12Record.java index 217ed37157d..f6045df894b 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/CFHeader12Record.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/CFHeader12Record.java @@ -28,7 +28,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * Conditional Formatting Header v12 record CFHEADER12 (0x0879), - * for conditional formattings introduced in Excel 2007 and newer. + * for conditional formatting introduced in Excel 2007 and newer. */ public final class CFHeader12Record extends CFHeaderBase implements FutureRecord { public static final short sid = 0x0879; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/CFRule12Record.java b/poi/src/main/java/org/apache/poi/hssf/record/CFRule12Record.java index 4381c52a184..7a0d0c05145 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/CFRule12Record.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/CFRule12Record.java @@ -47,7 +47,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * Conditional Formatting v12 Rule Record (0x087A). * - *

      This is for newer-style Excel conditional formattings, + *

      This is for newer-style Excel conditional formatting, * from Excel 2007 onwards. * *

      {@link CFRuleRecord} is used where the condition type is diff --git a/poi/src/main/java/org/apache/poi/hssf/record/CFRuleBase.java b/poi/src/main/java/org/apache/poi/hssf/record/CFRuleBase.java index 54cfc4de51b..4c9b0384caa 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/CFRuleBase.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/CFRuleBase.java @@ -39,7 +39,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more * Conditional Formatting Rules. This can hold old-style rules * * - *

      This is for the older-style Excel conditional formattings, + *

      This is for the older-style Excel conditional formatting, * new-style (Excel 2007+) also make use of {@link CFRule12Record} * for their rules.

      */ diff --git a/poi/src/main/java/org/apache/poi/hssf/record/CFRuleRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/CFRuleRecord.java index c685da52fa6..42e6c42dc3d 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/CFRuleRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/CFRuleRecord.java @@ -25,7 +25,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * Conditional Formatting Rule Record (0x01B1). * - *

      This is for the older-style Excel conditional formattings, + *

      This is for the older-style Excel conditional formatting, * new-style (Excel 2007+) also make use of {@link CFRule12Record} * for their rules.

      */ diff --git a/poi/src/main/java/org/apache/poi/hssf/record/DimensionsRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/DimensionsRecord.java index b12d0087860..9dec628eb85 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/DimensionsRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/DimensionsRecord.java @@ -28,7 +28,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.util.LittleEndianOutput; /** - * Provides the minumum and maximum bounds of a sheet. + * Provides the minimum and maximum bounds of a sheet. * * @version 2.0-pre */ diff --git a/poi/src/main/java/org/apache/poi/hssf/record/EscherAggregate.java b/poi/src/main/java/org/apache/poi/hssf/record/EscherAggregate.java index 2c71372ee9e..c15cde34bd1 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/EscherAggregate.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/EscherAggregate.java @@ -48,7 +48,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * This class is used to aggregate the MSODRAWING and OBJ record - * combinations. This is necessary due to the bizare way in which + * combinations. This is necessary due to the bizarre way in which * these records are serialized. What happens is that you get a * combination of MSODRAWING -> OBJ -> MSODRAWING -> OBJ records * but the escher records are serialized _across_ the MSODRAWING @@ -84,7 +84,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more *

      * ObjRecord contains information about shape. Thus each ObjRecord corresponds EscherContainerRecord(SPGR) *

      - * EscherAggrefate contains also NoteRecords + * EscherAggregate contains also NoteRecords * NoteRecords must be serial */ @@ -116,7 +116,7 @@ public static int getMaxRecordLength() { /** @deprecated use {@link ShapeType#NOT_PRIMITIVE} */ @Deprecated @Removal(version = "5.3") - public static final short ST_NOT_PRIMATIVE = (short) 0; + public static final short ST_NOT_PRIMITIVE = (short) 0; /** @deprecated use {@link ShapeType#RECT} */ @Deprecated @Removal(version = "5.3") @@ -1104,7 +1104,7 @@ public void afterRecordSerialize(int offset, short recordId, int size, EscherRec spEndingOffsets.add(0, 0); // Split escher records into separate MSODRAWING and OBJ, TXO records. (We don't break on - // the first one because it's the patriach). + // the first one because it's the patriarch). pos = offset; int writtenEscherBytes = 0; boolean isFirst = true; @@ -1244,7 +1244,7 @@ public void associateShapeToObjRecord(EscherRecord r, Record objRecord) { } /** - * Remove echerRecord and associated to it Obj or TextObj record + * Remove escherRecord and associated to it Obj or TextObj record * @param rec - clientData or textbox record to be removed */ public void removeShapeToObjRecord(EscherRecord rec) { @@ -1334,7 +1334,7 @@ public void setDgId(short dgId) { * ---*** * --*** * -EscherDgRecord - * set id for the sp record of the first spContainer in main spgrConatiner + * set id for the sp record of the first spContainer in main spgrContainer * @param shapeId - id which must be set */ public void setMainSpRecordId(int shapeId) { diff --git a/poi/src/main/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java index b5a1d3d94e6..4a25c52e6d2 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java @@ -762,7 +762,7 @@ public void setRightBorderPaletteIdx(short border) } // i've no idea.. possible values are 1 for down, 2 for up and 3 for both...0 for none.. - // maybe a diagnal line? + // maybe a diagonal line? /** * Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none.. @@ -1274,7 +1274,7 @@ public boolean isIndentNotParentBorder() /** * get whether or not to use the pattern in this XF instead of the parent XF. - * (foregrount/background) + * (foreground/background) * * @return pattern- true if this XF has a different pattern value than its parent, * false otherwise. @@ -1474,7 +1474,7 @@ public short getRightBorderPaletteIdx() } // i've no idea.. possible values are 1 for down, 2 for up and 3 for both...0 for none.. - // maybe a diagnal line? + // maybe a diagonal line? /** * Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none.. @@ -1613,7 +1613,7 @@ public short getAdtlFillPattern() // fill palette options /** - * get the fill palette options bitmask (see indivdual bit getters that + * get the fill palette options bitmask (see individual bit getters that * reference this method) * * @return options diff --git a/poi/src/main/java/org/apache/poi/hssf/record/ExternalNameRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/ExternalNameRecord.java index 3b58817cecc..f5bec2e4ca1 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/ExternalNameRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/ExternalNameRecord.java @@ -137,7 +137,7 @@ public boolean isAutomaticLink() { * * @return {@code true} if this is a picture link */ - public boolean isPicureLink() { + public boolean isPictureLink() { return (field_1_option_flag & OPT_PICTURE_LINK) != 0; } /** diff --git a/poi/src/main/java/org/apache/poi/hssf/record/HyperlinkRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/HyperlinkRecord.java index c6acf983363..48f469ef3b6 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/HyperlinkRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/HyperlinkRecord.java @@ -548,7 +548,7 @@ public boolean isFileLink() { /** * Based on the link options, is this a document? * - * @return true, if this is a docment link + * @return true, if this is a document link */ public boolean isDocumentLink() { return (_linkOpts & HLINK_PLACE) > 0; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/NameRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/NameRecord.java index 80d89f1ede4..12887c9d237 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/NameRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/NameRecord.java @@ -352,7 +352,7 @@ public String getDescriptionText(){ } /** get the help topic text - * @return gelp topic text + * @return help topic text */ public String getHelpTopicText(){ return field_16_help_topic_text; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java b/poi/src/main/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java index 46077788b44..9447cfe1273 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java @@ -209,7 +209,7 @@ public RecordFactoryInputStream(InputStream in, boolean shouldIncludeContinueRec * non-zero padding that is read OK by Excel (Excel also fixes the padding). * * So to properly detect the workbook end of stream, this code has to identify the last - * EOF record. This is not so easy because the worbook bof+eof pair do not bracket the + * EOF record. This is not so easy because the workbook bof+eof pair do not bracket the * whole stream. The worksheets follow the workbook, but it is not easy to tell how many * sheet sub-streams should be present. Hence we are looking for an EOF record that is not * immediately followed by a BOF record. One extra complication is that bof+eof sub- @@ -358,7 +358,7 @@ private Record readNextRecord() { // outputs a file like this all the same return record; } - throw new RecordFormatException("Unhandled Continue Record followining " + _lastRecord.getClass()); + throw new RecordFormatException("Unhandled Continue Record following " + _lastRecord.getClass()); } _lastRecord = record; if (record instanceof DrawingRecord) { diff --git a/poi/src/main/java/org/apache/poi/hssf/record/RecordInputStream.java b/poi/src/main/java/org/apache/poi/hssf/record/RecordInputStream.java index caeac85d666..bb8b7df2f76 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/RecordInputStream.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/RecordInputStream.java @@ -86,7 +86,7 @@ private static String getRecordName(int sid) { * is finished. * This field is only really valid during the time that ({@link #_currentDataLength} == * {@link #DATA_LEN_NEEDS_TO_BE_READ}). At most other times its value is not really the - * 'sid of the next record'. Wwhile mid-record, this field coincidentally holds the sid + * 'sid of the next record'. While mid-record, this field coincidentally holds the sid * of the current record. */ private int _nextSid; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/RowRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/RowRecord.java index 2096c37c1b9..5527d1cfc23 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/RowRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/RowRecord.java @@ -234,7 +234,7 @@ public void setBottomBorder(boolean f) { /** * A bit that specifies whether the phonetic guide feature is enabled for * any cell in this row. - * @param f use phoenetic guide + * @param f use phonetic guide */ public void setPhoeneticGuide(boolean f) { field_8_option_flags = phoneticGuide.setBoolean(field_8_option_flags, f); @@ -301,8 +301,8 @@ public short getOutlineLevel() { } /** - * get whether or not to colapse this row - * @return c - colapse or not + * get whether or not to collapse this row + * @return c - collapse or not * @see #getOptionFlags() */ public boolean getColapsed() { @@ -377,7 +377,7 @@ public boolean getBottomBorder() { /** * A bit that specifies whether the phonetic guide feature is enabled for * any cell in this row. - * @return has phoentic guide + * @return has phonetic guide */ public boolean getPhoeneticGuide() { return phoneticGuide.isSet(field_8_option_flags); diff --git a/poi/src/main/java/org/apache/poi/hssf/record/SupBookRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/SupBookRecord.java index bdf88e1cc38..e079c02793c 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/SupBookRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/SupBookRecord.java @@ -48,7 +48,7 @@ public final class SupBookRecord extends StandardRecord { static final char CH_STARTUP_DIR = 6; static final char CH_ALT_STARTUP_DIR = 7; static final char CH_LIB_DIR = 8; - static final String PATH_SEPERATOR = System.getProperty("file.separator"); + static final String PATH_SEPARATOR = System.getProperty("file.separator"); private short field_1_number_of_sheets; private String field_2_encoded_url; @@ -215,10 +215,10 @@ private static String decodeFileName(String encodedUrl) { break; case CH_SAME_VOLUME: case CH_DOWN_DIR: - sb.append(PATH_SEPERATOR); + sb.append(PATH_SEPARATOR); break; case CH_UP_DIR: - sb.append("..").append(PATH_SEPERATOR); + sb.append("..").append(PATH_SEPARATOR); break; case CH_LONG_VOLUME: //Don't known to handle... @@ -228,7 +228,7 @@ private static String decodeFileName(String encodedUrl) { case CH_ALT_STARTUP_DIR: case CH_LIB_DIR: LOG.atWarn().log("EXCEL.EXE path unknown - using this directory instead: ."); - sb.append('.').append(PATH_SEPERATOR); + sb.append('.').append(PATH_SEPARATOR); break; default: sb.append(c); diff --git a/poi/src/main/java/org/apache/poi/hssf/record/TextObjectRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/TextObjectRecord.java index c399bd64f97..b3faef3775b 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/TextObjectRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/TextObjectRecord.java @@ -71,7 +71,7 @@ public final class TextObjectRecord extends ContinuableRecord { /* * Note - the next three fields are very similar to those on - * EmbededObjectRefSubRecord(ftPictFmla 0x0009) + * EmbeddedObjectRefSubRecord(ftPictFmla 0x0009) * * some observed values for the 4 bytes preceding the formula: C0 5E 86 03 * C0 11 AC 02 80 F1 8A 03 D4 F0 8A 03 @@ -254,7 +254,7 @@ public int getHorizontalTextAlignment() { /** * Sets the Vertical text alignment field value. * - * @param value The vertical alignment, use one of the VERTIUCAL_TEST_ALIGNMENT_... constants in this class + * @param value The vertical alignment, use one of the VERTICAL_TEST_ALIGNMENT_... constants in this class */ public void setVerticalTextAlignment(int value) { field_1_options = VerticalTextAlignment.setValue(field_1_options, value); diff --git a/poi/src/main/java/org/apache/poi/hssf/record/TopMarginRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/TopMarginRecord.java index 05aaab3f8e5..3fa2dc4f6ef 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/TopMarginRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/TopMarginRecord.java @@ -79,6 +79,6 @@ public HSSFRecordTypes getGenericRecordType() { @Override public Map> getGenericProperties() { - return GenericRecordUtil.getGenericProperties("magin", this::getMargin); + return GenericRecordUtil.getGenericProperties("margin", this::getMargin); } } \ No newline at end of file diff --git a/poi/src/main/java/org/apache/poi/hssf/record/WSBoolRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/WSBoolRecord.java index 0bdee8b9943..5931fb5975c 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/WSBoolRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/WSBoolRecord.java @@ -81,7 +81,7 @@ public WSBoolRecord(RecordInputStream in) { // why? Why ask why? But don't drink bud dry as its a really // crappy beer, try the czech "Budvar" beer (which is the real - // budweiser though its ironically good...its sold in the USs + // budweiser though its ironically good...its sold in the US // as czechvar --- odd that they had the name first but can't // use it)... diff --git a/poi/src/main/java/org/apache/poi/hssf/record/WindowOneRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/WindowOneRecord.java index 56520207570..52c83c9c11a 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/WindowOneRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/WindowOneRecord.java @@ -121,7 +121,7 @@ public void setWidth(short w) } /** - * set teh height of the window + * set the height of the window * @param h height */ diff --git a/poi/src/main/java/org/apache/poi/hssf/record/WindowTwoRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/WindowTwoRecord.java index 7548361afc8..c894a0691c6 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/WindowTwoRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/WindowTwoRecord.java @@ -164,7 +164,7 @@ public void setArabic(boolean isarabic) } /** - * set whether the outline symbols are displaed + * set whether the outline symbols are displayed * @param guts symbols or not */ public void setDisplayGuts(boolean guts) @@ -342,7 +342,7 @@ public boolean getArabic() } /** - * get whether the outline symbols are displaed + * get whether the outline symbols are displayed * @return symbols or not */ public boolean getDisplayGuts() @@ -415,7 +415,7 @@ public int getHeaderColor() } /** - * zoom magification in page break view + * zoom magnification in page break view * @return zoom */ public short getPageBreakZoom() diff --git a/poi/src/main/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java b/poi/src/main/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java index bbfe3538730..01c19465090 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java @@ -53,7 +53,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more */ public final class CFRecordsAggregate extends RecordAggregate implements GenericRecord { /** Excel 97-2003 allows up to 3 conditional formating rules */ - private static final int MAX_97_2003_CONDTIONAL_FORMAT_RULES = 3; + private static final int MAX_97_2003_CONDITIONAL_FORMAT_RULES = 3; private static final Logger LOG = LogManager.getLogger(CFRecordsAggregate.class); private final CFHeaderBase header; @@ -73,9 +73,9 @@ private CFRecordsAggregate(CFHeaderBase pHeader, CFRuleBase[] pRules) { if(pRules == null) { throw new IllegalArgumentException("rules must not be null"); } - if(pRules.length > MAX_97_2003_CONDTIONAL_FORMAT_RULES) { + if(pRules.length > MAX_97_2003_CONDITIONAL_FORMAT_RULES) { LOG.atWarn().log("Excel versions before 2007 require that No more than " + - MAX_97_2003_CONDTIONAL_FORMAT_RULES + " rules may be specified, {} were found, this file will " + + MAX_97_2003_CONDITIONAL_FORMAT_RULES + " rules may be specified, {} were found, this file will " + "cause problems with old Excel versions", box(pRules.length)); } if (pRules.length != pHeader.getNumberOfConditionalFormats()) { @@ -185,9 +185,9 @@ public void addRule(CFRuleBase r) { if (r == null) { throw new IllegalArgumentException("r must not be null"); } - if(rules.size() >= MAX_97_2003_CONDTIONAL_FORMAT_RULES) { + if(rules.size() >= MAX_97_2003_CONDITIONAL_FORMAT_RULES) { LOG.atWarn().log("Excel versions before 2007 cannot cope with" - + " any more than " + MAX_97_2003_CONDTIONAL_FORMAT_RULES + + " any more than " + MAX_97_2003_CONDITIONAL_FORMAT_RULES + " - this file will cause problems with old Excel versions"); } checkRuleType(r); diff --git a/poi/src/main/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java b/poi/src/main/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java index 38a4c25cd98..1ecd0ea64ba 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java @@ -27,7 +27,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * Holds all the conditional formatting for a workbook sheet.

      * - * See OOO exelfileformat.pdf sec 4.12 'Conditional Formatting Table' + * See OOO excelfileformat.pdf sec 4.12 'Conditional Formatting Table' */ public final class ConditionalFormattingTable extends RecordAggregate { private final List _cfHeaders = new ArrayList<>(); diff --git a/poi/src/main/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java b/poi/src/main/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java index 2f6a8bd2e58..1bdab86f304 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java @@ -180,7 +180,7 @@ public int getLastRowNum() } /** Returns the number of row blocks. - *

      The row blocks are goupings of rows that contain the DBCell record + *

      The row blocks are groupings of rows that contain the DBCell record * after them */ public int getRowBlockCount() { diff --git a/poi/src/main/java/org/apache/poi/hssf/record/cf/FontFormatting.java b/poi/src/main/java/org/apache/poi/hssf/record/cf/FontFormatting.java index b8adbcb86fd..d87336d6e53 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/cf/FontFormatting.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/cf/FontFormatting.java @@ -78,7 +78,7 @@ public final class FontFormatting implements Duplicatable, GenericRecord { public FontFormatting() { setFontHeight(-1); setItalic(false); - setFontWieghtModified(false); + setFontWeightModified(false); setOutline(false); setShadow(false); setStrikeout(false); @@ -386,7 +386,7 @@ public boolean isUnderlineTypeModified() { return underlineModified == 0; } - public void setFontWieghtModified(boolean modified) { + public void setFontWeightModified(boolean modified) { int value = modified? 0 : 1; setInt(OFFSET_FONT_WEIGHT_MODIFIED, value); } diff --git a/poi/src/main/java/org/apache/poi/hssf/record/chart/AxisOptionsRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/chart/AxisOptionsRecord.java index 3236ff04df1..98872d2a3d3 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/chart/AxisOptionsRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/chart/AxisOptionsRecord.java @@ -383,7 +383,7 @@ public boolean isDefaultCross() /** * Sets the default date settings field value. - * use default date setttings for this axis + * use default date settings for this axis */ public void setDefaultDateSettings(boolean value) { @@ -391,7 +391,7 @@ public void setDefaultDateSettings(boolean value) } /** - * use default date setttings for this axis + * use default date settings for this axis * @return the default date settings field value. */ public boolean isDefaultDateSettings() diff --git a/poi/src/main/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java index e35d2301af0..10fb07119e8 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java @@ -26,7 +26,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.util.LittleEndianOutput; /** - * preceeds and identifies a frame as belonging to the plot area. + * precedes and identifies a frame as belonging to the plot area. */ public final class PlotAreaRecord extends StandardRecord { public static final short sid = 0x1035; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/chart/TextRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/chart/TextRecord.java index 7c3c8666aaf..c3ffa710159 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/chart/TextRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/chart/TextRecord.java @@ -389,7 +389,7 @@ public void setTextRotation(short field_12_textRotation) /** * Sets the auto color field value. - * true = automaticly selected colour, false = user-selected + * true = automatically selected colour, false = user-selected */ public void setAutoColor(boolean value) { @@ -397,7 +397,7 @@ public void setAutoColor(boolean value) } /** - * true = automaticly selected colour, false = user-selected + * true = automatically selected colour, false = user-selected * @return the auto color field value. */ public boolean isAutoColor() diff --git a/poi/src/main/java/org/apache/poi/hssf/record/common/UnicodeString.java b/poi/src/main/java/org/apache/poi/hssf/record/common/UnicodeString.java index e681492ef4c..ae9c04990b9 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/common/UnicodeString.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/common/UnicodeString.java @@ -296,7 +296,7 @@ private int findFormatRunAt(int characterPos) { /** Adds a font run to the formatted string. * - * If a font run exists at the current charcter location, then it is + * If a font run exists at the current character location, then it is * replaced with the font run to be added. */ public void addFormatRun(FormatRun r) { diff --git a/poi/src/main/java/org/apache/poi/hssf/record/package-info.java b/poi/src/main/java/org/apache/poi/hssf/record/package-info.java index 9d47affa70f..b4a74fc73da 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/package-info.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/package-info.java @@ -16,7 +16,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more ==================================================================== */ /** - * Record package contains class representations for XLS binary strutures. Its very low level. + * Record package contains class representations for XLS binary structures. Its very low level. * * @see org.apache.poi.hssf.eventmodel * @see org.apache.poi.hssf.record.RecordFactory diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java index 6fdfdbf9e6d..7935ad5d8ea 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java @@ -60,7 +60,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more * you issue commands such as drawString(). A good way to calculate this * is to use the follow formula: *

      {@code
      - *      multipler = groupHeightInPoints / heightOfGroup
      + *      multiplier = groupHeightInPoints / heightOfGroup
        * }
      *

      * The height of the group is calculated fairly simply by calculating the diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCell.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCell.java index 76eadaabe48..c69f33b2f41 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCell.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCell.java @@ -1224,7 +1224,7 @@ public boolean isPartOfArrayFormulaGroup() { * Applying a user-defined style (UDS) is special. Excel does not directly reference user-defined styles, but * instead create a 'proxy' ExtendedFormatRecord referencing the UDS as parent. * - * The proceudre to apply a UDS is as follows: + * The procedure to apply a UDS is as follows: * * 1. search for a ExtendedFormatRecord with parentIndex == style.getIndex() * and xfType == ExtendedFormatRecord.XF_CELL. diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java index 0983c454970..a28bae46dd4 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java @@ -608,7 +608,7 @@ private void checkDefaultBackgroundFills() { setFillBackgroundColor((short)(autoIdx+1)); } } else if (_format.getFillBackground() == autoIdx+1) { - //Now if the forground changes to a non-AUTOMATIC color the background resets itself!!! + //Now if the foreground changes to a non-AUTOMATIC color the background resets itself!!! if (_format.getFillForeground() != autoIdx) { setFillBackgroundColor(autoIdx); } @@ -830,7 +830,7 @@ public void setReadingOrder(short order) { */ public void verifyBelongsToWorkbook(HSSFWorkbook wb) { if(wb.getWorkbook() != _workbook) { - throw new IllegalArgumentException("This Style does not belong to the supplied Workbook. Are you trying to assign a style from one workbook to the cell of a differnt workbook?"); + throw new IllegalArgumentException("This Style does not belong to the supplied Workbook. Are you trying to assign a style from one workbook to the cell of a different workbook?"); } } diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java index a9ffbea4960..74e31afdf50 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java @@ -24,7 +24,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * A client anchor is attached to an excel worksheet. It anchors against a - * top-left and buttom-right cell. + * top-left and bottom-right cell. */ public final class HSSFClientAnchor extends HSSFAnchor implements ClientAnchor { diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFFontFormatting.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFFontFormatting.java index 735d921cc34..59c4f4df2e5 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFFontFormatting.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFFontFormatting.java @@ -230,7 +230,7 @@ public void setFontStyle(boolean italic, boolean bold) fontFormatting.setItalic(italic); fontFormatting.setBold(bold); fontFormatting.setFontStyleModified(modified); - fontFormatting.setFontWieghtModified(modified); + fontFormatting.setFontWeightModified(modified); } /** diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java index 865ffc5d19f..51c9c1c7956 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java @@ -166,7 +166,7 @@ public static void optimiseFonts(HSSFWorkbook workbook) { } /** - * Goes through the Wokrbook, optimising the cell styles + * Goes through the Workbook, optimising the cell styles * by removing duplicate ones, and ones that aren't used. * For best results, optimise the fonts via a call to * {@link #optimiseFonts(HSSFWorkbook)} first. diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPalette.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPalette.java index 4089ebcd8a1..84921499d20 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPalette.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPalette.java @@ -89,7 +89,7 @@ public HSSFColor findColor(byte red, byte green, byte blue) /** * Finds the closest matching color in the custom palette. The * method for finding the distance between the colors is fairly - * primative. + * primitive. * * @param red The red component of the color to match. * @param green The green component of the color to match. @@ -103,7 +103,7 @@ public HSSFColor findSimilarColor(byte red, byte green, byte blue) { /** * Finds the closest matching color in the custom palette. The * method for finding the distance between the colors is fairly - * primative. + * primitive. * * @param red The red component of the color to match. * @param green The green component of the color to match. @@ -159,7 +159,7 @@ public void setColorAtIndex(short index, byte red, byte green, byte blue) * * @return The new custom color. * - * @throws IllegalStateException if there are more more free color indexes. + * @throws IllegalStateException if there are more free color indexes. */ public HSSFColor addColor( byte red, byte green, byte blue ) { diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java index 716e215bbc2..a993c852cca 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java @@ -545,8 +545,8 @@ void buildShapeTree() { if (dgContainer == null) { return; } - EscherContainerRecord spgrConrainer = dgContainer.getChildContainers().get(0); - List spgrChildren = spgrConrainer.getChildContainers(); + EscherContainerRecord spgrContainer = dgContainer.getChildContainers().get(0); + List spgrChildren = spgrContainer.getChildContainers(); for (int i = 0; i < spgrChildren.size(); i++) { EscherContainerRecord spContainer = spgrChildren.get(i); diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPicture.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPicture.java index ccc8eef44e7..d232c9bd2cd 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPicture.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPicture.java @@ -91,7 +91,7 @@ protected EscherContainerRecord createSpContainer() { *

      * Please note, that this method works correctly only for workbooks * with default font size (Arial 10pt for .xls). - * If the default font is changed the resized image can be streched vertically or horizontally. + * If the default font is changed the resized image can be stretched vertically or horizontally. *

      */ @Override @@ -114,7 +114,7 @@ public void resize(double scale) { *

      * Please note, that this method works correctly only for workbooks * with default font size (Arial 10pt for .xls). - * If the default font is changed the resized image can be streched vertically or horizontally. + * If the default font is changed the resized image can be stretched vertically or horizontally. *

      *

      * resize(1.0,1.0) keeps the original size,
      diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java index e208fb3acbd..b81aeecbac5 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java @@ -27,7 +27,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.ss.usermodel.RichTextString; /** * Rich text unicode string. These strings can have fonts applied to - * arbitary parts of the string. + * arbitrary parts of the string. * *

      * Note, that in certain cases creating too many HSSFRichTextString cells may cause Excel 2003 and lower to crash diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java index a64840eed2d..c0b7188409d 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java @@ -688,11 +688,11 @@ private void findNext() { * equal to the row number of the argument HSSFRow * *

    • - * a value less than 0 if the row number of this this HSSFRow is + * a value less than 0 if the row number of this HSSFRow is * numerically less than the row number of the argument HSSFRow *
    • *
    • - * a value greater than 0 if the row number of this this HSSFRow is + * a value greater than 0 if the row number of this HSSFRow is * numerically greater than the row number of the argument HSSFRow *
    • *
    diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java index ab7df1d733f..0d75f2357af 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java @@ -328,7 +328,7 @@ public int getY2() { } /** - * Count of all children and their childrens children. + * Count of all children and their children's children. */ @Override public int countOfAllChildren() { diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFShapeTypes.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFShapeTypes.java index d72b4003d1b..b87902bbddb 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFShapeTypes.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFShapeTypes.java @@ -23,7 +23,7 @@ public interface HSSFShapeTypes { public static final int RoundRectangle = 2; public static final int Ellipse = 3; public static final int Diamond = 4; - public static final int IsocelesTriangle = 5; + public static final int IsoscelesTriangle = 5; public static final int RightTriangle = 6; public static final int Parallelogram = 7; public static final int Trapezoid = 8; diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java index f50e18edb90..ea95848fd06 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java @@ -143,7 +143,7 @@ protected HSSFSheet(HSSFWorkbook workbook) { /** * Creates an HSSFSheet representing the given Sheet object. Should only be - * called by HSSFWorkbook when reading in an exisiting file. + * called by HSSFWorkbook when reading in an existing file. * * @param workbook - The HSSF Workbook object associated with the sheet. * @param sheet - lowlevel Sheet object this sheet will represent @@ -512,7 +512,7 @@ public boolean isColumnHidden(int columnIndex) { * using the default font (first font in the workbook).

    * * Unless you are using a very special font, the default character is '0' (zero), - * this is true for Arial (default font font in HSSF) and Calibri (default font in XSSF)

    + * this is true for Arial (default font in HSSF) and Calibri (default font in XSSF)

    * * Please note, that the width set by this method includes 4 pixels of margin padding (two on each side), * plus 1 pixel padding for the gridlines (Section 3.3.1.12 of the OOXML spec). @@ -820,9 +820,9 @@ private void checkForIntersectingMergedRegions() { * recommended solution, but this may be used for certain cases where * evaluation in POI is not possible.

    * - * It is recommended to force recalcuation of formulas on workbook level using + * It is recommended to force recalculation of formulas on workbook level using * {@link Workbook#setForceFormulaRecalculation(boolean)} - * to ensure that all cross-worksheet formuals and external dependencies are updated. + * to ensure that all cross-worksheet formulas and external dependencies are updated. * * @param value true if the application will perform a full recalculation of * this worksheet values when the workbook is opened @@ -1076,7 +1076,7 @@ public void setRowSumsBelow(boolean b) { (WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid); record.setRowSumsBelow(b); - //setAlternateExpression must be set in conjuction with setRowSumsBelow + //setAlternateExpression must be set in conjunction with setRowSumsBelow record.setAlternateExpression(b); } @@ -1995,7 +1995,7 @@ public boolean isDisplayRowColHeadings() { * Breaks occur above the specified row and left of the specified column inclusive.

    * * For example, sheet.setColumnBreak(2); breaks the sheet into two parts - * with columns A,B,C in the first and D,E,... in the second. Simuilar, sheet.setRowBreak(2); + * with columns A,B,C in the first and D,E,... in the second. Similar, sheet.setRowBreak(2); * breaks the sheet into two parts with first three rows (rownum=1...3) in the first part * and rows starting with rownum=4 in the second. * @@ -2047,7 +2047,7 @@ public int[] getColumnBreaks() { * Breaks occur above the specified row and left of the specified column inclusive.

    * * For example, sheet.setColumnBreak(2); breaks the sheet into two parts - * with columns A,B,C in the first and D,E,... in the second. Simuilar, {@code sheet.setRowBreak(2);} + * with columns A,B,C in the first and D,E,... in the second. Similar, {@code sheet.setRowBreak(2);} * breaks the sheet into two parts with first three rows (rownum=1...3) in the first part * and rows starting with rownum=4 in the second. * @@ -2088,7 +2088,7 @@ public void removeColumnBreak(int column) { protected void validateRow(int row) { int maxrow = SpreadsheetVersion.EXCEL97.getLastRowIndex(); if (row > maxrow) throw new IllegalArgumentException("Maximum row number is " + maxrow); - if (row < 0) throw new IllegalArgumentException("Minumum row number is 0"); + if (row < 0) throw new IllegalArgumentException("Minimum row number is 0"); } /** @@ -2122,7 +2122,7 @@ public void dumpDrawingRecords(boolean fat, PrintWriter pw) { } /** - * Returns the agregate escher records for this sheet, + * Returns the aggregate escher records for this sheet, * it there is one. */ public EscherAggregate getDrawingEscherAggregate() { diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java index b303d3d7dac..6c4c84b56e2 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java @@ -2168,7 +2168,7 @@ public boolean isWriteProtected() { } /** - * protect a workbook with a password (not encypted, just sets writeprotect + * protect a workbook with a password (not encrypted, just sets writeprotect * flags and the password. * * @param password to set @@ -2309,7 +2309,7 @@ public InternalWorkbook getInternalWorkbook() { } /** - * Returns the spreadsheet version (EXCLE97) of this workbook + * Returns the spreadsheet version (EXCEL97) of this workbook * * @return EXCEL97 SpreadsheetVersion enum * @since 3.14 beta 2 diff --git a/poi/src/main/java/org/apache/poi/hssf/util/HSSFColor.java b/poi/src/main/java/org/apache/poi/hssf/util/HSSFColor.java index 263a7c0da95..4bdc9174e97 100644 --- a/poi/src/main/java/org/apache/poi/hssf/util/HSSFColor.java +++ b/poi/src/main/java/org/apache/poi/hssf/util/HSSFColor.java @@ -203,7 +203,7 @@ private static Map createColorsByIndexMap() { } /** - * this function returns all colors in a hastable. It's not implemented as a + * this function returns all colors in a hashtable. It's not implemented as a * static member/statically initialized because that would be dirty in a * server environment as it is intended. This means you'll eat the time * it takes to create it once per request but you will not hold onto it diff --git a/poi/src/main/java/org/apache/poi/hssf/util/package-info.java b/poi/src/main/java/org/apache/poi/hssf/util/package-info.java index 4ac9c8f6f61..52c8fb77a75 100644 --- a/poi/src/main/java/org/apache/poi/hssf/util/package-info.java +++ b/poi/src/main/java/org/apache/poi/hssf/util/package-info.java @@ -16,6 +16,6 @@ Licensed to the Apache Software Foundation (ASF) under one or more ==================================================================== */ /** - * The util package contains tools needed for writing HSSF files that are not necesarily "real" HSSF concepts. + * The util package contains tools needed for writing HSSF files that are not necessarily "real" HSSF concepts. */ package org.apache.poi.hssf.util; diff --git a/poi/src/main/java/org/apache/poi/poifs/crypt/CryptoFunctions.java b/poi/src/main/java/org/apache/poi/poifs/crypt/CryptoFunctions.java index 587d72eca6c..a0d82738d41 100644 --- a/poi/src/main/java/org/apache/poi/poifs/crypt/CryptoFunctions.java +++ b/poi/src/main/java/org/apache/poi/poifs/crypt/CryptoFunctions.java @@ -111,8 +111,8 @@ public static byte[] hashPassword(String password, HashAlgorithm hashAlgorithm, * The difference is, read protection uses the order iterator then hash in the hash loop, whereas write protection * uses first the last hash value and then the current iterator value * - * @param password the pasword - * @param hashAlgorithm the hash algorighm + * @param password the password + * @param hashAlgorithm the hash algorithm * @param salt the initial salt value * @param spinCount the repetition count * @param iteratorFirst if true, the iterator is hashed before the n-1 hash value, @@ -598,7 +598,7 @@ private static short rotateLeftBase15Bit(short verifier) { */ short intermediate1 = (short)(((verifier & 0x4000) == 0) ? 0 : 1); /* - * SET Intermediate2 TO Verifier MULTIPLED BY 2 + * SET Intermediate2 TO Verifier MULTIPLIED BY 2 * SET most significant bit of Intermediate2 TO 0 */ short intermediate2 = (short)((verifier<<1) & 0x7FFF); diff --git a/poi/src/main/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java b/poi/src/main/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java index a6881bc5bc5..47473fe7d96 100644 --- a/poi/src/main/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java +++ b/poi/src/main/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java @@ -99,10 +99,10 @@ public boolean verifyPassword(String password) throws GeneralSecurityException { * blockSize bytes. * 4. Use base64 to encode the result of step 3. */ - byte[] verfierInputEnc = hashInput(ver, pwHash, kVerifierInputBlock, ver.getEncryptedVerifier(), Cipher.DECRYPT_MODE); - setVerifier(verfierInputEnc); + byte[] verifierInputEnc = hashInput(ver, pwHash, kVerifierInputBlock, ver.getEncryptedVerifier(), Cipher.DECRYPT_MODE); + setVerifier(verifierInputEnc); MessageDigest hashMD = getMessageDigest(ver.getHashAlgorithm()); - byte[] verifierHash = hashMD.digest(verfierInputEnc); + byte[] verifierHash = hashMD.digest(verifierInputEnc); /* * encryptedVerifierHashValue: This attribute MUST be generated by using the following steps: diff --git a/poi/src/main/java/org/apache/poi/poifs/crypt/package-info.java b/poi/src/main/java/org/apache/poi/poifs/crypt/package-info.java index e0ded046727..bb2640783b5 100644 --- a/poi/src/main/java/org/apache/poi/poifs/crypt/package-info.java +++ b/poi/src/main/java/org/apache/poi/poifs/crypt/package-info.java @@ -16,7 +16,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more ==================================================================== */ /** - * Implementation of the ECMA-376 and MS-propritary document encryptions

    + * Implementation of the ECMA-376 and MS-proprietary document encryptions

    * * The implementation is split into the following packages: * diff --git a/poi/src/main/java/org/apache/poi/poifs/eventfilesystem/POIFSReaderRegistry.java b/poi/src/main/java/org/apache/poi/poifs/eventfilesystem/POIFSReaderRegistry.java index 3b2af081be1..11d9dd6b1f1 100644 --- a/poi/src/main/java/org/apache/poi/poifs/eventfilesystem/POIFSReaderRegistry.java +++ b/poi/src/main/java/org/apache/poi/poifs/eventfilesystem/POIFSReaderRegistry.java @@ -36,7 +36,7 @@ class POIFSReaderRegistry private Set omnivorousListeners; // Each mapping in this Map has a key consisting of a - // POIFSReaderListener and a value cosisting of a Set of + // POIFSReaderListener and a value consisting of a Set of // DocumentDescriptors for the documents that POIFSReaderListener // is interested in; used to efficiently manage the registry private Map> selectiveListeners; diff --git a/poi/src/main/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java b/poi/src/main/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java index a4e76fab89e..fb502ead8bb 100644 --- a/poi/src/main/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java +++ b/poi/src/main/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java @@ -258,7 +258,7 @@ private boolean atEOD() { return _current_offset == _document_size; } - private void checkAvaliable(int requestedSize) { + private void checkAvailable(int requestedSize) { if (_closed) { throw new IllegalStateException("cannot perform requested operation on a closed stream"); } @@ -279,7 +279,7 @@ public void readFully(byte[] buf, int off, int len) { throw new IllegalArgumentException("Can't read negative number of bytes, but had: " + len); } - checkAvaliable(len); + checkAvailable(len); int read = 0; while(read < len) { @@ -313,7 +313,7 @@ public double readDouble() { @Override public long readLong() { - checkAvaliable(LONG_SIZE); + checkAvailable(LONG_SIZE); byte[] data = new byte[LONG_SIZE]; readFully(data, 0, LONG_SIZE); return LittleEndian.getLong(data, 0); @@ -321,7 +321,7 @@ public long readLong() { @Override public short readShort() { - checkAvaliable(SHORT_SIZE); + checkAvailable(SHORT_SIZE); byte[] data = new byte[SHORT_SIZE]; readFully(data, 0, SHORT_SIZE); return LittleEndian.getShort(data); @@ -329,7 +329,7 @@ public short readShort() { @Override public int readInt() { - checkAvaliable(INT_SIZE); + checkAvailable(INT_SIZE); byte[] data = new byte[INT_SIZE]; readFully(data, 0, INT_SIZE); return LittleEndian.getInt(data); @@ -342,7 +342,7 @@ public long readUInt() { @Override public int readUShort() { - checkAvaliable(SHORT_SIZE); + checkAvailable(SHORT_SIZE); byte[] data = new byte[SHORT_SIZE]; readFully(data, 0, SHORT_SIZE); return LittleEndian.getUShort(data); @@ -350,7 +350,7 @@ public int readUShort() { @Override public int readUByte() { - checkAvaliable(1); + checkAvailable(1); byte[] data = new byte[1]; readFully(data, 0, 1); if (data[0] >= 0) diff --git a/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java b/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java index f70edb9044b..e05cf0551a0 100644 --- a/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java +++ b/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java @@ -288,7 +288,7 @@ private POIFSFileSystem(FileChannel channel, File srcFile, boolean readOnly, boo *

    * Some streams are usable after reaching EOF (typically those that return {@code true} * for {@code markSupported()}). In the unlikely case that the caller has such a stream - * and needs to use it after this constructor completes, a work around is to wrap the + * and needs to use it after this constructor completes, a workaround is to wrap the * stream in order to trap the {@code close()} call. A convenience method ( * {@code createNonClosingInputStream()}) has been provided for this purpose: *

    @@ -639,7 +639,7 @@ POIFSMiniStore getMiniStore() {
         }
     
         /**
    -     * add a new POIFSDocument to the FileSytem
    +     * add a new POIFSDocument to the FileSystem
          *
          * @param document the POIFSDocument being added
          */
    diff --git a/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java b/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java
    index bfa87966346..a21194cae9c 100644
    --- a/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java
    +++ b/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java
    @@ -152,7 +152,7 @@ else if (name2.compareTo(VBA_PROJECT) == 0)
                   {
                     if (name1.startsWith("__") && name2.startsWith("__"))
                     {
    -                  // Betweeen __SRP_0 and __SRP_1 just sort as normal
    +                  // Between __SRP_0 and __SRP_1 just sort as normal
                       result = name1.compareToIgnoreCase(name2);
                     }
                     else if (name1.startsWith("__"))
    diff --git a/poi/src/main/java/org/apache/poi/sl/draw/DrawFontManager.java b/poi/src/main/java/org/apache/poi/sl/draw/DrawFontManager.java
    index 136f2bdbc25..ddf930da6d1 100644
    --- a/poi/src/main/java/org/apache/poi/sl/draw/DrawFontManager.java
    +++ b/poi/src/main/java/org/apache/poi/sl/draw/DrawFontManager.java
    @@ -58,7 +58,7 @@ public interface DrawFontManager {
          * 

    * Currently this only maps for wingdings and symbol font (into unicode private use area) *

    - * Depending if the requested font is installed in the system, tbe mapped string varies:
    + * Depending if the requested font is installed in the system, the mapped string varies:
    * If the font is registered into the graphics environment the characters are mapped to the * private use area. If the font is missing (and hence a AWT logical font is used), the * characters are mapped to the corresponding unicode characters diff --git a/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java b/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java index aa2a27fb0ad..ffff09db2f4 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java @@ -264,7 +264,7 @@ protected Paint getTexturePaint(TexturePaint fill, Graphics2D graphics) { ImageRenderer renderer = DrawPictureShape.getImageRenderer(graphics, contentType); - // TODO: handle tile settings, currently the pattern is always streched 100% in height/width + // TODO: handle tile settings, currently the pattern is always stretched 100% in height/width Rectangle2D textAnchor = shape.getAnchor(); try (InputStream is = fill.getImageData()) { diff --git a/poi/src/main/java/org/apache/poi/sl/draw/DrawShape.java b/poi/src/main/java/org/apache/poi/sl/draw/DrawShape.java index e1ab3bf176b..2af95084ffe 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/DrawShape.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/DrawShape.java @@ -137,7 +137,7 @@ public static Rectangle2D getAnchor(Graphics2D graphics, PlaceableShape sha if (quadrant == 1 || quadrant == 3) { // In a rotated quadrant 1 (=45-135 degrees) and 3 (=225-315 degrees), which is basically a shape in a // more or less portrait orientation, Powerpoint doesn't use the normal shape anchor, - // but rotate it 90 degress and apply the group transformations. + // but rotate it 90 degrees and apply the group transformations. // We try to revert that distortion and return the normalized anchor. // It's strange that you'll need to rotate the shape back and forth again, but you can // think of it, as if you paint the shape on a canvas. First you rotate the canvas, which might diff --git a/poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java b/poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java index e0e3bfe7d5c..73839e040d8 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java @@ -55,14 +55,14 @@ public void draw(Graphics2D graphics){ try { graphics.drawString(str.getIterator(), (float) x, (float) yBaseline); } catch (ClassCastException e) { - // workaround: batik issue, which expects only Color as forground color - replaceForgroundPaintWithBlack(str); + // workaround: batik issue, which expects only Color as foreground color + replaceForegroundPaintWithBlack(str); graphics.drawString(str.getIterator(), (float) x, (float) yBaseline); } } } - private void replaceForgroundPaintWithBlack(AttributedString as) { + private void replaceForegroundPaintWithBlack(AttributedString as) { AttributedCharacterIterator iter = as.getIterator(new TextAttribute[]{TextAttribute.FOREGROUND}); for (char ch = iter.first(); ch != CharacterIterator.DONE; diff --git a/poi/src/main/java/org/apache/poi/sl/draw/ImageRenderer.java b/poi/src/main/java/org/apache/poi/sl/draw/ImageRenderer.java index 7c6e0762d83..163c236dcea 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/ImageRenderer.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/ImageRenderer.java @@ -37,7 +37,7 @@ * *

      * 
    - * public class MyImageRendener implements ImageRendener {
    + * public class MyImageRenderer implements ImageRenderer {
      *     InputStream data;
      *
      *     public boolean drawImage(Graphics2D graphics,Rectangle2D anchor,Insets clip) {
    @@ -75,7 +75,7 @@
      *
      * 
      * 
    - * graphics.setRenderingHint(Drawable.IMAGE_RENDERER, new MyImageRendener());
    + * graphics.setRenderingHint(Drawable.IMAGE_RENDERER, new MyImageRenderer());
      * 
      * 
    */ diff --git a/poi/src/main/java/org/apache/poi/sl/draw/PathGradientPaint.java b/poi/src/main/java/org/apache/poi/sl/draw/PathGradientPaint.java index 40c802ccaca..0dbffea34e0 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/PathGradientPaint.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/PathGradientPaint.java @@ -109,7 +109,7 @@ public class PathGradientContext implements PaintContext { ) { shape = (Shape)hints.get(Drawable.GRADIENT_SHAPE); if (shape == null) { - throw new IllegalPathStateException("PathGradientPaint needs a shape to be set via the rendering hint Drawable.GRADIANT_SHAPE."); + throw new IllegalPathStateException("PathGradientPaint needs a shape to be set via the rendering hint Drawable.GRADIENT_SHAPE."); } this.deviceBounds = deviceBounds; diff --git a/poi/src/main/java/org/apache/poi/sl/draw/SLGraphics.java b/poi/src/main/java/org/apache/poi/sl/draw/SLGraphics.java index a570b9f892c..180c17669b2 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/SLGraphics.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/SLGraphics.java @@ -1516,7 +1516,7 @@ public void drawString(AttributedCharacterIterator iterator, float x, float y) { * @param s the Shape to check for a hit * @param onStroke flag used to choose between testing the * stroked or the filled shape. If the flag is true, the - * Stroke oultine is tested. If the flag is + * Stroke outline is tested. If the flag is * false, the filled Shape is tested. * @return true if there is a hit; false * otherwise. diff --git a/poi/src/main/java/org/apache/poi/sl/draw/geom/ArcToCommand.java b/poi/src/main/java/org/apache/poi/sl/draw/geom/ArcToCommand.java index 33e3c304a7f..e084a42263c 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/geom/ArcToCommand.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/geom/ArcToCommand.java @@ -137,7 +137,7 @@ public static double convertOoxml2AwtAngle(double ooAngle, double width, double // normalize angle, in case it's < -360 or > 360 degrees double awtAngle2 = awtAngle%360.; double awtAngle3 = awtAngle-awtAngle2; - // because of tangens nature, the values left [90°-270°] and right [270°-90°] of the axis are mirrored/the same + // because of tangent's nature, the values left [90°-270°] and right [270°-90°] of the axis are mirrored/the same // and the result of atan2 need to be justified switch ((int)(awtAngle2 / 90)) { case -3: diff --git a/poi/src/main/java/org/apache/poi/sl/draw/geom/Path.java b/poi/src/main/java/org/apache/poi/sl/draw/geom/Path.java index 5a06e7216e3..5b6377ee8ad 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/geom/Path.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/geom/Path.java @@ -88,7 +88,7 @@ public void addCommand(PathCommand cmd){ } /** - * Convert the internal represenation to java.awt.geom.Path2D + * Convert the internal representation to java.awt.geom.Path2D */ @Override public Path2D.Double getPath(Context ctx) { diff --git a/poi/src/main/java/org/apache/poi/sl/draw/geom/PathIf.java b/poi/src/main/java/org/apache/poi/sl/draw/geom/PathIf.java index a02551e21d7..27dcc63d29b 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/geom/PathIf.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/geom/PathIf.java @@ -26,7 +26,7 @@ public interface PathIf { void addCommand(PathCommand cmd); /** - * Convert the internal represenation to java.awt.geom.Path2D + * Convert the internal representation to java.awt.geom.Path2D */ Path2D.Double getPath(Context ctx); diff --git a/poi/src/main/java/org/apache/poi/sl/extractor/SlideShowExtractor.java b/poi/src/main/java/org/apache/poi/sl/extractor/SlideShowExtractor.java index c1243b3804b..569a64c3c6a 100644 --- a/poi/src/main/java/org/apache/poi/sl/extractor/SlideShowExtractor.java +++ b/poi/src/main/java/org/apache/poi/sl/extractor/SlideShowExtractor.java @@ -213,8 +213,8 @@ private void printTextParagraphs(final List

    paras, final Consumer con private void printHeaderFooter(final Sheet sheet, final Consumer consumer, final Consumer footerCon) { final Sheet m = (sheet instanceof Slide) ? sheet.getMasterSheet() : sheet; - addSheetPlaceholderDatails(sheet, Placeholder.HEADER, consumer); - addSheetPlaceholderDatails(sheet, Placeholder.FOOTER, footerCon); + addSheetPlaceholderDetails(sheet, Placeholder.HEADER, consumer); + addSheetPlaceholderDetails(sheet, Placeholder.FOOTER, footerCon); if (!masterByDefault) { return; @@ -249,7 +249,7 @@ private void printHeaderFooter(final Sheet sheet, final Consumer co } - private void addSheetPlaceholderDatails(final Sheet sheet, final Placeholder placeholder, final Consumer consumer) { + private void addSheetPlaceholderDetails(final Sheet sheet, final Placeholder placeholder, final Consumer consumer) { final PlaceholderDetails headerPD = sheet.getPlaceholderDetails(placeholder); final String headerStr = (headerPD != null) ? headerPD.getText() : null; if (headerStr != null && filter.test(headerPD)) { @@ -354,7 +354,7 @@ private static String replaceTextCap(TextRun tr) { final TextShape sh = (tp != null) ? tp.getParentShape() : null; final Placeholder ph = (sh != null) ? sh.getPlaceholder() : null; - // 0xB acts like cariage return in page titles and like blank in the others + // 0xB acts like carriage return in page titles and like blank in the others final char sep = ( ph == Placeholder.TITLE || ph == Placeholder.CENTERED_TITLE || diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/AutoNumberingScheme.java b/poi/src/main/java/org/apache/poi/sl/usermodel/AutoNumberingScheme.java index 8f717807c91..3c4a55d878b 100644 --- a/poi/src/main/java/org/apache/poi/sl/usermodel/AutoNumberingScheme.java +++ b/poi/src/main/java/org/apache/poi/sl/usermodel/AutoNumberingScheme.java @@ -174,10 +174,10 @@ public String getDescription() { public String format(int value) { String index = formatIndex(value); String cased = formatCase(index); - return formatSeperator(cased); + return formatSeparator(cased); } - private String formatSeperator(String cased) { + private String formatSeparator(String cased) { String name = name().toLowerCase(Locale.ROOT); if (name.contains("plain")) return cased; if (name.contains("parenright")) return cased+")"; diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/PlaceholderDetails.java b/poi/src/main/java/org/apache/poi/sl/usermodel/PlaceholderDetails.java index 5a4a9478206..bf601214e3c 100644 --- a/poi/src/main/java/org/apache/poi/sl/usermodel/PlaceholderDetails.java +++ b/poi/src/main/java/org/apache/poi/sl/usermodel/PlaceholderDetails.java @@ -21,7 +21,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import java.time.format.DateTimeFormatter; /** - * Extended details about placholders + * Extended details about placeholders * * @since POI 4.0.0 */ diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/Shape.java b/poi/src/main/java/org/apache/poi/sl/usermodel/Shape.java index 143c601983a..85c3ffe2f08 100644 --- a/poi/src/main/java/org/apache/poi/sl/usermodel/Shape.java +++ b/poi/src/main/java/org/apache/poi/sl/usermodel/Shape.java @@ -40,7 +40,7 @@ public interface Shape< Rectangle2D getAnchor(); /** - * @return human-readable name of this shape, e.g. "Rectange 3" + * @return human-readable name of this shape, e.g. "Rectangle 3" * * @since POI 4.0.0 */ diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/ShapeType.java b/poi/src/main/java/org/apache/poi/sl/usermodel/ShapeType.java index 31ab5011ae6..6b4ad2b7f15 100644 --- a/poi/src/main/java/org/apache/poi/sl/usermodel/ShapeType.java +++ b/poi/src/main/java/org/apache/poi/sl/usermodel/ShapeType.java @@ -26,7 +26,7 @@ public enum ShapeType { NOT_PRIMITIVE(-1, 0, "NotPrimitive"), LINE(1, 20, "Line"), LINE_INV(2, -1, null), - TRIANGLE(3, 5, "IsocelesTriangle"), + TRIANGLE(3, 5, "IsoscelesTriangle"), RT_TRIANGLE(4, 6, "RightTriangle"), RECT(5, 1, "Rectangle"), DIAMOND(6, 4, "Diamond"), diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/SimpleShape.java b/poi/src/main/java/org/apache/poi/sl/usermodel/SimpleShape.java index 507c3a7efe2..05f6e4499f9 100644 --- a/poi/src/main/java/org/apache/poi/sl/usermodel/SimpleShape.java +++ b/poi/src/main/java/org/apache/poi/sl/usermodel/SimpleShape.java @@ -113,7 +113,7 @@ public interface SimpleShape< Hyperlink getHyperlink(); /** - * Creates a hyperlink and asigns it to this shape. + * Creates a hyperlink and assigns it to this shape. * If the shape has already a hyperlink assigned, return it instead * * @return the hyperlink assigned to this shape diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/TextRun.java b/poi/src/main/java/org/apache/poi/sl/usermodel/TextRun.java index 85a7679c30a..ebb60ea632f 100644 --- a/poi/src/main/java/org/apache/poi/sl/usermodel/TextRun.java +++ b/poi/src/main/java/org/apache/poi/sl/usermodel/TextRun.java @@ -53,7 +53,7 @@ enum FieldType { /** * Returns the font color. - * This usually returns a {@link SolidPaint}, but but also other classes are possible + * This usually returns a {@link SolidPaint}, but also other classes are possible * * @return the font color/paint * @@ -105,7 +105,7 @@ enum FieldType { /** * Get the font family - convenience method for {@link #getFontInfo(FontGroup)} * - * @param fontGroup the font group, i.e. the range of glpyhs to be covered. + * @param fontGroup the font group, i.e. the range of glyphs to be covered. * if {@code null}, the font group matching the first character will be returned * * @return font family or null if not set @@ -127,7 +127,7 @@ enum FieldType { * * @param typeface the font to apply to this text run. * The value of {@code null} removes the run specific font setting, so the default setting is activated again. - * @param fontGroup the font group, i.e. the range of glpyhs to be covered. + * @param fontGroup the font group, i.e. the range of glyphs to be covered. * if {@code null}, the font group matching the first character will be returned */ void setFontFamily(String typeface, FontGroup fontGroup); @@ -135,7 +135,7 @@ enum FieldType { /** * Get the font info for the given font group * - * @param fontGroup the font group, i.e. the range of glpyhs to be covered. + * @param fontGroup the font group, i.e. the range of glyphs to be covered. * if {@code null}, the font group matching the first character will be returned * @return font info or {@code null} if not set * @@ -148,7 +148,7 @@ enum FieldType { * * @param fontInfo the font to apply to this text run. * The value of {@code null} removes the run specific font setting, so the default setting is activated again. - * @param fontGroup the font group, i.e. the range of glpyhs to be covered. defaults to latin, if {@code null}. + * @param fontGroup the font group, i.e. the range of glyphs to be covered. defaults to latin, if {@code null}. * * @since POI 3.17-beta2 */ diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/TextShape.java b/poi/src/main/java/org/apache/poi/sl/usermodel/TextShape.java index 82198362818..6be5370619f 100644 --- a/poi/src/main/java/org/apache/poi/sl/usermodel/TextShape.java +++ b/poi/src/main/java/org/apache/poi/sl/usermodel/TextShape.java @@ -59,7 +59,7 @@ enum TextDirection { /** * Specifies alist of auto-fit types. *

    - * Autofit specofies that a shape should be auto-fit to fully contain the text described within it. + * Autofit specifies that a shape should be auto-fit to fully contain the text described within it. * Auto-fitting is when text within a shape is scaled in order to contain all the text inside *

    */ diff --git a/poi/src/main/java/org/apache/poi/ss/formula/CacheAreaEval.java b/poi/src/main/java/org/apache/poi/ss/formula/CacheAreaEval.java index a26edcaf81b..8ac88e91592 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/CacheAreaEval.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/CacheAreaEval.java @@ -32,7 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more public final class CacheAreaEval extends AreaEvalBase { - /* Value Containter */ + /* Value Container */ private final ValueEval[] _values; public CacheAreaEval(AreaI ptg, ValueEval[] values) { diff --git a/poi/src/main/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java b/poi/src/main/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java index 446149b113c..fd3c5b6b59b 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java @@ -62,13 +62,13 @@ public static void setup(String[] workbookNames, WorkbookEvaluator[] evaluators) + " but number of evaluators is " + evaluators.length); } if (nItems < 1) { - throw new IllegalArgumentException("Must provide at least one collaborating worbook"); + throw new IllegalArgumentException("Must provide at least one collaborating workbook"); } new CollaboratingWorkbooksEnvironment(workbookNames, evaluators, nItems); } public static void setup(Map evaluatorsByName) { if (evaluatorsByName.size() < 1) { - throw new IllegalArgumentException("Must provide at least one collaborating worbook"); + throw new IllegalArgumentException("Must provide at least one collaborating workbook"); } WorkbookEvaluator[] evaluators = evaluatorsByName.values().toArray(new WorkbookEvaluator[0]); diff --git a/poi/src/main/java/org/apache/poi/ss/formula/ConditionalFormattingEvaluator.java b/poi/src/main/java/org/apache/poi/ss/formula/ConditionalFormattingEvaluator.java index 61136863364..39ac96f4831 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/ConditionalFormattingEvaluator.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/ConditionalFormattingEvaluator.java @@ -88,7 +88,7 @@ public void clearAllCachedFormats() { } /** - * Call this whenever cell values change in the workbook, so condional formats are re-evaluated + * Call this whenever cell values change in the workbook, so conditional formats are re-evaluated * for all cells. *

    * TODO: eventually this should work like {@link EvaluationCache#notifyUpdateCell(int, int, EvaluationCell)} diff --git a/poi/src/main/java/org/apache/poi/ss/formula/FormulaParser.java b/poi/src/main/java/org/apache/poi/ss/formula/FormulaParser.java index 83fe1051af0..1dae192be59 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/FormulaParser.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/FormulaParser.java @@ -1282,7 +1282,7 @@ private boolean isValidCellReference(String str) { if(result){ /* * Check if the argument is a function. Certain names can be either a cell reference or a function name - * depending on the contenxt. Compare the following examples in Excel 2007: + * depending on the context. Compare the following examples in Excel 2007: * (a) LOG10(100) + 1 * (b) LOG10 + 1 * In (a) LOG10 is a name of a built-in function. In (b) LOG10 is a cell reference diff --git a/poi/src/main/java/org/apache/poi/ss/formula/FormulaParsingWorkbook.java b/poi/src/main/java/org/apache/poi/ss/formula/FormulaParsingWorkbook.java index df79610b74b..0508f9344c7 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/FormulaParsingWorkbook.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/FormulaParsingWorkbook.java @@ -72,7 +72,7 @@ public interface FormulaParsingWorkbook { int getExternalSheetIndex(String workbookName, String sheetName); /** - * Returns an enum holding spreadhseet properties specific to an Excel version ( + * Returns an enum holding spreadsheet properties specific to an Excel version ( * max column and row numbers, max arguments to a function, etc.) */ SpreadsheetVersion getSpreadsheetVersion(); diff --git a/poi/src/main/java/org/apache/poi/ss/formula/IStabilityClassifier.java b/poi/src/main/java/org/apache/poi/ss/formula/IStabilityClassifier.java index 78696a4c98c..1efa9c153cf 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/IStabilityClassifier.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/IStabilityClassifier.java @@ -33,7 +33,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more *

  • a formula cell can be marked as 'final' if its formula will not be changed after the first * call to {@link WorkbookEvaluator#evaluate(EvaluationCell)}. This remains true even if changes * in dependent values may cause the evaluated value to change.
  • - *
  • plain value cells should be marked as 'not final' if their plain value value may change. + *
  • plain value cells should be marked as 'not final' if their plain value may change. *
  • *
  • formula cells should be marked as 'not final' if their formula definition may change.
  • *
  • cells which may switch between plain value and formula should also be marked as 'not final'. diff --git a/poi/src/main/java/org/apache/poi/ss/formula/SharedFormula.java b/poi/src/main/java/org/apache/poi/ss/formula/SharedFormula.java index aca085565eb..65aef2b6b45 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/SharedFormula.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/SharedFormula.java @@ -20,7 +20,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.ss.SpreadsheetVersion; /** - * Encapsulates logic to convert shared formulaa into non shared equivalent + * Encapsulates logic to convert shared formula into non shared equivalent */ public class SharedFormula { diff --git a/poi/src/main/java/org/apache/poi/ss/formula/WorkbookEvaluator.java b/poi/src/main/java/org/apache/poi/ss/formula/WorkbookEvaluator.java index 2d220234267..ca5978943ef 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/WorkbookEvaluator.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/WorkbookEvaluator.java @@ -374,7 +374,7 @@ static ValueEval getValueFromNonFormulaCell(EvaluationCell cell) { String dbgIndentStr = ""; // always init. to non-null just for defensive avoiding NPE if (dbgEvaluationOutputForNextEval) { - // first evaluation call when ouput is desired, so iit. this evaluator instance + // first evaluation call when output is desired, so init. this evaluator instance dbgEvaluationOutputIndent = 1; dbgEvaluationOutputForNextEval = true; } @@ -533,7 +533,7 @@ static ValueEval getValueFromNonFormulaCell(EvaluationCell cell) { } ec.setArrayMode(arrayMode); -// logDebug("invoke " + operation + " (nAgs=" + numops + ")"); +// logDebug("invoke " + operation + " (nArgs=" + numops + ")"); opResult = OperationEvaluatorFactory.evaluate(optg, ops, ec); ec.setArrayMode(false); diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/Countif.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/Countif.java index 93fdf033a42..a4f07dbde21 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/Countif.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/Countif.java @@ -269,7 +269,7 @@ public boolean matches(ValueEval x) { } else if((x instanceof NumberEval)) { switch (getCode()) { case CmpOp.NE: - // not-equals comparison of a number to boolean always returnes false + // not-equals comparison of a number to boolean always returns false return true; default: return false; diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java index c5920cd0398..915fb9af23a 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java @@ -18,7 +18,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more package org.apache.poi.ss.formula.functions; /** - * This class is a functon library for common fiscal functions. + * This class is a function library for common fiscal functions. * Glossary of terms/abbreviations: *
    *
      diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java index 317643c50fd..014f73f8e4c 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java @@ -136,7 +136,7 @@ private double evaluateInternal(ValueVector x, ValueVector y, int size) // error handling is as if the x is fully evaluated before y ErrorEval firstYerr = null; - boolean accumlatedSome = false; + boolean accumulatedSome = false; // first pass: read in data, compute xbar and ybar double sumx = 0.0, sumy = 0.0; @@ -155,7 +155,7 @@ private double evaluateInternal(ValueVector x, ValueVector y, int size) // only count pairs if both elements are numbers // all other combinations of value types are silently ignored if (vx instanceof NumberEval && vy instanceof NumberEval) { - accumlatedSome = true; + accumulatedSome = true; NumberEval nx = (NumberEval) vx; NumberEval ny = (NumberEval) vy; sumx += nx.getNumberValue(); @@ -167,7 +167,7 @@ private double evaluateInternal(ValueVector x, ValueVector y, int size) throw new EvaluationException(firstYerr); } - if (!accumlatedSome) { + if (!accumulatedSome) { throw new EvaluationException(ErrorEval.DIV_ZERO); } diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/XYNumericFunction.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/XYNumericFunction.java index 0d7b447fa89..9bc6c40c684 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/XYNumericFunction.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/XYNumericFunction.java @@ -129,7 +129,7 @@ private double evaluateInternal(ValueVector x, ValueVector y, int size) // error handling is as if the x is fully evaluated before y ErrorEval firstXerr = null; ErrorEval firstYerr = null; - boolean accumlatedSome = false; + boolean accumulatedSome = false; double result = 0.0; for (int i = 0; i < size; i++) { @@ -149,7 +149,7 @@ private double evaluateInternal(ValueVector x, ValueVector y, int size) } // only count pairs if both elements are numbers if (vx instanceof NumberEval && vy instanceof NumberEval) { - accumlatedSome = true; + accumulatedSome = true; NumberEval nx = (NumberEval) vx; NumberEval ny = (NumberEval) vy; result += acc.accumulate(nx.getNumberValue(), ny.getNumberValue()); @@ -163,7 +163,7 @@ private double evaluateInternal(ValueVector x, ValueVector y, int size) if (firstYerr != null) { throw new EvaluationException(firstYerr); } - if (!accumlatedSome) { + if (!accumulatedSome) { throw new EvaluationException(ErrorEval.DIV_ZERO); } return result; diff --git a/poi/src/main/java/org/apache/poi/ss/formula/ptg/DeletedArea3DPtg.java b/poi/src/main/java/org/apache/poi/ss/formula/ptg/DeletedArea3DPtg.java index 629db662a37..e75b464cd63 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/ptg/DeletedArea3DPtg.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/ptg/DeletedArea3DPtg.java @@ -28,7 +28,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.apache.poi.util.LittleEndianOutput; /** - * Deleted Area 3D Ptg - 3D referecnce (Sheet + Area)

      + * Deleted Area 3D Ptg - 3D reference (Sheet + Area)

      * Defined an area in Extern Sheet. * * @version 1.0-pre diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/AutoFilter.java b/poi/src/main/java/org/apache/poi/ss/usermodel/AutoFilter.java index 2b8c2446c50..3bd89f79a0f 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/AutoFilter.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/AutoFilter.java @@ -54,7 +54,7 @@ public interface AutoFilter { * @param operator the operator to apply * @param criteria top or bottom value used in the filter criteria. * - * TODO YK: think how to combine AutoFilter with with DataValidationConstraint, they are really close relatives + * TODO YK: think how to combine AutoFilter with DataValidationConstraint, they are really close relatives * void applyFilter(int columnIndex, FilterOperator operator, String criteria); */ diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/Cell.java b/poi/src/main/java/org/apache/poi/ss/usermodel/Cell.java index bca58569036..8e03994bf0f 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/Cell.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/Cell.java @@ -32,7 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more * High level representation of a cell in a row of a spreadsheet. *

      * Cells can be numeric, formula-based or string-based (text). The cell type - * specifies this. String cells cannot conatin numbers and numeric cells cannot + * specifies this. String cells cannot contain numbers and numeric cells cannot * contain strings (at least according to our model). Client apps should do the * conversions themselves. Formula cells have the formula string, as well as * the formula result, which can be numeric or string. diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/CreationHelper.java b/poi/src/main/java/org/apache/poi/ss/usermodel/CreationHelper.java index 004025db103..38bb0b0bbdb 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/CreationHelper.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/CreationHelper.java @@ -57,7 +57,7 @@ public interface CreationHelper { /** * Creates a XSSF-style Color object, used for extended sheet - * formattings and conditional formattings + * formatting and conditional formatting */ ExtendedColor createExtendedColor(); diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java b/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java index fe14527066d..8920ec431cd 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java @@ -1422,7 +1422,7 @@ public Object parseObject(String source, ParsePosition pos) { } /** * Workaround until we merge {@link DataFormatter} with {@link CellFormat}. - * Constant, non-cachable wrapper around a {@link CellFormatResult} + * Constant, non-cacheable wrapper around a {@link CellFormatResult} */ @SuppressWarnings("serial") private final class CellFormatResultWrapper extends Format { diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java b/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java index bead9cef3c1..e4b5f1ee754 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java @@ -58,7 +58,7 @@ private DateUtil() { private static final BigDecimal BD_NANOSEC_DAY = BigDecimal.valueOf(SECONDS_PER_DAY * 1e9); - private static final BigDecimal BD_MILISEC_RND = BigDecimal.valueOf(0.5 * 1e6); + private static final BigDecimal BD_MILLISEC_RND = BigDecimal.valueOf(0.5 * 1e6); private static final BigDecimal BD_SECOND_RND = BigDecimal.valueOf(0.5 * 1e9); private static final Pattern TIME_SEPARATOR_PATTERN = Pattern.compile(":"); @@ -433,7 +433,7 @@ else if (wholeDays < 61) { long nanosTime = bd.subtract(BigDecimal.valueOf(wholeDays)) .multiply(BD_NANOSEC_DAY) - .add(roundSeconds ? BD_SECOND_RND : BD_MILISEC_RND) + .add(roundSeconds ? BD_SECOND_RND : BD_MILLISEC_RND) .longValue(); ldt = ldt.plusNanos(nanosTime); diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/FormulaError.java b/poi/src/main/java/org/apache/poi/ss/usermodel/FormulaError.java index 744f4afb606..5ffdd6e47e7 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/FormulaError.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/FormulaError.java @@ -114,7 +114,7 @@ public enum FormulaError { */ CIRCULAR_REF(0xFFFFFFC4, "~CIRCULAR~REF~"), /** - * POI specific code to indicate that the funcition required is + * POI specific code to indicate that the function required is * not implemented in POI */ FUNCTION_NOT_IMPLEMENTED(0xFFFFFFE2, "~FUNCTION~NOT~IMPLEMENTED~"); diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java b/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java index 75c343b33f7..facfc2b4a73 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java @@ -124,7 +124,7 @@ private String format(final BigDecimal decimal) { // if the absolute value is smaller than 1 over the exact or maxDenom // you can stop here and return "0" - // reciprocal is result of an int devision ... and so it's nearly always 0 + // reciprocal is result of an int division ... and so it's nearly always 0 // double reciprocal = 1/Math.max(exactDenom, maxDenom); // if (absDoubleValue < reciprocal) { // return "0"; diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/Picture.java b/poi/src/main/java/org/apache/poi/ss/usermodel/Picture.java index ac7d33dd212..5429c61cc52 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/Picture.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/Picture.java @@ -20,7 +20,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** - * Repersents a picture in a SpreadsheetML document + * Represents a picture in a SpreadsheetML document */ public interface Picture extends Shape { @@ -43,7 +43,7 @@ public interface Picture extends Shape { *

      * Please note, that this method works correctly only for workbooks * with the default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx). - * If the default font is changed the resized image can be streched vertically or horizontally. + * If the default font is changed the resized image can be stretched vertically or horizontally. *

      *

      * resize(1.0,1.0) keeps the original size,
      diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/RichTextString.java b/poi/src/main/java/org/apache/poi/ss/usermodel/RichTextString.java index e38f12355c0..d20bb9087bc 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/RichTextString.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/RichTextString.java @@ -19,7 +19,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more /** * Rich text unicode string. These strings can have fonts - * applied to arbitary parts of the string. + * applied to arbitrary parts of the string. */ public interface RichTextString { diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/Sheet.java b/poi/src/main/java/org/apache/poi/ss/usermodel/Sheet.java index f3141a81629..68d2c219623 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/Sheet.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/Sheet.java @@ -160,7 +160,7 @@ public interface Sheet extends Iterable { * using the default font (first font in the workbook).

      * * Unless you are using a very special font, the default character is '0' (zero), - * this is true for Arial (default font font in HSSF) and Calibri (default font in XSSF)

      + * this is true for Arial (default font in HSSF) and Calibri (default font in XSSF)

      * * Please note, that the width set by this method includes 4 pixels of margin padding (two on each side), * plus 1 pixel padding for the gridlines (Section 3.3.1.12 of the OOXML spec). diff --git a/poi/src/main/java/org/apache/poi/ss/util/CellRangeAddressBase.java b/poi/src/main/java/org/apache/poi/ss/util/CellRangeAddressBase.java index d8852221c47..e3a3b0049f0 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/CellRangeAddressBase.java +++ b/poi/src/main/java/org/apache/poi/ss/util/CellRangeAddressBase.java @@ -86,7 +86,7 @@ public void validate(SpreadsheetVersion ssVersion) { private static void validateRow(int row, SpreadsheetVersion ssVersion) { int maxrow = ssVersion.getLastRowIndex(); if (row > maxrow) throw new IllegalArgumentException("Maximum row number is " + maxrow); - if (row < 0) throw new IllegalArgumentException("Minumum row number is 0"); + if (row < 0) throw new IllegalArgumentException("Minimum row number is 0"); } /** diff --git a/poi/src/main/java/org/apache/poi/ss/util/NormalisedDecimal.java b/poi/src/main/java/org/apache/poi/ss/util/NormalisedDecimal.java index 2c80e25f1cf..cea99e503ae 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/NormalisedDecimal.java +++ b/poi/src/main/java/org/apache/poi/ss/util/NormalisedDecimal.java @@ -189,7 +189,7 @@ public String getSignificantDecimalDigits() { return Long.toString(_wholePart); } /** - * Rounds the first whole digit position (considers only units digit, not frational part). + * Rounds the first whole digit position (considers only units digit, not fractional part). * Caller should check total digit count of result to see whether the rounding operation caused * a carry out of the most significant digit */ diff --git a/poi/src/main/java/org/apache/poi/ss/util/SSCellRange.java b/poi/src/main/java/org/apache/poi/ss/util/SSCellRange.java index 20757c092fa..5c262e91493 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/SSCellRange.java +++ b/poi/src/main/java/org/apache/poi/ss/util/SSCellRange.java @@ -90,7 +90,7 @@ public K getCell(int relativeRowIndex, int relativeColumnIndex) { + " is outside the allowable range (0.." + (_height-1) + ")."); } if (relativeColumnIndex < 0 || relativeColumnIndex >= _width) { - throw new ArrayIndexOutOfBoundsException("Specified colummn " + relativeColumnIndex + throw new ArrayIndexOutOfBoundsException("Specified column " + relativeColumnIndex + " is outside the allowable range (0.." + (_width-1) + ")."); } int flatIndex = _width * relativeRowIndex + relativeColumnIndex; diff --git a/poi/src/main/java/org/apache/poi/ss/util/cellwalk/CellHandler.java b/poi/src/main/java/org/apache/poi/ss/util/cellwalk/CellHandler.java index 25e88304347..c6703d84dee 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/cellwalk/CellHandler.java +++ b/poi/src/main/java/org/apache/poi/ss/util/cellwalk/CellHandler.java @@ -26,7 +26,7 @@ public interface CellHandler { /** * @param cell current cell - * @param ctx information about invokation context + * @param ctx information about invocation context */ void onCell(Cell cell, CellWalkContext ctx); diff --git a/poi/src/main/java/org/apache/poi/util/ArrayUtil.java b/poi/src/main/java/org/apache/poi/util/ArrayUtil.java index 9878be93caf..e762b96baf9 100644 --- a/poi/src/main/java/org/apache/poi/util/ArrayUtil.java +++ b/poi/src/main/java/org/apache/poi/util/ArrayUtil.java @@ -30,10 +30,10 @@ private ArrayUtil() {} /** * Moves a number of entries in an array to another point in the array, - * shifting those inbetween as required. + * shifting those in between as required. * @param array The array to alter * @param moveFrom The (0 based) index of the first entry to move - * @param moveTo The (0 based) index of the positition to move to + * @param moveTo The (0 based) index of the position to move to * @param numToMove The number of entries to move */ public static void arrayMoveWithin(Object[] array, int moveFrom, int moveTo, int numToMove) { diff --git a/poi/src/main/java/org/apache/poi/util/CodePageUtil.java b/poi/src/main/java/org/apache/poi/util/CodePageUtil.java index b89fba871b7..b021c609058 100644 --- a/poi/src/main/java/org/apache/poi/util/CodePageUtil.java +++ b/poi/src/main/java/org/apache/poi/util/CodePageUtil.java @@ -132,7 +132,7 @@ public class CodePageUtil public static final int CP_MAC_CROATIAN = 10082; /**

      Codepage for US-ASCII

      */ - public static final int CP_US_ACSII = 20127; + public static final int CP_US_ASCII = 20127; /**

      Codepage for KOI8-R

      */ public static final int CP_KOI8_R = 20866; @@ -371,7 +371,7 @@ public static String codepageToEncoding(final int codepage, boolean javaLangForm return "MacTurkish"; case CP_MAC_CROATIAN: return "MacCroatian"; - case CP_US_ACSII: + case CP_US_ASCII: case CP_US_ASCII2: return "US-ASCII"; case CP_KOI8_R: diff --git a/poi/src/main/java/org/apache/poi/util/IOUtils.java b/poi/src/main/java/org/apache/poi/util/IOUtils.java index 51281d4bbaf..7bb89b43ab3 100644 --- a/poi/src/main/java/org/apache/poi/util/IOUtils.java +++ b/poi/src/main/java/org/apache/poi/util/IOUtils.java @@ -567,7 +567,7 @@ public static byte[] safelyClone(byte[] src, int offset, int length, int maxLeng if (offset < 0 || length < 0 || maxLength < 0) { throw new RecordFormatException("Invalid offset/length specified: " - + "offset: " + offset + ", lenght: " + length + ", maxLength: " + maxLength); + + "offset: " + offset + ", length: " + length + ", maxLength: " + maxLength); } int realLength = Math.min(src.length - offset, length); diff --git a/poi/src/main/java/org/apache/poi/util/LocaleID.java b/poi/src/main/java/org/apache/poi/util/LocaleID.java index 6438adf535d..ff071ed2a4b 100644 --- a/poi/src/main/java/org/apache/poi/util/LocaleID.java +++ b/poi/src/main/java/org/apache/poi/util/LocaleID.java @@ -374,7 +374,7 @@ public enum LocaleID { MN_MONG_MN(0x0C50, "mn_mong_mn", "mn-Mong-MN", "Mongolian (Traditional Mongolian, Mongolia)", 0, -1), DZ_BT(0x0C51, "dz_bt", "dz-BT", "Dzongkha (Bhutan)", 0, SUNDAY), TMZ_MA(0x0C5F, "tmz_ma", "tmz-MA", "tmz (Morocco)", 32759, -1), - QUZ_PE(0x0C6b, "quz_pe", "quz-PE", "Quechua (Peru)", 1252, -1), + QUZ_PE(0x0C6B, "quz_pe", "quz-PE", "Quechua (Peru)", 1252, -1), AR_LY(0x1001, "ar_ly", "ar-LY", "Arabic (Libya)", 1256, SATURDAY), ZH_SG(0x1004, "zh_sg", "zh-SG", "Chinese (Simplified, Singapore)", 936, SUNDAY), DE_LU(0x1007, "de_lu", "de-LU", "German (Luxembourg)", 1252, -1), @@ -440,10 +440,10 @@ public enum LocaleID { EN_ID(0x3809, "en_id", "en-ID", "English (Indonesia)", 32759, SUNDAY), ES_UY(0x380A, "es_uy", "es-UY", "Spanish (Uruguay)", 1252, -1), FR_MA(0x380C, "fr_ma", "fr-MA", "French (Morocco)", 0, SATURDAY), - AR_BH(0x3c01, "ar_bh", "ar-BH", "Arabic (Bahrain)", 1256, SATURDAY), - EN_HK(0x3c09, "en_hk", "en-HK", "English (Hong Kong SAR)", 0, SUNDAY), - ES_PY(0x3c0A, "es_py", "es-PY", "Spanish (Paraguay)", 1252, SUNDAY), - FR_HT(0x3c0C, "fr_ht", "fr-HT", "French (Haiti)", 0, -1), + AR_BH(0x3C01, "ar_bh", "ar-BH", "Arabic (Bahrain)", 1256, SATURDAY), + EN_HK(0x3C09, "en_hk", "en-HK", "English (Hong Kong SAR)", 0, SUNDAY), + ES_PY(0x3C0A, "es_py", "es-PY", "Spanish (Paraguay)", 1252, SUNDAY), + FR_HT(0x3C0C, "fr_ht", "fr-HT", "French (Haiti)", 0, -1), AR_QA(0x4001, "ar_qa", "ar-QA", "Arabic (Qatar)", 1256, SATURDAY), EN_IN(0x4009, "en_in", "en-IN", "English (India)", 1252, -1), ES_BO(0x400A, "es_bo", "es-BO", "Spanish (Bolivia)", 1252, -1), diff --git a/poi/src/main/java/org/apache/poi/util/StringUtil.java b/poi/src/main/java/org/apache/poi/util/StringUtil.java index c1bb5215435..6c37cf6681a 100644 --- a/poi/src/main/java/org/apache/poi/util/StringUtil.java +++ b/poi/src/main/java/org/apache/poi/util/StringUtil.java @@ -268,7 +268,7 @@ public static int getEncodedSize(String value) { * * @param input the String containing the data to be written * @param output the byte array to which the data is to be written - * @param offset an offset into the byte arrat at which the data is start + * @param offset an offset into the byte array at which the data is start * when written */ public static void putCompressedUnicode(String input, byte[] output, int offset) { @@ -649,7 +649,7 @@ public static int countMatches(CharSequence haystack, char needle) { * format (most important byte last), return a Java String representation * of it. * - * Scans the byte array for two continous 0 bytes and returns the string before. + * Scans the byte array for two continuous 0 bytes and returns the string before. *

      * * #61881: there seem to be programs out there, which write the 0-termination also diff --git a/poi/src/main/java/org/apache/poi/wp/usermodel/Paragraph.java b/poi/src/main/java/org/apache/poi/wp/usermodel/Paragraph.java index be488a2ef8a..bce7da24361 100644 --- a/poi/src/main/java/org/apache/poi/wp/usermodel/Paragraph.java +++ b/poi/src/main/java/org/apache/poi/wp/usermodel/Paragraph.java @@ -27,7 +27,7 @@ public interface Paragraph { // public boolean isTableRowEnd(); // public int getTableLevel(); - // TODO Implement justifaction in XWPF + // TODO Implement justification in XWPF // public int getJustification(); // public void setJustification(byte jc); diff --git a/poi/src/test/java/org/apache/poi/POIDataSamples.java b/poi/src/test/java/org/apache/poi/POIDataSamples.java index d96e2f264ee..19dc199139b 100644 --- a/poi/src/test/java/org/apache/poi/POIDataSamples.java +++ b/poi/src/test/java/org/apache/poi/POIDataSamples.java @@ -52,7 +52,7 @@ public final class POIDataSamples { private File _resolvedDataDir; /** {@code true} if standard system property is not set, * but the data is available on the test runtime classpath */ - private boolean _sampleDataIsAvaliableOnClassPath; + private boolean _sampleDataIsAvailableOnClassPath; private final String _moduleDir; /** @@ -132,7 +132,7 @@ public static POIDataSamples getXmlDSignInstance() { */ public InputStream openResourceAsStream(String sampleFileName) { - if (_sampleDataIsAvaliableOnClassPath) { + if (_sampleDataIsAvailableOnClassPath) { InputStream result = sampleFileName == null ? null : openClasspathResource(sampleFileName); if(result == null) { @@ -196,7 +196,7 @@ private void initialise() { } catch (IOException e) { throw new RuntimeException(e); } - _sampleDataIsAvaliableOnClassPath = true; + _sampleDataIsAvailableOnClassPath = true; return; } diff --git a/poi/src/test/java/org/apache/poi/ddf/TestUnknownEscherRecord.java b/poi/src/test/java/org/apache/poi/ddf/TestUnknownEscherRecord.java index fa00b7c7392..81560cd43a4 100644 --- a/poi/src/test/java/org/apache/poi/ddf/TestUnknownEscherRecord.java +++ b/poi/src/test/java/org/apache/poi/ddf/TestUnknownEscherRecord.java @@ -82,7 +82,7 @@ void testFillFields() { assertEquals( 1, r.getChildRecords().size() ); assertEquals( (short) 0xFFFF, r.getChild( 0 ).getRecordId() ); - //Add by Zhang Zhang test error situation when remaining bytes > avalible bytes + //Add by Zhang test error situation when remaining bytes > available bytes testData = "00 02 " + // options "11 F1 " + // record id diff --git a/poi/src/test/java/org/apache/poi/hpsf/basic/TestMetaDataIPI.java b/poi/src/test/java/org/apache/poi/hpsf/basic/TestMetaDataIPI.java index 0f7d88939d0..78424688bac 100644 --- a/poi/src/test/java/org/apache/poi/hpsf/basic/TestMetaDataIPI.java +++ b/poi/src/test/java/org/apache/poi/hpsf/basic/TestMetaDataIPI.java @@ -234,7 +234,7 @@ void testTwo() throws Exception { /** - * Tests with strange characters in keys and data (Umlaute etc.) + * Tests with strange characters in keys and data (Umlaut etc.) */ @Test void testThree() throws Exception { @@ -581,7 +581,7 @@ private static String strangizeU(String s) { private static StringBuilder strangizeInit(String s) { StringBuilder sb = new StringBuilder(); - String[] umlaute = { "\u00e4", "\u00fc", "\u00f6", "\u00dc", "$", "\u00d6", "\u00dc", + String[] umlaut = { "\u00e4", "\u00fc", "\u00f6", "\u00dc", "$", "\u00d6", "\u00dc", "\u00c9", "\u00d6", "@", "\u00e7", "&" }; for (int i = 0; i < 5; i++) { sb.append(s); @@ -595,7 +595,7 @@ private static StringBuilder strangizeInit(String s) { sb.append('='); // TODO - no Random - tests should be completely deterministic - sb.append(umlaute[RandomSingleton.getInstance().nextInt(umlaute.length)]); + sb.append(umlaut[RandomSingleton.getInstance().nextInt(umlaut.length)]); sb.append('<'); } return sb; diff --git a/poi/src/test/java/org/apache/poi/hpsf/basic/TestReadAllFiles.java b/poi/src/test/java/org/apache/poi/hpsf/basic/TestReadAllFiles.java index 4cf5a31eb70..00bddf97120 100644 --- a/poi/src/test/java/org/apache/poi/hpsf/basic/TestReadAllFiles.java +++ b/poi/src/test/java/org/apache/poi/hpsf/basic/TestReadAllFiles.java @@ -134,7 +134,7 @@ void recreate(File file) throws IOException, HPSFException { /** * This test method checks whether DocumentSummary information streams - * can be read. This is done by opening all "Test*" files in the 'poifs' directrory + * can be read. This is done by opening all "Test*" files in the 'poifs' directory * pointed to by the "POI.testdata.path" system property, trying to extract * the document summary information stream in the root directory and calling * its get... methods. @@ -146,7 +146,7 @@ void readDocumentSummaryInformation(File file) throws Exception { try (POIFSFileSystem poifs = new POIFSFileSystem(file, true)) { final DirectoryEntry dir = poifs.getRoot(); /* - * If there is a document summry information stream, read it from + * If there is a document summary information stream, read it from * the POI filesystem. */ if (dir.hasEntry(DocumentSummaryInformation.DEFAULT_STREAM_NAME)) { @@ -188,7 +188,7 @@ void readCustomPropertiesFromFiles(File file) throws Exception { /* Read a test document doc into a POI filesystem. */ try (POIFSFileSystem poifs = new POIFSFileSystem(file)) { /* - * If there is a document summry information stream, read it from + * If there is a document summary information stream, read it from * the POI filesystem, else create a new one. */ DocumentSummaryInformation dsi = TestWriteWellKnown.getDocumentSummaryInformation(poifs); diff --git a/poi/src/test/java/org/apache/poi/hpsf/basic/Util.java b/poi/src/test/java/org/apache/poi/hpsf/basic/Util.java index 881b43ec4b8..e14e5abb234 100644 --- a/poi/src/test/java/org/apache/poi/hpsf/basic/Util.java +++ b/poi/src/test/java/org/apache/poi/hpsf/basic/Util.java @@ -46,7 +46,7 @@ private Util() { *

      Reads a set of files from a POI filesystem and returns them * as an array of {@link POIFile} instances. This method loads all * files into memory and thus does not cope well with large POI - * filessystems.

      + * filesystems.

      * * @param poiFs The name of the POI filesystem as seen by the * operating system. (This is the "filename".) diff --git a/poi/src/test/java/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java b/poi/src/test/java/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java index c2f8d8486b1..88b34644eb8 100644 --- a/poi/src/test/java/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java +++ b/poi/src/test/java/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java @@ -98,7 +98,7 @@ void testMissingRowRecords() throws IOException { @Test void testNoExtraNewLines() throws IOException { // Load a different file - // This file has has something in lines 1-33 + // This file has something in lines 1-33 readRecords("MRExtraLines.xls"); int rowCount=0; diff --git a/poi/src/test/java/org/apache/poi/hssf/extractor/TestExcelExtractor.java b/poi/src/test/java/org/apache/poi/hssf/extractor/TestExcelExtractor.java index 497bd20843c..b1acb967ee7 100644 --- a/poi/src/test/java/org/apache/poi/hssf/extractor/TestExcelExtractor.java +++ b/poi/src/test/java/org/apache/poi/hssf/extractor/TestExcelExtractor.java @@ -240,17 +240,17 @@ void testFormatting() throws Exception { } /** - * Embeded in a non-excel file + * Embedded in a non-excel file */ @Test - void testWithEmbeded() throws Exception { + void testWithEmbedded() throws Exception { POIFSFileSystem fs = null; HSSFWorkbook wbA = null, wbB = null; ExcelExtractor exA = null, exB = null; try { - fs = new POIFSFileSystem(POIDataSamples.getDocumentInstance().getFile("word_with_embeded.doc")); + fs = new POIFSFileSystem(POIDataSamples.getDocumentInstance().getFile("word_with_embedded.doc")); DirectoryNode objPool = (DirectoryNode) fs.getRoot().getEntry("ObjectPool"); DirectoryNode dirA = (DirectoryNode) objPool.getEntry("_1269427460"); @@ -285,7 +285,7 @@ void testWithEmbeddedInOwn() throws Exception { ExcelExtractor exA = null, exB = null, ex = null; try { - fs = new POIFSFileSystem(ssSamples.getFile("excel_with_embeded.xls")); + fs = new POIFSFileSystem(ssSamples.getFile("excel_with_embedded.xls")); DirectoryNode dirA = (DirectoryNode) fs.getRoot().getEntry("MBD0000A3B5"); DirectoryNode dirB = (DirectoryNode) fs.getRoot().getEntry("MBD0000A3B4"); @@ -303,8 +303,8 @@ void testWithEmbeddedInOwn() throws Exception { // And the base file too ex = new ExcelExtractor(fs); - assertEquals("Sheet1\nI have lots of embeded files in me\nSheet2\nSheet3\n", ex.getText()); - assertEquals("Excel With Embeded", ex.getSummaryInformation().getTitle()); + assertEquals("Sheet1\nI have lots of embeded files in me\nSheet2\nSheet3\n", ex.getText()); /* fixing the spelling here requires editing 44643.xls */ + assertEquals("Excel With Embeded", ex.getSummaryInformation().getTitle()); /* fixing the spelling here requires editing 44643.xls */ } finally { if (ex != null) ex.close(); if (exB != null) exB.close(); diff --git a/poi/src/test/java/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java b/poi/src/test/java/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java index 91c7a36513c..3e63bd5db3b 100644 --- a/poi/src/test/java/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java +++ b/poi/src/test/java/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java @@ -252,7 +252,7 @@ void testOpenInvalidFile1() throws IOException { @Test void testOpenNonExistingFile() { // a file that exists, but is a different format - assertThrows(EmptyFileException.class, () -> new OldExcelExtractor(new File("notexistingfile.xls")).close()); + assertThrows(EmptyFileException.class, () -> new OldExcelExtractor(new File("nonexistentfile.xls")).close()); } @Test diff --git a/poi/src/test/java/org/apache/poi/hssf/model/TestLinkTable.java b/poi/src/test/java/org/apache/poi/hssf/model/TestLinkTable.java index 57355c3de50..3877f0c3f8b 100644 --- a/poi/src/test/java/org/apache/poi/hssf/model/TestLinkTable.java +++ b/poi/src/test/java/org/apache/poi/hssf/model/TestLinkTable.java @@ -217,7 +217,7 @@ void testAddNameX(){ assertNull(tbl.getNameXPtg("ISODD", -1)); assertEquals(5, wrl.getRecords().size()); //still have five records - NameXPtg namex1 = tbl.addNameXPtg("ISODD"); // adds two new rercords + NameXPtg namex1 = tbl.addNameXPtg("ISODD"); // adds two new records assertEquals(0, namex1.getSheetRefIndex()); assertEquals(0, namex1.getNameIndex()); NameXPtg act = tbl.getNameXPtg("ISODD", -1); @@ -255,7 +255,7 @@ void testAddNameX(){ assertEquals("ISODD", tbl.resolveNameXText(namex1.getSheetRefIndex(), namex1.getNameIndex(), null)); assertNull(tbl.getNameXPtg("ISEVEN", -1)); - NameXPtg namex2 = tbl.addNameXPtg("ISEVEN"); // adds two new rercords + NameXPtg namex2 = tbl.addNameXPtg("ISEVEN"); // adds two new records assertEquals(0, namex2.getSheetRefIndex()); assertEquals(1, namex2.getNameIndex()); // name index increased by one act = tbl.getNameXPtg("ISEVEN", -1); diff --git a/poi/src/test/java/org/apache/poi/hssf/record/TestCFRuleRecord.java b/poi/src/test/java/org/apache/poi/hssf/record/TestCFRuleRecord.java index 81689f140c5..fe262850a24 100644 --- a/poi/src/test/java/org/apache/poi/hssf/record/TestCFRuleRecord.java +++ b/poi/src/test/java/org/apache/poi/hssf/record/TestCFRuleRecord.java @@ -311,9 +311,9 @@ private void testFontFormattingAccessors(FontFormatting fontFormatting) { fontFormatting.setEscapementTypeModified(true); assertTrue(fontFormatting.isEscapementTypeModified()); - fontFormatting.setFontWieghtModified(false); + fontFormatting.setFontWeightModified(false); assertFalse(fontFormatting.isFontWeightModified()); - fontFormatting.setFontWieghtModified(true); + fontFormatting.setFontWeightModified(true); assertTrue(fontFormatting.isFontWeightModified()); fontFormatting.setFontCancellationModified(false); diff --git a/poi/src/test/java/org/apache/poi/hssf/record/TestColumnInfoRecord.java b/poi/src/test/java/org/apache/poi/hssf/record/TestColumnInfoRecord.java index ed24c46dc47..8eb654e83ff 100644 --- a/poi/src/test/java/org/apache/poi/hssf/record/TestColumnInfoRecord.java +++ b/poi/src/test/java/org/apache/poi/hssf/record/TestColumnInfoRecord.java @@ -53,7 +53,7 @@ void testBasic() { * Excel reads that file OK and assumes zero for the value of the reserved field. */ @Test - void testZeroResevedBytes_bug48332() { + void testZeroReservedBytes_bug48332() { // Taken from bugzilla attachment 24661 (offset 0x1E73) byte[] inpData = HexRead.readFromString("7D 00 0A 00 00 00 00 00 D5 19 0F 00 02 00"); byte[] outData = HexRead.readFromString("7D 00 0C 00 00 00 00 00 D5 19 0F 00 02 00 00 00"); diff --git a/poi/src/test/java/org/apache/poi/hssf/record/TestExternalNameRecord.java b/poi/src/test/java/org/apache/poi/hssf/record/TestExternalNameRecord.java index d165764ea92..8241d793817 100644 --- a/poi/src/test/java/org/apache/poi/hssf/record/TestExternalNameRecord.java +++ b/poi/src/test/java/org/apache/poi/hssf/record/TestExternalNameRecord.java @@ -79,7 +79,7 @@ void testAutoStdDocName() { assertFalse(enr.isBuiltInName()); assertFalse(enr.isIconifiedPictureLink()); assertFalse(enr.isOLELink()); - assertFalse(enr.isPicureLink()); + assertFalse(enr.isPictureLink()); assertTrue(enr.isStdDocumentNameIdentifier()); confirmRecordEncoding(0x0023, dataAutoDocName, enr.serialize()); @@ -94,7 +94,7 @@ void testPlainName() { assertFalse(enr.isBuiltInName()); assertFalse(enr.isIconifiedPictureLink()); assertFalse(enr.isOLELink()); - assertFalse(enr.isPicureLink()); + assertFalse(enr.isPictureLink()); assertFalse(enr.isStdDocumentNameIdentifier()); confirmRecordEncoding(0x0023, dataPlainName, enr.serialize()); diff --git a/poi/src/test/java/org/apache/poi/hssf/record/TestFontRecord.java b/poi/src/test/java/org/apache/poi/hssf/record/TestFontRecord.java index 2dbaeb48187..6ed5470b55c 100644 --- a/poi/src/test/java/org/apache/poi/hssf/record/TestFontRecord.java +++ b/poi/src/test/java/org/apache/poi/hssf/record/TestFontRecord.java @@ -74,7 +74,7 @@ void testStore() { // .fontheight = c8 // .attributes = 0 // .italic = false -// .strikout = false +// .strikeout = false // .macoutlined= false // .macshadowed= false // .colorpalette = 7fff diff --git a/poi/src/test/java/org/apache/poi/hssf/record/TestLbsDataSubRecord.java b/poi/src/test/java/org/apache/poi/hssf/record/TestLbsDataSubRecord.java index 53e1229537e..24a855d76fe 100644 --- a/poi/src/test/java/org/apache/poi/hssf/record/TestLbsDataSubRecord.java +++ b/poi/src/test/java/org/apache/poi/hssf/record/TestLbsDataSubRecord.java @@ -128,7 +128,7 @@ void test_remove_padding(){ "00, 00, 00, 00, 00, 00, 01, 00, 09, 00, " + "00, 00, 0F, 00, 01, 00, " + "13, 00, 1B, 00, " + - "10, 00, " + //next 16 bytes is a ptg aray + "10, 00, " + //next 16 bytes is a ptg array "09, 00, 00, 00, 00, 00, 25, 09, 00, 0C, 00, 07, 00, 07, 00, 00, " + "01, 00, " + //num lines "00, 00, " + //selected diff --git a/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactoryInputStream.java b/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactoryInputStream.java index cdd5c113411..f7a5e608aec 100644 --- a/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactoryInputStream.java +++ b/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactoryInputStream.java @@ -60,7 +60,7 @@ final class TestRecordFactoryInputStream { */ @Test void defaultPasswordWrong() { - // This encodng depends on docId, password and stream position + // This encoding depends on docId, password and stream position final String SAMPLE_WINDOW1_ENCR1 = "3D 00 12 00" + "C4, 9B, 02, 50, 86, E0, DF, 34, FB, 57, 0E, 8C, CE, 25, 45, E3, 80, 01"; @@ -79,7 +79,7 @@ void defaultPasswordWrong() { @Test void defaultPasswordOK() { - // This encodng depends on docId, password and stream position + // This encoding depends on docId, password and stream position final String SAMPLE_WINDOW1_ENCR1 = "3D 00 12 00" + "C4, 9B, 02, 50, 86, E0, DF, 34, FB, 57, 0E, 8C, CE, 25, 45, E3, 80, 01"; diff --git a/poi/src/test/java/org/apache/poi/hssf/record/TestSupBookRecord.java b/poi/src/test/java/org/apache/poi/hssf/record/TestSupBookRecord.java index aa6b6499006..9f2be157d1c 100644 --- a/poi/src/test/java/org/apache/poi/hssf/record/TestSupBookRecord.java +++ b/poi/src/test/java/org/apache/poi/hssf/record/TestSupBookRecord.java @@ -25,7 +25,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import static org.apache.poi.hssf.record.SupBookRecord.CH_STARTUP_DIR; import static org.apache.poi.hssf.record.SupBookRecord.CH_UP_DIR; import static org.apache.poi.hssf.record.SupBookRecord.CH_VOLUME; -import static org.apache.poi.hssf.record.SupBookRecord.PATH_SEPERATOR; +import static org.apache.poi.hssf.record.SupBookRecord.PATH_SEPARATOR; import static org.apache.poi.hssf.record.TestcaseRecordInputStream.confirmRecordEncoding; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -138,34 +138,34 @@ record = new SupBookRecord(startMarker + "test.xls", sheetNames); //UNC path notation record = new SupBookRecord(startMarker + "" + CH_VOLUME + "@servername" + CH_DOWN_DIR + "test.xls", sheetNames); - assertEquals("\\\\servername" + PATH_SEPERATOR + "test.xls", record.getURL()); + assertEquals("\\\\servername" + PATH_SEPARATOR + "test.xls", record.getURL()); //Absolute path notation - different device record = new SupBookRecord(startMarker + "" + CH_VOLUME + "D" + CH_DOWN_DIR + "test.xls", sheetNames); - assertEquals("D:" + PATH_SEPERATOR + "test.xls", record.getURL()); + assertEquals("D:" + PATH_SEPARATOR + "test.xls", record.getURL()); //Absolute path notation - same device record = new SupBookRecord(startMarker + "" + CH_SAME_VOLUME + "folder" + CH_DOWN_DIR + "test.xls", sheetNames); - assertEquals(PATH_SEPERATOR + "folder" + PATH_SEPERATOR + "test.xls", record.getURL()); + assertEquals(PATH_SEPARATOR + "folder" + PATH_SEPARATOR + "test.xls", record.getURL()); //Relative path notation - down record = new SupBookRecord(startMarker + "folder" + CH_DOWN_DIR + "test.xls", sheetNames); - assertEquals("folder" + PATH_SEPERATOR + "test.xls", record.getURL()); + assertEquals("folder" + PATH_SEPARATOR + "test.xls", record.getURL()); //Relative path notation - up record = new SupBookRecord(startMarker +""+ CH_UP_DIR + "test.xls", sheetNames); - assertEquals(".." + PATH_SEPERATOR + "test.xls", record.getURL()); + assertEquals(".." + PATH_SEPARATOR + "test.xls", record.getURL()); //Relative path notation - for EXCEL.exe - fallback record = new SupBookRecord(startMarker +""+ CH_STARTUP_DIR + "test.xls", sheetNames); - assertEquals("." + PATH_SEPERATOR + "test.xls", record.getURL()); + assertEquals("." + PATH_SEPARATOR + "test.xls", record.getURL()); //Relative path notation - for EXCEL lib folder - fallback record = new SupBookRecord(startMarker +""+ CH_LIB_DIR + "test.xls", sheetNames); - assertEquals("." + PATH_SEPERATOR + "test.xls", record.getURL()); + assertEquals("." + PATH_SEPARATOR + "test.xls", record.getURL()); //Relative path notation - for alternative EXCEL.exe - fallback record = new SupBookRecord(startMarker +""+ CH_ALT_STARTUP_DIR+ "test.xls", sheetNames); - assertEquals("." + PATH_SEPERATOR + "test.xls", record.getURL()); + assertEquals("." + PATH_SEPARATOR + "test.xls", record.getURL()); } } diff --git a/poi/src/test/java/org/apache/poi/hssf/record/chart/TestLinkedDataRecord.java b/poi/src/test/java/org/apache/poi/hssf/record/chart/TestLinkedDataRecord.java index d2a1b791d19..743e5eeca2f 100644 --- a/poi/src/test/java/org/apache/poi/hssf/record/chart/TestLinkedDataRecord.java +++ b/poi/src/test/java/org/apache/poi/hssf/record/chart/TestLinkedDataRecord.java @@ -39,7 +39,7 @@ final class TestLinkedDataRecord { The first record links to the series title (linkType = 0). It's reference type is 1 which means that it links directly to data entered - into the forumula bar. There seems to be no reference to any data + into the formula bar. There seems to be no reference to any data however. The formulaOfLink field contains two 0 bytes. This probably means that there is no particular heading set. diff --git a/poi/src/test/java/org/apache/poi/hssf/record/common/TestUnicodeString.java b/poi/src/test/java/org/apache/poi/hssf/record/common/TestUnicodeString.java index 8abd514c6cd..0ab322f4e35 100644 --- a/poi/src/test/java/org/apache/poi/hssf/record/common/TestUnicodeString.java +++ b/poi/src/test/java/org/apache/poi/hssf/record/common/TestUnicodeString.java @@ -131,7 +131,7 @@ void perfectStringSize() { confirmSize(MAX_DATA_SIZE, s); //Test an uncompressed string - //Note that we can only ever get to a maximim size of 8227 since an uncompressed + //Note that we can only ever get to a maximum size of 8227 since an uncompressed //string is writing double bytes. s = makeUnicodeString((MAX_DATA_SIZE-2-1)/2, true); s.setOptionFlags((byte)0x1); diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/SanityChecker.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/SanityChecker.java index 22d0676d511..9cb7772854b 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/SanityChecker.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/SanityChecker.java @@ -36,21 +36,21 @@ Licensed to the Apache Software Foundation (ASF) under one or more public class SanityChecker { static class CheckRecord { Class record; - char occurance; // 1 = one time, M = 1..many times, * = 0..many, 0 = optional + char occurrence; // 1 = one time, M = 1..many times, * = 0..many, 0 = optional private final boolean together; - public CheckRecord(Class record, char occurance) { - this(record, occurance, true); + public CheckRecord(Class record, char occurrence) { + this(record, occurrence, true); } /** * @param record The record type to check - * @param occurance The occurance 1 = occurs once, M = occurs many times + * @param occurrence The occurrence 1 = occurs once, M = occurs many times * @param together */ - public CheckRecord(Class record, char occurance, boolean together) { + public CheckRecord(Class record, char occurrence, boolean together) { this.record = record; - this.occurance = occurance; + this.occurrence = occurrence; this.together = together; } @@ -59,15 +59,15 @@ public Class getRecord() { } public boolean isRequired() { - return occurance == '1' || occurance == 'M'; + return occurrence == '1' || occurrence == 'M'; } public boolean isOptional() { - return occurance == '0' || occurance == '*'; + return occurrence == '0' || occurrence == '*'; } public boolean isMany() { - return occurance == '*' || occurance == 'M'; + return occurrence == '*' || occurrence == 'M'; } public int match(List records, int recordIdx) { @@ -87,7 +87,7 @@ private int matchOptional(int firstRecord, List records, i } private int matchRequired(int firstRecord, List records, int recordIdx) { - assertNotEquals(-1, firstRecord, "Manditory record missing or out of order: " + record); + assertNotEquals(-1, firstRecord, "Mandatory record missing or out of order: " + record); return matchOneOrMany(records, firstRecord); } @@ -111,11 +111,11 @@ private int matchOneOrMany(List records, int recordIdx) { } private boolean isZeroToMany() { - return occurance == '*' || occurance == 'M'; + return occurrence == '*' || occurrence == 'M'; } private boolean isZeroOrOne() { - return occurance == '0' || occurance == '1'; + return occurrence == '0' || occurrence == '1'; } } diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestBugs.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestBugs.java index b836e3269ce..236e65f11b3 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestBugs.java @@ -1155,7 +1155,7 @@ void bug31661() throws Exception { } /** - * Incorrect handling of non-ISO 8859-1 characters in Windows ANSII Code Page 1252 + * Incorrect handling of non-ISO 8859-1 characters in Windows ANSI Code Page 1252 */ @Test void bug27394() throws Exception { diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestEmbeddedObjects.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestEmbeddedObjects.java index c0d09ab5c69..dfba8370c0f 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestEmbeddedObjects.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestEmbeddedObjects.java @@ -58,7 +58,7 @@ void testReadNestedObject() throws IOException { } /** - * One with large numbers of recursivly embedded resources + * One with large numbers of recursively embedded resources * See https://github.com/apache/poi/pull/2 */ @Test diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java index 30e701aab3a..d6dd8e1f340 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java @@ -416,7 +416,7 @@ void testSlowEvaluate45376() throws Exception { // much time (~3 sec on Core 2 Duo 2.2GHz) // short-circuit-if optimisation cuts this down to 255 evaluations which is still too high // System.err.println("Cell A9 took " + evalCount + " intermediate evaluations"); - assertTrue(evalCount <= 10, "Identifed bug 45376 - Formula evaluator should cache values"); + assertTrue(evalCount <= 10, "Identified bug 45376 - Formula evaluator should cache values"); // With caching, the evaluationCount is 8 which is exactly the // number of formula cells that needed to be evaluated. assertEquals(8, evalCount); diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestFormulas.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestFormulas.java index 836ed32bae3..29e41a1aac2 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestFormulas.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestFormulas.java @@ -50,7 +50,7 @@ private static HSSFWorkbook openSample(String sampleFileName) { } /** - * Add 1+1 -- WHoohoo! + * Add 1+1 -- Woohoo! */ @Test void testBasicAddIntegers() throws IOException { @@ -84,7 +84,7 @@ void testAddIntegers() throws IOException { * Multiply various integers */ @Test - void testMultplyIntegers() throws IOException { + void testMultiplyIntegers() throws IOException { binomialOperator("*"); } @@ -319,7 +319,7 @@ private static void operationalRefVerify(String operator, HSSFWorkbook wb) { /** - * tests order wrting out == order writing in for a given formula + * tests order writing out == order writing in for a given formula */ private static void orderTest(String formula) throws IOException { try (HSSFWorkbook wb1 = new HSSFWorkbook()) { diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java index 576fa6e2798..aa2915af51e 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java @@ -394,7 +394,7 @@ void testGeneralAtFormat() { } /** - * Tests various formattings of dates and numbers + * Tests various formatting of dates and numbers */ @Test void testFromFile() { diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java index dec43bd1d92..94037c02b8e 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java @@ -145,7 +145,7 @@ void testShortCircuitIfEvaluation() throws IOException { ValueEval ve = evaluator.evaluate(HSSFEvaluationTestHelper.wrapCell(cellA1)); int evalCount = evalListener.getEvalCount(); // Without short-circuit-if evaluation, evaluating cell 'A1' takes 3 extra evaluations (for D1,E1,F1) - assertNotEquals(6, evalCount, "Identifed bug 48195 - Formula evaluator should short-circuit IF() calculations."); + assertNotEquals(6, evalCount, "Identified bug 48195 - Formula evaluator should short-circuit IF() calculations."); assertEquals(3, evalCount); assertEquals(2.0, ((NumberEval) ve).getNumberValue(), 0D); } diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFSheet.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFSheet.java index 105440ef88c..ed4da74eb0b 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFSheet.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFSheet.java @@ -359,8 +359,8 @@ void getDrawings() throws IOException { */ @Test void cloneWithProtect() throws IOException { - String passwordA = "secrect"; - int expectedHashA = -6810; + String passwordA = "secret"; + int expectedHashA = -9561; String passwordB = "admin"; int expectedHashB = -14556; @@ -940,7 +940,7 @@ void autoFilter() throws IOException { HSSFSimpleShape comboBoxShape = (HSSFSimpleShape) dr.getChildren().get(0); assertEquals(HSSFSimpleShape.OBJECT_TYPE_COMBO_BOX, comboBoxShape.getShapeType()); - assertNull(ish.findFirstRecordBySid(ObjRecord.sid)); // ObjRecord will appear after serializetion + assertNull(ish.findFirstRecordBySid(ObjRecord.sid)); // ObjRecord will appear after serialization try (HSSFWorkbook wb2 = writeOutAndReadBack(wb1)) { sh = wb2.getSheetAt(0); diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFTextbox.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFTextbox.java index 5d08d77e4c0..a6c4726d928 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFTextbox.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestHSSFTextbox.java @@ -53,7 +53,7 @@ void testAlignment() throws IOException { * When inserting text make sure that if font is not set we must set the default one. */ @Test - void testSetDeafultTextFormat() throws IOException { + void testSetDefaultTextFormat() throws IOException { try (HSSFWorkbook wb = new HSSFWorkbook()) { HSSFSheet sheet = wb.createSheet(); HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestUnicodeWorkbook.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestUnicodeWorkbook.java index 5ae57250b3c..62aabfc2ebf 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestUnicodeWorkbook.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestUnicodeWorkbook.java @@ -29,11 +29,11 @@ final class TestUnicodeWorkbook { /** * Tests Bug38230 - * That a Umlat is written and then read back. + * That an Umlaut is written and then read back. * It should have been written as a compressed unicode. */ @Test - void testUmlatReadWrite() throws IOException { + void testUmlautReadWrite() throws IOException { try (HSSFWorkbook wb1 = new HSSFWorkbook()) { //Create a unicode sheet name (euro symbol) @@ -43,7 +43,7 @@ void testUmlatReadWrite() throws IOException { HSSFCell c = r.createCell(1); c.setCellValue(new HSSFRichTextString("\u00e4")); - //Confirm that the sring will be compressed + //Confirm that the string will be compressed assertEquals(0, c.getRichStringCellValue().getUnicodeString().getOptionFlags()); try (HSSFWorkbook wb = HSSFTestDataSamples.writeOutAndReadBack(wb1)) { diff --git a/poi/src/test/java/org/apache/poi/hssf/util/TestAreaReference.java b/poi/src/test/java/org/apache/poi/hssf/util/TestAreaReference.java index 28170dbf12e..2208682fd63 100644 --- a/poi/src/test/java/org/apache/poi/hssf/util/TestAreaReference.java +++ b/poi/src/test/java/org/apache/poi/hssf/util/TestAreaReference.java @@ -200,7 +200,7 @@ void testContiguousReferences() { } @Test - void testDiscontinousReference() throws Exception { + void testDiscontinuousReference() throws Exception { try (InputStream is = HSSFTestDataSamples.openSampleFileStream("44167.xls"); HSSFWorkbook wb = new HSSFWorkbook(is)) { InternalWorkbook workbook = TestHSSFWorkbook.getInternalWorkbook(wb); diff --git a/poi/src/test/java/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java b/poi/src/test/java/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java index 29662882177..ea587d88f81 100644 --- a/poi/src/test/java/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java +++ b/poi/src/test/java/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java @@ -180,7 +180,7 @@ void readHeaderUShort() { Biff8DecryptingStream bds = st.getBDS(); int hval = bds.readDataSize(); // unencrypted int nextInt = bds.readInt(); - assertNotEquals(0x8F534029, nextInt, "Indentified bug in key alignment after call to readHeaderUShort()"); + assertNotEquals(0x8F534029, nextInt, "Identified bug in key alignment after call to readHeaderUShort()"); assertEquals(0x16885243, nextInt); assertNotEquals(0x283E, hval, "readHeaderUShort() incorrectly decrypted result"); assertEquals(0x504F, hval); diff --git a/poi/src/test/java/org/apache/poi/poifs/dev/TestPOIFSDump.java b/poi/src/test/java/org/apache/poi/poifs/dev/TestPOIFSDump.java index e13f205c40b..0c98d26c9cc 100644 --- a/poi/src/test/java/org/apache/poi/poifs/dev/TestPOIFSDump.java +++ b/poi/src/test/java/org/apache/poi/poifs/dev/TestPOIFSDump.java @@ -170,7 +170,7 @@ public void checkPermission(Permission perm) { @SuppressForbidden("tests java.security features deprecated in java 17 - no other option though") void testMainNoArgs() { Assumptions.assumeFalse(POITestCase.getJDKVersion() >= 18, - "SecurityManager does not work any more since JDK 18"); + "SecurityManager does not work since JDK 18"); SecurityManager sm = System.getSecurityManager(); try { diff --git a/poi/src/test/java/org/apache/poi/poifs/filesystem/TestDocument.java b/poi/src/test/java/org/apache/poi/poifs/filesystem/TestDocument.java index 94bc700be31..7c4e1be887c 100644 --- a/poi/src/test/java/org/apache/poi/poifs/filesystem/TestDocument.java +++ b/poi/src/test/java/org/apache/poi/poifs/filesystem/TestDocument.java @@ -89,8 +89,8 @@ private static POIFSDocument checkDocument(final POIFSFileSystem poifs, final in final int blockSize = (size >= 4096) ? 512 : 64; final int blockCount = (size + (blockSize-1)) / blockSize; - final byte[] bytCpy = checkValues(blockCount, document, input); - final POIFSDocument copied = makeCopy(document,bytCpy); + final byte[] byteCpy = checkValues(blockCount, document, input); + final POIFSDocument copied = makeCopy(document,byteCpy); checkValues(blockCount, copied, input); diff --git a/poi/src/test/java/org/apache/poi/poifs/filesystem/TestPOIFSMiniStore.java b/poi/src/test/java/org/apache/poi/poifs/filesystem/TestPOIFSMiniStore.java index fcc1e4bcf1e..5a643eeb22d 100644 --- a/poi/src/test/java/org/apache/poi/poifs/filesystem/TestPOIFSMiniStore.java +++ b/poi/src/test/java/org/apache/poi/poifs/filesystem/TestPOIFSMiniStore.java @@ -137,7 +137,7 @@ void testGetBlock() throws Exception { POIFSMiniStore ministore = fs.getMiniStore(); ByteBuffer b; - // Runs from the start of the data section in 64 byte chungs + // Runs from the start of the data section in 64 byte chunks b = ministore.getBlockAt(0); assertEquals((byte) 0x9e, b.get()); assertEquals((byte) 0x75, b.get()); @@ -307,7 +307,7 @@ void testCreateBlockIfNeeded() throws Exception { } assertEquals(24, count); - // The mini block block counts now run to 191 + // The mini block counts now run to 191 for (int i = 0; i <= 191; i++) { ministore.getBlockAt(i); } diff --git a/poi/src/test/java/org/apache/poi/poifs/filesystem/TestPOIFSStream.java b/poi/src/test/java/org/apache/poi/poifs/filesystem/TestPOIFSStream.java index 4efcc809835..ea2dda7027e 100644 --- a/poi/src/test/java/org/apache/poi/poifs/filesystem/TestPOIFSStream.java +++ b/poi/src/test/java/org/apache/poi/poifs/filesystem/TestPOIFSStream.java @@ -2533,7 +2533,7 @@ void RecursiveDelete() throws IOException { // Can't delete yet, has stuff assertFalse(vbaProj.delete()); // Recursively delete - _recursiveDeletee(vbaProj); + _recursiveDelete(vbaProj); // Entries gone assertEquals(4, _countChildren(src._get_property_table().getRoot())); @@ -2541,7 +2541,7 @@ void RecursiveDelete() throws IOException { } } - private void _recursiveDeletee(Entry entry) throws IOException { + private void _recursiveDelete(Entry entry) throws IOException { if (entry.isDocumentEntry()) { assertTrue(entry.delete()); return; @@ -2551,7 +2551,7 @@ private void _recursiveDeletee(Entry entry) throws IOException { String[] names = dir.getEntryNames().toArray(new String[dir.getEntryCount()]); for (String name : names) { Entry ce = dir.getEntry(name); - _recursiveDeletee(ce); + _recursiveDelete(ce); } assertTrue(dir.delete()); } diff --git a/poi/src/test/java/org/apache/poi/poifs/storage/RawDataUtil.java b/poi/src/test/java/org/apache/poi/poifs/storage/RawDataUtil.java index 7382c65778e..17f32f24e28 100644 --- a/poi/src/test/java/org/apache/poi/poifs/storage/RawDataUtil.java +++ b/poi/src/test/java/org/apache/poi/poifs/storage/RawDataUtil.java @@ -49,7 +49,7 @@ public static byte[] decode(String[] hexDataLines) { } /** - * Decompress previously gziped/base64ed data + * Decompress previously gzipped/base64ed data * * @param data the gzipped/base64ed data * @return the raw bytes diff --git a/poi/src/test/java/org/apache/poi/poifs/storage/TestBATBlock.java b/poi/src/test/java/org/apache/poi/poifs/storage/TestBATBlock.java index 8190b151b6c..4da60cd540a 100644 --- a/poi/src/test/java/org/apache/poi/poifs/storage/TestBATBlock.java +++ b/poi/src/test/java/org/apache/poi/poifs/storage/TestBATBlock.java @@ -329,7 +329,7 @@ void testGetBATBlockAndIndex() { assertEquals(0, BATBlock.getBATBlockAndIndex(offset, header, blocks).getIndex()); assertEquals(1, blocks.indexOf(BATBlock.getBATBlockAndIndex(offset, header, blocks).getBlock())); - // Biggr block size, back to real BATs + // Bigger block size, back to real BATs header.setBATCount(2); offset = 0; diff --git a/poi/src/test/java/org/apache/poi/ss/formula/BaseTestExternalFunctions.java b/poi/src/test/java/org/apache/poi/ss/formula/BaseTestExternalFunctions.java index af6440a36e5..e23a93e36cd 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/BaseTestExternalFunctions.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/BaseTestExternalFunctions.java @@ -107,7 +107,7 @@ void testExternalFunctions() throws IOException { assertEquals("ISODD(1)+ISEVEN(2)", cell1.getCellFormula()); Cell cell2 = sh.createRow(1).createCell(0); - // unregistered functions are parseable and renderable, but may not be evaluateable + // unregistered functions are parseable and renderable, but may not be evaluable cell2.setCellFormula("MYFUNC(\"B1\")"); NotImplementedException e = assertThrows(NotImplementedException.class, () -> evaluator.evaluate(cell2), "Expected NotImplementedFunctionException/NotImplementedException"); diff --git a/poi/src/test/java/org/apache/poi/ss/formula/TestFormulaShifter.java b/poi/src/test/java/org/apache/poi/ss/formula/TestFormulaShifter.java index 38fb222d8d6..e6b293a30ed 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/TestFormulaShifter.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/TestFormulaShifter.java @@ -169,7 +169,7 @@ void testCopyAreasSourceRowsAbsAbs() { // all these operations are on an area ref spanning rows 10 to 20 final AreaPtg aptg = createAreaPtgRow(10, 20, false, false); - //AbsFirstRow AbsLastRow references should't change when copied to a different row + //AbsFirstRow AbsLastRow references shouldn't change when copied to a different row confirmAreaRowCopy(aptg, 0, 30, 20, 10, 20, false); confirmAreaRowCopy(aptg, 15, 25, -15, 10, 20, false); } @@ -222,7 +222,7 @@ void testCopyAreasSourceColumnsAbsAbs() { // all these operations are on an area ref spanning columns 10 to 20 final AreaPtg aptg = createAreaPtgColumn(10, 20, false, false); - //AbsFirstColumn AbsLastColumn references should't change when copied to a different column + //AbsFirstColumn AbsLastColumn references shouldn't change when copied to a different column confirmAreaColumnCopy(aptg, 0, 30, 20, 10, 20, false); confirmAreaColumnCopy(aptg, 15, 25, -15, 10, 20, false); } diff --git a/poi/src/test/java/org/apache/poi/ss/formula/atp/TestIfna.java b/poi/src/test/java/org/apache/poi/ss/formula/atp/TestIfna.java index 87567743e49..fd53a1482b5 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/atp/TestIfna.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/atp/TestIfna.java @@ -46,7 +46,7 @@ void setup() { } @Test - void testNumbericArgsWorkCorrectly() { + void testNumericArgsWorkCorrectly() { confirmResult(fe, cell, "IFNA(-1,42)", new CellValue(-1.0)); confirmResult(fe, cell, "IFNA(NA(),42)", new CellValue(42.0)); } diff --git a/poi/src/test/java/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java b/poi/src/test/java/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java index 28cdaa8d040..6c1dab6fa8c 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java @@ -40,11 +40,11 @@ Licensed to the Apache Software Foundation (ASF) under one or more class TestWorkdayFunction { - private static final String STARTING_DATE = "2008/10/01"; - private static final String FIRST_HOLIDAY = "2008/11/26"; - private static final String SECOND_HOLIDAY = "2008/12/04"; - private static final String THIRD_HOLIDAY = "2009/01/21"; - private static final String RETROATIVE_HOLIDAY = "2008/09/29"; + private static final String STARTING_DATE = "2008/10/01"; + private static final String FIRST_HOLIDAY = "2008/11/26"; + private static final String SECOND_HOLIDAY = "2008/12/04"; + private static final String THIRD_HOLIDAY = "2009/01/21"; + private static final String RETROACTIVE_HOLIDAY = "2008/09/29"; private static final OperationEvaluationContext EC = new OperationEvaluationContext(null, null, 1, 1, 1, null); @@ -146,11 +146,11 @@ void testReturnWorkdaysWithDaysTruncated() { } @Test - void testReturnRetroativeWorkday() { + void testReturnRetroactiveWorkday() { Calendar expCal = LocaleUtil.getLocaleCalendar(2008, 8, 23); Date expDate = expCal.getTime(); - ValueEval[] ve = {new StringEval(STARTING_DATE), new NumberEval(-5), new StringEval(RETROATIVE_HOLIDAY)}; + ValueEval[] ve = {new StringEval(STARTING_DATE), new NumberEval(-5), new StringEval(RETROACTIVE_HOLIDAY)}; double numberValue = ((NumberEval) WorkdayFunction.instance.evaluate(ve, EC)).getNumberValue(); Date actDate = DateUtil.getJavaDate(numberValue); diff --git a/poi/src/test/java/org/apache/poi/ss/formula/atp/TestWorkdayIntlFunction.java b/poi/src/test/java/org/apache/poi/ss/formula/atp/TestWorkdayIntlFunction.java index e2ebfbe1456..37bb86ca83e 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/atp/TestWorkdayIntlFunction.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/atp/TestWorkdayIntlFunction.java @@ -42,11 +42,11 @@ Licensed to the Apache Software Foundation (ASF) under one or more class TestWorkdayIntlFunction { - private static final String STARTING_DATE = "2008/10/01"; - private static final String FIRST_HOLIDAY = "2008/11/26"; - private static final String SECOND_HOLIDAY = "2008/12/04"; - private static final String THIRD_HOLIDAY = "2009/01/21"; - private static final String RETROATIVE_HOLIDAY = "2008/09/29"; + private static final String STARTING_DATE = "2008/10/01"; + private static final String FIRST_HOLIDAY = "2008/11/26"; + private static final String SECOND_HOLIDAY = "2008/12/04"; + private static final String THIRD_HOLIDAY = "2009/01/21"; + private static final String RETROACTIVE_HOLIDAY = "2008/09/29"; private static final OperationEvaluationContext EC = new OperationEvaluationContext(null, null, 1, 1, 1, null); @@ -148,12 +148,12 @@ void testReturnWorkdaysWithDaysTruncated() { } @Test - void testReturnRetroativeWorkday() { + void testReturnRetroactiveWorkday() { Calendar expCal = LocaleUtil.getLocaleCalendar(2008, 8, 23); Date expDate = expCal.getTime(); ValueEval[] ve = {new StringEval(STARTING_DATE), new NumberEval(-5), - BlankEval.instance, new StringEval(RETROATIVE_HOLIDAY)}; + BlankEval.instance, new StringEval(RETROACTIVE_HOLIDAY)}; double numberValue = ((NumberEval) WorkdayIntlFunction.instance.evaluate(ve, EC)).getNumberValue(); Date actDate = DateUtil.getJavaDate(numberValue); diff --git a/poi/src/test/java/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java b/poi/src/test/java/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java index 6e5f0645df9..318da092d03 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java @@ -168,7 +168,7 @@ public FunctionDataCollector(PrintStream ps) { _groupFunctionNames = new HashSet<>(); } - public void addFuntion(int funcIx, boolean hasFootnote, String funcName, int minParams, int maxParams, + public void addFunction(int funcIx, boolean hasFootnote, String funcName, int minParams, int maxParams, String returnClass, String paramClasses, String volatileFlagStr) { boolean isVolatile = volatileFlagStr.length() > 0; @@ -360,7 +360,7 @@ public void processFunction(String[] cellData, Boolean[] noteFlags, int i) { String paramClasses = cellData[i + 5]; String volatileFlagStr = cellData[i + 6]; - _fdc.addFuntion(funcIx, hasFootnote, funcName, minParams, maxParams, returnClass, paramClasses, volatileFlagStr); + _fdc.addFunction(funcIx, hasFootnote, funcName, minParams, maxParams, returnClass, paramClasses, volatileFlagStr); } private static int parseInt(String valStr) { diff --git a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestDec2Hex.java b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestDec2Hex.java index be11a2b8012..072abee6a12 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestDec2Hex.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestDec2Hex.java @@ -79,7 +79,7 @@ void testBasic() { confirmValue("If argument places contains a decimal value, dec2hex ignores the numbers to the right side of the decimal point.", "100","10.0", "0000000064"); confirmValue("Converts decimal -54 to hexadecimal, 2 is ignored","-54", "2", "FFFFFFFFCA"); - confirmValue("places is optionnal","-54", "FFFFFFFFCA"); + confirmValue("places is optional","-54", "FFFFFFFFCA"); confirmValue("Converts normal decimal number to hexadecimal", "100", "64"); diff --git a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestIndirect.java b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestIndirect.java index 12c7169dfe8..5fed9f88e10 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestIndirect.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestIndirect.java @@ -124,7 +124,7 @@ void testBasic() throws Exception { confirm(feA, c, "INDIRECT(\"A1:G1\")", 13); // de-reference area ref (note formula is in C4) confirm(feA, c, "SUM(INDIRECT(A4))", 50); // indirect defined name - confirm(feA, c, "SUM(INDIRECT(B4))", 351); // indirect defined name pointinh to other sheet + confirm(feA, c, "SUM(INDIRECT(B4))", 351); // indirect defined name pointing to other sheet // simple error propagation: diff --git a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNumericFunction.java b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNumericFunction.java index 632c53ad39f..7c1928db20e 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNumericFunction.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNumericFunction.java @@ -131,7 +131,7 @@ void testDOLLARJapan() { } @Test - @Disabled("fails on some Java Runtimes (kr apprears at start of result in some JREs)") + @Disabled("fails on some Java Runtimes (kr appears at start of result in some JREs)") void testDOLLARDenmark() { Locale defaultLocale = LocaleUtil.getUserLocale(); try { diff --git a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestRoundFuncs.java b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestRoundFuncs.java index df5f033fff7..fdc317560ca 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestRoundFuncs.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestRoundFuncs.java @@ -61,7 +61,7 @@ void testRoundDownWithStringArg() { } @Test - void testGithub321() throws IOException { + void testGitHub321() throws IOException { try (HSSFWorkbook hssfWorkbook = new HSSFWorkbook()) { HSSFSheet hssfSheet = hssfWorkbook.createSheet(); HSSFRow hssfRow = hssfSheet.createRow(0); diff --git a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSubtotal.java b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSubtotal.java index 0cfc46f0dc1..750996a7f58 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSubtotal.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSubtotal.java @@ -495,7 +495,7 @@ void testUnimplemented() throws IOException { Sheet sh = wb.createSheet(); Cell b4 = sh.createRow(3).createCell(1); - // formula, throws NotImplemnted? + // formula, throws NotImplemented? String[][] formulas = { { "SUBTOTAL(0,B2:B3)", null }, { "SUBTOTAL(9)", FormulaParseException.class.getName() }, diff --git a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java index a5fb9ef8c22..b978b08ed5c 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java @@ -22,7 +22,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more import org.junit.jupiter.params.provider.Arguments; /** - * Tests for numeric functions with two arguments such aqs +, -, *, POWER + * Tests for numeric functions with two arguments such as +, -, *, POWER * as loaded from a test data spreadsheet. */ class TestTwoOperandNumericFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet { diff --git a/poi/src/test/java/org/apache/poi/ss/formula/ptg/TestReferencePtg.java b/poi/src/test/java/org/apache/poi/ss/formula/ptg/TestReferencePtg.java index bcf1c43aa75..60c9e09a011 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/ptg/TestReferencePtg.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/ptg/TestReferencePtg.java @@ -47,25 +47,25 @@ void testReading() { assertEquals(55.0, sheet.getRow(0).getCell(0).getNumericCellValue(), 0.0, "Wrong numeric value for original number"); assertEquals(55.0, sheet.getRow(0).getCell(1).getNumericCellValue(), 0.0, - "Wrong numeric value for referemce"); + "Wrong numeric value for reference"); assertEquals("A1", sheet.getRow(0).getCell(1).getCellFormula(), "Wrong formula string for reference"); // Now moving over the 2**15 boundary // (Remember that excel row (n) is poi row (n-1) assertEquals(32767.0, sheet.getRow(32766).getCell(0).getNumericCellValue(), 0.0, "Wrong numeric value for original number"); - assertEquals(32767.0, sheet.getRow(32766).getCell(1).getNumericCellValue(), 0.0, "Wrong numeric value for referemce"); + assertEquals(32767.0, sheet.getRow(32766).getCell(1).getNumericCellValue(), 0.0, "Wrong numeric value for reference"); assertEquals("A32767", sheet.getRow(32766).getCell(1).getCellFormula(), "Wrong formula string for reference"); assertEquals(32768.0, sheet.getRow(32767).getCell(0).getNumericCellValue(), 0.0, "Wrong numeric value for original number"); - assertEquals(32768.0, sheet.getRow(32767).getCell(1).getNumericCellValue(), 0.0, "Wrong numeric value for referemce"); + assertEquals(32768.0, sheet.getRow(32767).getCell(1).getNumericCellValue(), 0.0, "Wrong numeric value for reference"); assertEquals("A32768", sheet.getRow(32767).getCell(1).getCellFormula(), "Wrong formula string for reference"); assertEquals(32769.0, sheet.getRow(32768).getCell(0).getNumericCellValue(), 0.0, "Wrong numeric value for original number"); - assertEquals(32769.0, sheet.getRow(32768).getCell(1).getNumericCellValue(), 0.0, "Wrong numeric value for referemce"); + assertEquals(32769.0, sheet.getRow(32768).getCell(1).getNumericCellValue(), 0.0, "Wrong numeric value for reference"); assertEquals("A32769", sheet.getRow(32768).getCell(1).getCellFormula(), "Wrong formula string for reference"); assertEquals(32770.0, sheet.getRow(32769).getCell(0).getNumericCellValue(), 0.0, "Wrong numeric value for original number"); - assertEquals(32770.0, sheet.getRow(32769).getCell(1).getNumericCellValue(), 0.0, "Wrong numeric value for referemce"); + assertEquals(32770.0, sheet.getRow(32769).getCell(1).getNumericCellValue(), 0.0, "Wrong numeric value for reference"); assertEquals("A32770", sheet.getRow(32769).getCell(1).getCellFormula(), "Wrong formula string for reference"); } diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestCellComment.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestCellComment.java index 4dde615f648..8629ecd7a3a 100644 --- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestCellComment.java +++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestCellComment.java @@ -197,7 +197,7 @@ public final void modifyComments() throws IOException { row = sheet.getRow(rownum); cell = row.getCell(1); comment = cell.getCellComment(); - comment.setAuthor("Mofified[" + rownum + "] by Yegor"); + comment.setAuthor("Modified[" + rownum + "] by Yegor"); comment.setString(factory.createRichTextString("Modified comment at row " + rownum)); } @@ -210,7 +210,7 @@ public final void modifyComments() throws IOException { cell = row.getCell(1); comment = cell.getCellComment(); - assertEquals("Mofified[" + rownum + "] by Yegor", comment.getAuthor()); + assertEquals("Modified[" + rownum + "] by Yegor", comment.getAuthor()); assertEquals("Modified comment at row " + rownum, comment.getString().getString()); } diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java index 49f944635b8..3e8e1fa9fcb 100644 --- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java +++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java @@ -537,7 +537,7 @@ protected void testReadOffice2007(String filename) throws IOException { SheetConditionalFormatting sheetCF = s.getSheetConditionalFormatting(); int numCF = 3; int numCF12 = 15; - int numCFEX = 0; // TODO This should be 2, but we don't support CFEX formattings yet, see #58149 + int numCFEX = 0; // TODO This should be 2, but we don't support CFEX formatting yet, see #58149 assertEquals(numCF + numCF12 + numCFEX, sheetCF.getNumConditionalFormattings()); int fCF = 0, fCF12 = 0, fCFEX = 0; @@ -705,7 +705,7 @@ protected void testReadOffice2007(String filename) throws IOException { // Icons : 3 stars (ext) - Column Q - // TODO Support EXT formattings + // TODO Support EXT formatting // Icons : 4 ratings - Column R @@ -744,7 +744,7 @@ protected void testReadOffice2007(String filename) throws IOException { // Mixed icons - Column U - // TODO Support EXT formattings + // TODO Support EXT formatting } } @@ -1231,7 +1231,7 @@ void testBug55380() throws IOException { } @Test - void testSetCellRangeAddresswithSingleRange() throws IOException { + void testSetCellRangeAddressWithSingleRange() throws IOException { try (Workbook wb = _testDataProvider.createWorkbook()) { final Sheet sheet = wb.createSheet("S1"); final SheetConditionalFormatting cf = sheet.getSheetConditionalFormatting(); diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestDataValidation.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestDataValidation.java index dc6302a5e55..35de26f9da9 100644 --- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestDataValidation.java +++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestDataValidation.java @@ -164,11 +164,11 @@ private static void writeDataValidationSettings(Sheet sheet, CellStyle style_1, } private static void writeOtherSettings(Sheet sheet, CellStyle style, - String strStettings) { + String strSettings) { Row row = sheet.getRow(sheet.getPhysicalNumberOfRows() - 1); Cell cell = row.createCell(5); cell.setCellStyle(style); - setCellValue(cell, strStettings); + setCellValue(cell, strSettings); } void addListValidation(String[] explicitListValues, String listFormula, String listValsDescr, diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestHyperlink.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestHyperlink.java index e5ef5312d9a..dfd19300a5b 100644 --- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestHyperlink.java +++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestHyperlink.java @@ -59,7 +59,7 @@ public final void testBasicTypes() throws IOException { cell = sheet.createRow(1).createCell((short) 0); cell.setCellValue("File Link"); link = createHelper.createHyperlink(HyperlinkType.FILE); - link.setAddress("hyperinks-beta4-dump.txt"); + link.setAddress("hyperlinks-beta4-dump.txt"); cell.setHyperlink(link); //e-mail link @@ -90,7 +90,7 @@ public final void testBasicTypes() throws IOException { assertEquals("https://poi.apache.org/", link.getAddress()); link = sheet.getRow(1).getCell(0).getHyperlink(); - assertEquals("hyperinks-beta4-dump.txt", link.getAddress()); + assertEquals("hyperlinks-beta4-dump.txt", link.getAddress()); link = sheet.getRow(2).getCell(0).getHyperlink(); assertEquals("mailto:poi@apache.org?subject=Hyperlinks", link.getAddress()); link = sheet.getRow(3).getCell(0).getHyperlink(); diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestNamedRange.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestNamedRange.java index cdc514f3abf..a82d2b02b38 100644 --- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestNamedRange.java +++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestNamedRange.java @@ -93,7 +93,7 @@ public final void testCreate() throws Exception { String[] invalidNames = {"", "123", "1Name", "Named Range"}; for (String name : invalidNames) { assertThrows(IllegalArgumentException.class, () -> name1.setNameName(name), - "should have thrown exceptiuon due to invalid name: " + name); + "should have thrown exception due to invalid name: " + name); } } } @@ -556,7 +556,7 @@ public final void testDeletedCell() throws Exception { // contrived example to expose bug: n.setRefersToFormula("if(A1,\"#REF!\", \"\")"); - assertFalse(n.isDeleted(), "Identified bug in recoginising formulas referring to deleted cells"); + assertFalse(n.isDeleted(), "Identified bug in recognising formulas referring to deleted cells"); wb.close(); } @@ -580,7 +580,7 @@ public final void testFunctionNames() throws Exception { } @Test - public final void testDefferedSetting() throws Exception { + public final void testDeferredSetting() throws Exception { try (Workbook wb = _testDataProvider.createWorkbook()) { Name n1 = wb.createName(); assertNull(n1.getRefersToFormula()); diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestSheet.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestSheet.java index 61aceb97cba..cd2af1e7bb5 100644 --- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestSheet.java +++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestSheet.java @@ -96,20 +96,20 @@ protected void createRow() throws IOException { assertEquals(3, sheet.getPhysicalNumberOfRows()); // Test overwriting an existing row - Row row2_ovrewritten = sheet.createRow(1); - Cell cell = row2_ovrewritten.createCell(0); + Row row2_overwritten = sheet.createRow(1); + Cell cell = row2_overwritten.createCell(0); cell.setCellValue(100); Iterator it2 = sheet.rowIterator(); assertTrue(it2.hasNext()); assertSame(row1, it2.next()); assertTrue(it2.hasNext()); - Row row2_ovrewritten_ref = it2.next(); - assertSame(row2_ovrewritten, row2_ovrewritten_ref); - assertEquals(100.0, row2_ovrewritten_ref.getCell(0).getNumericCellValue(), 0.0); + Row row2_overwritten_ref = it2.next(); + assertSame(row2_overwritten, row2_overwritten_ref); + assertEquals(100.0, row2_overwritten_ref.getCell(0).getNumericCellValue(), 0.0); Spliterator split2 = sheet.spliterator(); assertTrue(split2.tryAdvance(row -> assertSame(row1, row))); assertTrue(split2.tryAdvance(row -> { - assertSame(row2_ovrewritten, row); + assertSame(row2_overwritten, row); assertEquals(100.0, row.getCell(0).getNumericCellValue(), 0.0); })); } diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java index 35bb9fb4d71..3e048294dce 100644 --- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java +++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java @@ -184,7 +184,7 @@ void dateCells() throws Exception { assertEquals(sheet.getColumnWidth(6), sheet.getColumnWidth(5)); // date formatted as 'mmm/dd/yyyy' // YK: width of not-evaluated formulas that return data is not determined - // POI seems to conevert '0' to Excel date which is the beginng of the Excel's date system + // POI seems to convert '0' to Excel date which is the beginning of the Excel's date system // evaluate formulas and re-autosize evaluateWorkbook(workbook); @@ -274,13 +274,13 @@ void mergedCells() throws Exception { Cell cell0 = row.createCell(0); cell0.setCellValue("Apache Software Foundation"); - int defaulWidth = sheet.getColumnWidth(0); + int defaultWidth = sheet.getColumnWidth(0); sheet.autoSizeColumn(0); // column is unchanged if merged regions are ignored (Excel like behavior) - assertEquals(defaulWidth, sheet.getColumnWidth(0)); + assertEquals(defaultWidth, sheet.getColumnWidth(0)); sheet.autoSizeColumn(0, true); - assertTrue(sheet.getColumnWidth(0) > defaulWidth); + assertTrue(sheet.getColumnWidth(0) > defaultWidth); workbook.close(); } diff --git a/poi/src/test/java/org/apache/poi/ss/util/TestSheetUtil.java b/poi/src/test/java/org/apache/poi/ss/util/TestSheetUtil.java index 816db091a2d..288ded538d5 100644 --- a/poi/src/test/java/org/apache/poi/ss/util/TestSheetUtil.java +++ b/poi/src/test/java/org/apache/poi/ss/util/TestSheetUtil.java @@ -162,7 +162,7 @@ void testGetColumnWidthString() throws IOException { cell.setCellValue("sometext"); assertTrue(SheetUtil.getColumnWidth(sheet, 0, true) > 0, "Having some width for rows with actual cells"); - assertEquals(-1.0, SheetUtil.getColumnWidth(sheet, 0, true, 1, 2), 0.01, "Not having any widht for rows with all empty cells"); + assertEquals(-1.0, SheetUtil.getColumnWidth(sheet, 0, true, 1, 2), 0.01, "Not having any width for rows with all empty cells"); } } @@ -178,7 +178,7 @@ void testGetColumnWidthBlankCell() throws IOException { cell.setCellValue((String)null); assertEquals(-1, SheetUtil.getColumnWidth(sheet, 0, true), "Having some width for rows with actual cells"); - assertEquals(-1.0, SheetUtil.getColumnWidth(sheet, 0, true, 1, 2), 0.01, "Not having any widht for rows with all empty cells"); + assertEquals(-1.0, SheetUtil.getColumnWidth(sheet, 0, true, 1, 2), 0.01, "Not having any width for rows with all empty cells"); } } @@ -194,7 +194,7 @@ void testGetColumnWidthemptyString() throws IOException { cell.setCellValue(""); assertTrue(SheetUtil.getColumnWidth(sheet, 0, true) > 0, "Having some width for rows with actual cells"); - assertEquals(-1.0, SheetUtil.getColumnWidth(sheet, 0, true, 1, 2), 0.01, "Not having any widht for rows with all empty cells"); + assertEquals(-1.0, SheetUtil.getColumnWidth(sheet, 0, true, 1, 2), 0.01, "Not having any width for rows with all empty cells"); } } @@ -212,7 +212,7 @@ void testGetColumnWidthNullString() throws IOException { cell.setCellType(CellType.STRING); assertTrue(SheetUtil.getColumnWidth(sheet, 0, true) > 0, "Having some width for rows with actual cells"); - assertEquals(-1.0, SheetUtil.getColumnWidth(sheet, 0, true, 1, 2), 0.01, "Not having any widht for rows with all empty cells"); + assertEquals(-1.0, SheetUtil.getColumnWidth(sheet, 0, true, 1, 2), 0.01, "Not having any width for rows with all empty cells"); } } } diff --git a/poi/src/test/java/org/apache/poi/util/TestIOUtils.java b/poi/src/test/java/org/apache/poi/util/TestIOUtils.java index bb12f9932e4..c005a68aefa 100644 --- a/poi/src/test/java/org/apache/poi/util/TestIOUtils.java +++ b/poi/src/test/java/org/apache/poi/util/TestIOUtils.java @@ -274,7 +274,7 @@ void testCopyToInvalidFile() throws IOException { assertThrows(RuntimeException.class, () -> { // try with two different paths so we fail on both Unix and Windows - IOUtils.copy(is, new File("/notexisting/directory/structure")); + IOUtils.copy(is, new File("/nonexistent/directory/structure")); IOUtils.copy(is, new File("c:\\note&/()\"§=§%&!§$81§0_:;,.-'#*+~`?ß´ß0´ß9243xisting\\directory\\structure")); }); } diff --git a/test-data/diagram/visio_with_embeded.vsd b/test-data/diagram/visio_with_embedded.vsd similarity index 100% rename from test-data/diagram/visio_with_embeded.vsd rename to test-data/diagram/visio_with_embedded.vsd diff --git a/test-data/document/word_with_embeded.doc b/test-data/document/word_with_embedded.doc similarity index 100% rename from test-data/document/word_with_embeded.doc rename to test-data/document/word_with_embedded.doc diff --git a/test-data/document/word_with_embeded_ooxml.doc b/test-data/document/word_with_embedded_ooxml.doc similarity index 100% rename from test-data/document/word_with_embeded_ooxml.doc rename to test-data/document/word_with_embedded_ooxml.doc diff --git a/test-data/openxml4j/TestPackageCoreProperiesGetters.docx b/test-data/openxml4j/TestPackageCorePropertiesGetters.docx similarity index 100% rename from test-data/openxml4j/TestPackageCoreProperiesGetters.docx rename to test-data/openxml4j/TestPackageCorePropertiesGetters.docx diff --git a/test-data/openxml4j/TestPackageCoreProperiesSetters.docx b/test-data/openxml4j/TestPackageCorePropertiesSetters.docx similarity index 100% rename from test-data/openxml4j/TestPackageCoreProperiesSetters.docx rename to test-data/openxml4j/TestPackageCorePropertiesSetters.docx diff --git a/test-data/slideshow/bug57820-initTableNullRefrenceException.ppt b/test-data/slideshow/bug57820-initTableNullReferenceException.ppt similarity index 100% rename from test-data/slideshow/bug57820-initTableNullRefrenceException.ppt rename to test-data/slideshow/bug57820-initTableNullReferenceException.ppt diff --git a/test-data/slideshow/ppt_with_embeded.ppt b/test-data/slideshow/ppt_with_embedded.ppt similarity index 100% rename from test-data/slideshow/ppt_with_embeded.ppt rename to test-data/slideshow/ppt_with_embedded.ppt diff --git a/test-data/spreadsheet/excel_with_embeded.xls b/test-data/spreadsheet/excel_with_embedded.xls similarity index 100% rename from test-data/spreadsheet/excel_with_embeded.xls rename to test-data/spreadsheet/excel_with_embedded.xls