Skip to content

Commit

Permalink
Apply some spelling fixes from GitHub PR #480
Browse files Browse the repository at this point in the history
Some suggested changes are too invasive so we
can only pick some changes semi-automatically

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922678 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
centic9 committed Dec 25, 2024
1 parent b92a912 commit d7ca791
Show file tree
Hide file tree
Showing 32 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
// <xx xx yy yy zz zz zz zz <xx xx yy yy zz zz zz zz>>
// 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
// <xx xx yy yy zz zz zz zz dd dd dd dd dd dd dd>
// All lengths given exclude the 8 byte record header
// (Data records are known as Atoms)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="http://social.msdn.microsoft.com/Forums/mr-IN/os_binaryfile/thread/650888db-fabd-4b95-88dc-f0455f6e2d28">
* http://social.msdn.microsoft.com/Forums/mr-IN/os_binaryfile/thread/650888db-fabd-4b95-88dc-f0455f6e2d28</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public OEPlaceholderAtom(){
* Returns the placement Id.<p>
*
* 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.
Expand All @@ -110,7 +110,7 @@ public int getPlacementId(){
* Sets the placement Id.<p>
*
* 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
* What MSDN says about <code>OutlineTextRefAtom</code>:
* <p>
* 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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>
* The header consists of 2-byte signature, 2-byte type,
* 4-byte image size and 16-byte checksum of the image data.
* </p>
*
* @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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public abstract class HSLFShape implements Shape<HSLFShape,HSLFTextParagraph> {
private static final Logger LOG = PoiLogManager.getLogger(HSLFShape.class);

/**
* Either EscherSpContainer or EscheSpgrContainer record
* Either EscherSpContainer or EscherSpgrContainer record
* which holds information about this shape.
*/
private EscherContainerRecord _escherContainer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(){

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>
* For Slide we need to do the following:
* <ul>
Expand Down Expand Up @@ -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);
}

Expand All @@ -205,7 +205,7 @@ public HSLFTextBox addTitle() {
}


// Complex Accesser methods follow
// Complex Accessor methods follow

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public List<List<HSLFTextParagraph>> getTextParagraphs() {
}

/**
* Returns <code>null</code> since SlideMasters doen't have master sheet.
* Returns <code>null</code> since SlideMasters doesn't have master sheet.
*/
@Override
public HSLFMasterSheet getMasterSheet() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,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
// <xx xx yy yy zz zz zz zz <xx xx yy yy zz zz zz zz>>
// 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
// <xx xx yy yy zz zz zz zz dd dd dd dd dd dd dd>
// All lengths given exclude the 8 byte record header
// (Data records are known as Atoms)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ public List<HSLFHyperlink> 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 iit. this evaluator instance
dbgEvaluationOutputIndent = 1;
dbgEvaluationOutputForNextEval = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d7ca791

Please sign in to comment.