replace some uses of StringBuffer with StringBuilder

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1870046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2019-11-20 08:42:27 +00:00
parent 948b0e8f08
commit 96bf53f3fc
194 changed files with 217 additions and 218 deletions

View File

@ -220,7 +220,7 @@ public class InCellLists {
buffer.append(listItem);
buffer.append("\n");
}
// The StringBuffer's contents are the source for the contents
// The StringBuilder's contents are the source for the contents
// of the cell.
cell.setCellValue(new HSSFRichTextString(buffer.toString().trim()));
cell.setCellStyle(wrapStyle);
@ -260,7 +260,7 @@ public class InCellLists {
buffer.append("\n");
itemNumber += increment;
}
// The StringBuffer's contents are the source for the contents
// The StringBuilder's contents are the source for the contents
// of the cell.
cell.setCellValue(new HSSFRichTextString(buffer.toString().trim()));
cell.setCellStyle(wrapStyle);
@ -292,7 +292,7 @@ public class InCellLists {
buffer.append(listItem);
buffer.append("\n");
}
// The StringBuffer's contents are the source for the contents
// The StringBuilder's contents are the source for the contents
// of the cell.
cell.setCellValue(new HSSFRichTextString(buffer.toString().trim()));
cell.setCellStyle(wrapStyle);
@ -338,7 +338,7 @@ public class InCellLists {
}
}
}
// The StringBuffer's contents are the source for the contents
// The StringBuilder's contents are the source for the contents
// of the cell.
cell.setCellValue(new HSSFRichTextString(buffer.toString().trim()));
cell.setCellStyle(wrapStyle);
@ -409,7 +409,7 @@ public class InCellLists {
}
highLevelItemNumber += highLevelIncrement;
}
// The StringBuffer's contents are the source for the contents
// The StringBuilder's contents are the source for the contents
// of the cell.
cell.setCellValue(new HSSFRichTextString(buffer.toString().trim()));
cell.setCellStyle(wrapStyle);
@ -459,7 +459,7 @@ public class InCellLists {
}
}
}
// The StringBuffer's contents are the source for the contents
// The StringBuilder's contents are the source for the contents
// of the cell.
cell.setCellValue(new HSSFRichTextString(buffer.toString().trim()));
cell.setCellStyle(wrapStyle);

View File

@ -140,9 +140,9 @@ public class SVFractionalFormat extends Format {
break;
}
Precision = AllowedError / Diff;
// This calcualtion of Precision does not always provide results within
// This calculation of Precision does not always provide results within
// Allowed Error. It compensates for loss of significant digits that occurs.
// It helps to round the inprecise reciprocal values to i.
// It helps to round the imprecise reciprocal values to i.
B = A;
A = Num;
}
@ -161,7 +161,7 @@ public class SVFractionalFormat extends Format {
Whole = -Whole;
}
}
return new StringBuffer().append(Whole).append(" ").append(Num).append("/").append(Den).toString();
return new StringBuilder().append(Whole).append(" ").append(Num).append("/").append(Den).toString();
}
/** This method formats the double in the units specified.
@ -173,7 +173,7 @@ public class SVFractionalFormat extends Format {
f -= Whole;
long Num = Math.round(f * units);
return new StringBuffer().append(Whole).append(" ").append(Num).append("/").append(units).toString();
return new StringBuilder().append(Whole).append(" ").append(Num).append("/").append(units).toString();
}
public final String format(double val) {

View File

@ -428,10 +428,9 @@ public class ToCSV {
* @throws java.io.IOException Thrown to indicate and error occurred in the
* underylying file system.
*/
private void saveCSVFile(File file)
throws FileNotFoundException, IOException {
private void saveCSVFile(File file) throws FileNotFoundException, IOException {
ArrayList<String> line;
StringBuffer buffer;
StringBuilder buffer;
String csvLineElement;
// Open a writer onto the CSV file.
@ -443,20 +442,20 @@ public class ToCSV {
// all of the data recovered from the Excel workbooks' sheets, rows
// and cells.
for(int i = 0; i < this.csvData.size(); i++) {
buffer = new StringBuffer();
buffer = new StringBuilder();
// Get an element from the ArrayList that contains the data for
// the workbook. This element will itself be an ArrayList
// containing Strings and each String will hold the data recovered
// from a single cell. The for() loop is used to recover elements
// from this 'row' ArrayList one at a time and to write the Strings
// away to a StringBuffer thus assembling a single line for inclusion
// away to a StringBuilder thus assembling a single line for inclusion
// in the CSV file. If a row was empty or if it was short, then
// the ArrayList that contains it's data will also be shorter than
// some of the others. Therefore, it is necessary to check within
// the for loop to ensure that the ArrayList contains data to be
// processed. If it does, then an element will be recovered and
// appended to the StringBuffer.
// appended to the StringBuilder.
line = this.csvData.get(i);
for(int j = 0; j < this.maxRowWidth; j++) {
if(line.size() > j) {
@ -572,7 +571,7 @@ public class ToCSV {
* speech mark characters correctly escaped.
*/
private String escapeEmbeddedCharacters(String field) {
StringBuffer buffer;
StringBuilder buffer;
// If the fields contents should be formatted to confrom with Excel's
// convention....
@ -584,7 +583,7 @@ public class ToCSV {
// set of speech marks. Thus, "Yes" he said would become
// """Yes"" he said"
if(field.contains("\"")) {
buffer = new StringBuffer(field.replaceAll("\"", "\\\"\\\""));
buffer = new StringBuilder(field.replaceAll("\"", "\\\"\\\""));
buffer.insert(0, "\"");
buffer.append("\"");
}
@ -592,7 +591,7 @@ public class ToCSV {
// If the field contains either embedded separator or EOL
// characters, then escape the whole field by surrounding it
// with speech marks.
buffer = new StringBuffer(field);
buffer = new StringBuilder(field);
if((buffer.indexOf(this.separator)) > -1 ||
(buffer.indexOf("\n")) > -1) {
buffer.insert(0, "\"");

View File

@ -84,7 +84,7 @@ public abstract class AbstractEscherHolderRecord extends Record implements Clone
@Override
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
final String nl = System.getProperty("line.separator");
buffer.append('[' + getRecordName() + ']' + nl);

View File

@ -79,7 +79,7 @@ public final class ArrayRecord extends SharedValueRecordBase implements Cloneabl
}
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append(getClass().getName()).append(" [ARRAY]\n");
sb.append(" range=").append(getRange()).append("\n");
sb.append(" options=").append(HexDump.shortToHex(_options)).append("\n");

View File

@ -68,7 +68,7 @@ public final class AutoFilterInfoRecord extends StandardRecord implements Clonea
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[AUTOFILTERINFO]\n");
buffer.append(" .numEntries = ")

View File

@ -225,7 +225,7 @@ public final class BOFRecord extends StandardRecord implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[BOF RECORD]\n");
buffer.append(" .version = ").append(HexDump.shortToHex(getVersion())).append("\n");

View File

@ -69,7 +69,7 @@ public final class BackupRecord
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[BACKUP]\n");
buffer.append(" .backup = ")

View File

@ -117,7 +117,7 @@ public final class BlankRecord extends StandardRecord implements CellValueRecord
public String toString()
{
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("[BLANK]\n");
sb.append(" row= ").append(HexDump.shortToHex(getRow())).append("\n");

View File

@ -69,7 +69,7 @@ public final class BookBoolRecord
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[BOOKBOOL]\n");
buffer.append(" .savelinkvalues = ")

View File

@ -41,7 +41,7 @@ public final class BottomMarginRecord extends StandardRecord implements Margin,
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append( "[BottomMargin]\n" );
buffer.append( " .margin = " )
.append( " (" ).append( getMargin() ).append( " )\n" );

View File

@ -122,7 +122,7 @@ public final class BoundSheetRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[BOUNDSHEET]\n");
buffer.append(" .bof = ").append(HexDump.intToHex(getPositionOfBof())).append("\n");

View File

@ -136,7 +136,7 @@ public final class CFRuleRecord extends CFRuleBase implements Cloneable {
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[CFRULE]\n");
buffer.append(" .condition_type =").append(getConditionType()).append("\n");
buffer.append(" OPTION FLAGS=0x").append(Integer.toHexString(getOptions())).append("\n");

View File

@ -55,7 +55,7 @@ public final class CRNCountRecord extends StandardRecord {
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append(getClass().getName()).append(" [XCT");
sb.append(" nCRNs=").append(field_1_number_crn_records);
sb.append(" sheetIx=").append(field_2_sheet_table_index);

View File

@ -52,7 +52,7 @@ public final class CRNRecord extends StandardRecord {
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append(getClass().getName()).append(" [CRN");
sb.append(" rowIx=").append(field_3_row_index);
sb.append(" firstColIx=").append(field_2_first_column_index);

View File

@ -68,7 +68,7 @@ public final class CalcCountRecord extends StandardRecord implements Cloneable {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[CALCCOUNT]\n");
buffer.append(" .iterations = ")

View File

@ -96,7 +96,7 @@ public final class CalcModeRecord extends StandardRecord implements Cloneable {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[CALCMODE]\n");
buffer.append(" .calcmode = ")

View File

@ -79,7 +79,7 @@ public final class CodepageRecord
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[CODEPAGE]\n");
buffer.append(" .codepage = ")

View File

@ -95,7 +95,7 @@ public final class CommonObjectDataSubRecord extends SubRecord implements Clonea
@Override
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[ftCmo]\n");
buffer.append(" .objectType = ")

View File

@ -53,7 +53,7 @@ public final class ContinueRecord extends StandardRecord implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[CONTINUE RECORD]\n");
buffer.append(" .data = ").append(HexDump.toHex(_data)).append("\n");

View File

@ -96,7 +96,7 @@ public final class CountryRecord
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[COUNTRY]\n");
buffer.append(" .defaultcountry = ")

View File

@ -77,7 +77,7 @@ public final class DBCellRecord extends StandardRecord implements Cloneable {
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[DBCELL]\n");
buffer.append(" .rowoffset = ").append(HexDump.intToHex(field_1_row_offset)).append("\n");

View File

@ -52,7 +52,7 @@ public final class DSFRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[DSF]\n");
buffer.append(" .options = ").append(HexDump.shortToHex(_options)).append("\n");

View File

@ -129,7 +129,7 @@ public final class DVALRecord extends StandardRecord implements Cloneable {
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[DVAL]\n");
buffer.append(" .options = ").append(getOptions()).append('\n');

View File

@ -240,7 +240,7 @@ public final class DVRecord extends StandardRecord implements Cloneable {
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("[DV]\n");
sb.append(" options=").append(Integer.toHexString(_option_flags));
sb.append(" title-prompt=").append(formatTextTitle(_promptTitle));
@ -274,7 +274,7 @@ public final class DVRecord extends StandardRecord implements Cloneable {
return str;
}
private static void appendFormula(StringBuffer sb, String label, Formula f) {
private static void appendFormula(StringBuilder sb, String label, Formula f) {
sb.append(label);
if (f == null) {

View File

@ -67,7 +67,7 @@ public final class DateWindow1904Record
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[1904]\n");
buffer.append(" .is1904 = ")

View File

@ -69,7 +69,7 @@ public final class DefaultColWidthRecord extends StandardRecord implements Clone
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[DEFAULTCOLWIDTH]\n");
buffer.append(" .colwidth = ")

View File

@ -95,7 +95,7 @@ public final class DefaultRowHeightRecord extends StandardRecord implements Clon
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[DEFAULTROWHEIGHT]\n");
buffer.append(" .optionflags = ")

View File

@ -49,7 +49,7 @@ public final class DeltaRecord extends StandardRecord implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[DELTA]\n");
buffer.append(" .maxchange = ").append(getMaxChange()).append("\n");

View File

@ -144,7 +144,7 @@ public final class DimensionsRecord extends StandardRecord implements Cloneable
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[DIMENSIONS]\n");
buffer.append(" .firstrow = ")

View File

@ -57,7 +57,7 @@ public final class DrawingSelectionRecord extends StandardRecord implements Clon
}
public String debugFormatAsString() {
StringBuffer sb = new StringBuffer(32);
StringBuilder sb = new StringBuilder(32);
sb.append("ver+inst=").append(HexDump.shortToHex(_verAndInstance));
sb.append(" type=").append(HexDump.shortToHex(_type));
sb.append(" len=").append(HexDump.intToHex(_length));
@ -115,7 +115,7 @@ public final class DrawingSelectionRecord extends StandardRecord implements Clon
}
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("[MSODRAWINGSELECTION]\n");
sb.append(" .rh =(").append(_header.debugFormatAsString()).append(")\n");

View File

@ -48,7 +48,7 @@ public final class EOFRecord extends StandardRecord implements Cloneable {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[EOF]\n");
buffer.append("[/EOF]\n");

View File

@ -315,7 +315,7 @@ public final class EmbeddedObjectRefSubRecord extends SubRecord implements Clone
}
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("[ftPictFmla]\n");
sb.append(" .f2unknown = ").append(HexDump.intToHex(field_1_unknown_int)).append("\n");
if (field_2_refPtg == null) {

View File

@ -53,7 +53,7 @@ public final class EndSubRecord extends SubRecord implements Cloneable {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[ftEnd]\n");

View File

@ -111,7 +111,7 @@ public final class ExtSSTRecord extends ContinuableRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[EXTSST]\n");
buffer.append(" .dsst = ")

View File

@ -70,7 +70,7 @@ public class ExternSheetRecord extends StandardRecord {
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("extBook=").append(_extBookIndex);
buffer.append(" firstSheet=").append(_firstSheetIndex);
buffer.append(" lastSheet=").append(_lastSheetIndex);
@ -127,7 +127,7 @@ public class ExternSheetRecord extends StandardRecord {
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
int nItems = _list.size();
sb.append("[EXTERNSHEET]\n");
sb.append(" numOfRefs = ").append(nItems).append("\n");

View File

@ -84,7 +84,7 @@ public final class FeatHdrRecord extends StandardRecord implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[FEATURE HEADER]\n");
// TODO ...

View File

@ -101,7 +101,7 @@ public final class FeatRecord extends StandardRecord implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[SHARED FEATURE]\n");
// TODO ...

View File

@ -100,7 +100,7 @@ public final class FileSharingRecord extends StandardRecord implements Cloneable
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[FILESHARING]\n");
buffer.append(" .readonly = ")

View File

@ -75,7 +75,7 @@ public final class FnGroupCountRecord
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[FNGROUPCOUNT]\n");
buffer.append(" .count = ").append(getCount())

View File

@ -359,7 +359,7 @@ public final class FontRecord extends StandardRecord {
}
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("[FONT]\n");
sb.append(" .fontheight = ").append(HexDump.shortToHex(getFontHeight())).append("\n");

View File

@ -34,7 +34,7 @@ public final class FooterRecord extends HeaderFooterBase implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[FOOTER]\n");
buffer.append(" .footer = ").append(getText()).append("\n");

View File

@ -84,7 +84,7 @@ public final class FormatRecord extends StandardRecord implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[FORMAT]\n");
buffer.append(" .indexcode = ").append(HexDump.shortToHex(getIndexCode())).append("\n");

View File

@ -60,7 +60,7 @@ public final class FtCblsSubRecord extends SubRecord implements Cloneable {
*/
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[FtCbls ]").append("\n");
buffer.append(" size = ").append(getDataSize()).append("\n");

View File

@ -67,7 +67,7 @@ public final class FtCfSubRecord extends SubRecord implements Cloneable {
* Used by BiffViewer and other utilities.
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[FtCf ]\n");
buffer.append(" size = ").append(length).append("\n");
buffer.append(" flags = ").append(HexDump.toHex(flags)).append("\n");

View File

@ -121,7 +121,7 @@ public final class FtPioGrbitSubRecord extends SubRecord implements Cloneable {
* Used by BiffViewer and other utilities.
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[FtPioGrbit ]\n");
buffer.append(" size = ").append(length).append("\n");
buffer.append(" flags = ").append(HexDump.toHex(flags)).append("\n");

View File

@ -49,7 +49,7 @@ public final class GroupMarkerSubRecord extends SubRecord implements Cloneable {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
String nl = System.getProperty("line.separator");
buffer.append("[ftGmo]" + nl);

View File

@ -139,7 +139,7 @@ public final class GutsRecord extends StandardRecord implements Cloneable {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[GUTS]\n");
buffer.append(" .leftgutter = ")

View File

@ -37,7 +37,7 @@ public final class HeaderRecord extends HeaderFooterBase implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[HEADER]\n");
buffer.append(" .header = ").append(getText()).append("\n");

View File

@ -77,7 +77,7 @@ public final class HideObjRecord
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[HIDEOBJ]\n");
buffer.append(" .hideobj = ")

View File

@ -676,7 +676,7 @@ public final class HyperlinkRecord extends StandardRecord implements Cloneable {
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[HYPERLINK RECORD]\n");
buffer.append(" .range = ").append(_range.formatAsString()).append("\n");

View File

@ -107,7 +107,7 @@ public final class IndexRecord extends StandardRecord implements Cloneable {
@Override
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[INDEX]\n");
buffer.append(" .firstrow = ")

View File

@ -44,7 +44,7 @@ public final class InterfaceHdrRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[INTERFACEHDR]\n");
buffer.append(" .codepage = ").append(HexDump.shortToHex(_codepage)).append("\n");

View File

@ -64,7 +64,7 @@ public final class IterationRecord extends StandardRecord implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[ITERATION]\n");
buffer.append(" .flags = ").append(HexDump.shortToHex(_flags)).append("\n");

View File

@ -145,7 +145,7 @@ public final class LabelRecord extends Record implements CellValueRecordInterfac
@Override
public String toString()
{
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("[LABEL]\n");
sb.append(" .row = ").append(HexDump.shortToHex(getRow())).append("\n");
sb.append(" .column = ").append(HexDump.shortToHex(getColumn())).append("\n");

View File

@ -266,7 +266,7 @@ public class LbsDataSubRecord extends SubRecord {
@Override
public String toString() {
StringBuffer sb = new StringBuffer(256);
StringBuilder sb = new StringBuilder(256);
sb.append("[ftLbsData]\n");
sb.append(" .unknownShort1 =").append(HexDump.shortToHex(_cbFContinued)).append("\n");
@ -404,7 +404,7 @@ public class LbsDataSubRecord extends SubRecord {
@Override
public String toString(){
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("[LbsDropData]\n");
sb.append(" ._wStyle: ").append(_wStyle).append('\n');
sb.append(" ._cLine: ").append(_cLine).append('\n');

View File

@ -35,7 +35,7 @@ public final class LeftMarginRecord extends StandardRecord implements Margin, Cl
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append( "[LeftMargin]\n" );
buffer.append( " .margin = " ).append( " (" ).append( getMargin() ).append( " )\n" );
buffer.append( "[/LeftMargin]\n" );

View File

@ -93,7 +93,7 @@ public final class MMSRecord
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[MMS]\n");
buffer.append(" .addMenu = ")

View File

@ -100,7 +100,7 @@ public final class MulBlankRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[MULBLANK]\n");
buffer.append("row = ").append(Integer.toHexString(getRow())).append("\n");

View File

@ -102,7 +102,7 @@ public final class MulRKRecord extends StandardRecord {
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[MULRK]\n");
buffer.append(" .row = ").append(HexDump.shortToHex(getRow())).append("\n");

View File

@ -112,7 +112,7 @@ public final class NameCommentRecord extends StandardRecord {
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
final StringBuilder sb = new StringBuilder();
sb.append("[NAMECMT]\n");
sb.append(" .record type = ").append(HexDump.shortToHex(field_1_record_type)).append("\n");

View File

@ -125,7 +125,7 @@ public final class NoteRecord extends StandardRecord implements Cloneable {
* Used by BiffViewer and other utilities.
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[NOTE]\n");
buffer.append(" .row = ").append(field_1_row).append("\n");

View File

@ -68,7 +68,7 @@ public final class NoteStructureSubRecord extends SubRecord implements Cloneable
@Override
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[ftNts ]").append("\n");
buffer.append(" size = ").append(getDataSize()).append("\n");

View File

@ -135,7 +135,7 @@ public final class ObjRecord extends Record implements Cloneable {
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("[OBJ]\n");
if(subrecords != null) { // there are special cases where this can be, see comments in constructor above

View File

@ -73,7 +73,7 @@ public final class ObjectProtectRecord extends StandardRecord implements Cloneab
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[SCENARIOPROTECT]\n");
buffer.append(" .protect = ").append(getProtect())

View File

@ -74,7 +74,7 @@ public final class OldSheetRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[BOUNDSHEET]\n");
buffer.append(" .bof = ").append(HexDump.intToHex(getPositionOfBof())).append("\n");

View File

@ -92,7 +92,7 @@ public final class OldStringRecord {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[OLD STRING]\n");
buffer.append(" .string = ")

View File

@ -54,7 +54,7 @@ public final class PaletteRecord extends StandardRecord {
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[PALETTE]\n");
buffer.append(" numcolors = ").append(_colors.size()).append('\n');
@ -233,7 +233,7 @@ public final class PaletteRecord extends StandardRecord {
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append(" red = ").append(_red & 0xff).append('\n');
buffer.append(" green = ").append(_green & 0xff).append('\n');
buffer.append(" blue = ").append(_blue & 0xff).append('\n');

View File

@ -54,7 +54,7 @@ public final class PaneRecord extends StandardRecord {
@Override
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[PANE]\n");
buffer.append(" .x = ")

View File

@ -57,7 +57,7 @@ public final class PasswordRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[PASSWORD]\n");
buffer.append(" .password = ").append(HexDump.shortToHex(field_1_password)).append("\n");

View File

@ -47,7 +47,7 @@ public final class PasswordRev4Record extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[PROT4REVPASSWORD]\n");
buffer.append(" .password = ").append(HexDump.shortToHex(field_1_password)).append("\n");

View File

@ -279,7 +279,7 @@ public final class PrintSetupRecord extends StandardRecord {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[PRINTSETUP]\n");
buffer.append(" .papersize = ").append(getPaperSize())

View File

@ -66,7 +66,7 @@ public final class ProtectRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[PROTECT]\n");
buffer.append(" .options = ").append(HexDump.shortToHex(_options)).append("\n");

View File

@ -64,7 +64,7 @@ public final class ProtectionRev4Record extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[PROT4REV]\n");
buffer.append(" .options = ").append(HexDump.shortToHex(_options)).append("\n");

View File

@ -68,7 +68,7 @@ public final class RecalcIdRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[RECALCID]\n");
buffer.append(" .reserved = ").append(HexDump.shortToHex(_reserved0)).append("\n");

View File

@ -74,7 +74,7 @@ public final class RefModeRecord
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[REFMODE]\n");
buffer.append(" .mode = ")

View File

@ -65,7 +65,7 @@ public final class RefreshAllRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[REFRESHALL]\n");
buffer.append(" .options = ").append(HexDump.shortToHex(_options)).append("\n");

View File

@ -35,7 +35,7 @@ public final class RightMarginRecord extends StandardRecord implements Margin {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append( "[RightMargin]\n" );
buffer.append( " .margin = " ).append( " (" ).append( getMargin() ).append( " )\n" );
buffer.append( "[/RightMargin]\n" );

View File

@ -366,7 +366,7 @@ public final class RowRecord extends StandardRecord {
}
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("[ROW]\n");
sb.append(" .rownumber = ").append(Integer.toHexString(getRowNumber()))

View File

@ -44,7 +44,7 @@ public final class SCLRecord extends StandardRecord {
@Override
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[SCL]\n");
buffer.append(" .numerator = ")

View File

@ -76,7 +76,7 @@ public final class ScenarioProtectRecord
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[SCENARIOPROTECT]\n");
buffer.append(" .protect = ").append(getProtect())

View File

@ -52,7 +52,7 @@ public final class TabIdRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[TABID]\n");
buffer.append(" .elements = ").append(_tabids.length).append("\n");

View File

@ -76,7 +76,7 @@ public final class TableStylesRecord extends StandardRecord {
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[TABLESTYLES]\n");
buffer.append(" .rt =").append(HexDump.shortToHex(rt)).append('\n');

View File

@ -38,7 +38,7 @@ public final class TopMarginRecord extends StandardRecord implements Margin {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append( "[TopMargin]\n" );
buffer.append( " .margin = " ).append( " (" ).append( getMargin() ).append( " )\n" );
buffer.append( "[/TopMargin]\n" );

View File

@ -45,7 +45,7 @@ public final class UncalcedRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[UNCALCED]\n");
buffer.append(" _reserved: ").append(_reserved).append('\n');
buffer.append("[/UNCALCED]\n");

View File

@ -49,7 +49,7 @@ public final class UseSelFSRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[USESELFS]\n");
buffer.append(" .options = ").append(HexDump.shortToHex(_options)).append("\n");

View File

@ -63,7 +63,7 @@ public final class VCenterRecord extends StandardRecord {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[VCENTER]\n");
buffer.append(" .vcenter = ").append(getVCenter())

View File

@ -65,7 +65,7 @@ public final class WindowProtectRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[WINDOWPROTECT]\n");
buffer.append(" .options = ").append(HexDump.shortToHex(_options)).append("\n");

View File

@ -117,7 +117,7 @@ public final class WriteAccessRecord extends StandardRecord {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[WRITEACCESS]\n");
buffer.append(" .name = ").append(field_1_username).append("\n");

View File

@ -44,7 +44,7 @@ public final class WriteProtectRecord extends StandardRecord {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[WRITEPROTECT]\n");
buffer.append("[/WRITEPROTECT]\n");

View File

@ -430,7 +430,7 @@ public final class BorderFormatting implements Cloneable {
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append(" [Border Formatting]\n");
buffer.append(" .lftln = ").append(Integer.toHexString(getBorderLeft())).append("\n");
buffer.append(" .rgtln = ").append(Integer.toHexString(getBorderRight())).append("\n");

View File

@ -119,7 +119,7 @@ public final class ColorGradientFormatting implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append(" [Color Gradient Formatting]\n");
buffer.append(" .clamp = ").append(isClampToCurve()).append("\n");
buffer.append(" .background= ").append(isAppliesToBackground()).append("\n");

View File

@ -119,7 +119,7 @@ public final class DataBarFormatting implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append(" [Data Bar Formatting]\n");
buffer.append(" .icon_only= ").append(isIconOnly()).append("\n");
buffer.append(" .reversed = ").append(isReversed()).append("\n");

View File

@ -97,7 +97,7 @@ public final class IconMultiStateFormatting implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append(" [Icon Formatting]\n");
buffer.append(" .icon_set = ").append(iconSet).append("\n");
buffer.append(" .icon_only= ").append(isIconOnly()).append("\n");

View File

@ -156,7 +156,7 @@ public final class PatternFormatting implements Cloneable {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append(" [Pattern Formatting]\n");
buffer.append(" .fillpattern= ").append(Integer.toHexString(getFillPattern())).append("\n");
buffer.append(" .fgcoloridx= ").append(Integer.toHexString(getFillForegroundColor())).append("\n");

View File

@ -102,7 +102,7 @@ public abstract class Threshold {
}
public String toString() {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append(" [CF Threshold]\n");
buffer.append(" .type = ").append(Integer.toHexString(type)).append("\n");
buffer.append(" .formula = ").append(Arrays.toString(formula.getTokens())).append("\n");

View File

@ -61,7 +61,7 @@ public final class AreaFormatRecord extends StandardRecord implements Cloneable
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[AREAFORMAT]\n");
buffer.append(" .foregroundColor = ")

View File

@ -50,7 +50,7 @@ public final class AreaRecord extends StandardRecord implements Cloneable {
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[AREA]\n");
buffer.append(" .formatFlags = ")

View File

@ -48,7 +48,7 @@ public final class AxisLineFormatRecord extends StandardRecord implements Clonea
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[AXISLINEFORMAT]\n");
buffer.append(" .axisType = ")

View File

@ -72,7 +72,7 @@ public final class AxisOptionsRecord extends StandardRecord implements Cloneable
public String toString()
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("[AXCEXT]\n");
buffer.append(" .minimumCategory = ")

Some files were not shown because too many files have changed in this diff Show More