From: Javen O'Neal Date: Tue, 3 Nov 2015 07:23:09 +0000 (+0000) Subject: bug 58576: rename canComputeColumnWidht to canComputeColumnWidth X-Git-Tag: REL_3_14_BETA1~156 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a586e413fbb21836c5c838b26be64d3a0f28790b;p=poi.git bug 58576: rename canComputeColumnWidht to canComputeColumnWidth git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712219 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/ss/util/SheetUtil.java b/src/java/org/apache/poi/ss/util/SheetUtil.java index 2c2633a3e1..3916d5685c 100644 --- a/src/java/org/apache/poi/ss/util/SheetUtil.java +++ b/src/java/org/apache/poi/ss/util/SheetUtil.java @@ -275,7 +275,7 @@ public class SheetUtil { * @param font The Font that is used in the Cell * @return true if computing the size for this Font will succeed, false otherwise */ - public static boolean canComputeColumnWidht(Font font) { + public static boolean canComputeColumnWidth(Font font) { // not sure what is the best value sample-here, only "1" did not work on some platforms... AttributedString str = new AttributedString("1w"); copyAttributes(font, str, 0, "1w".length()); diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFont.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFont.java index cbb66daf37..addaba2fbe 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFont.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFont.java @@ -299,7 +299,7 @@ public final class TestXSSFFont extends BaseTestFont{ Workbook wb = new XSSFWorkbook(); // cannot check on result because on some machines we get back false here! - SheetUtil.canComputeColumnWidht(wb.getFontAt((short)0)); + SheetUtil.canComputeColumnWidth(wb.getFontAt((short)0)); wb.close(); } @@ -310,6 +310,6 @@ public final class TestXSSFFont extends BaseTestFont{ font.setFontName("some non existing font name"); // Even with invalid fonts we still get back useful data most of the time... - SheetUtil.canComputeColumnWidht(font); + SheetUtil.canComputeColumnWidth(font); } } diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java index 4a14035f90..85ba6c9b1c 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java @@ -381,7 +381,7 @@ public abstract class BaseTestBugzillaIssues { // autoSize will fail if required fonts are not installed, skip this test then Font font = wb.getFontAt(cell0.getCellStyle().getFontIndex()); Assume.assumeTrue("Cannot verify autoSizeColumn() because the necessary Fonts are not installed on this machine: " + font, - SheetUtil.canComputeColumnWidht(font)); + SheetUtil.canComputeColumnWidth(font)); assertEquals("Expecting no indentation in this test", 0, cell0.getCellStyle().getIndention()); @@ -399,7 +399,7 @@ public abstract class BaseTestBugzillaIssues { double widthBeforeCol = SheetUtil.getColumnWidth(sheet, 0, false); String info = widthManual + "/" + widthBeforeCell + "/" + widthBeforeCol + "/" + - SheetUtil.canComputeColumnWidht(font) + "/" + computeCellWidthFixed(font, "1") + "/" + computeCellWidthFixed(font, "w") + "/" + + SheetUtil.canComputeColumnWidth(font) + "/" + computeCellWidthFixed(font, "1") + "/" + computeCellWidthFixed(font, "w") + "/" + computeCellWidthFixed(font, "1w") + "/" + computeCellWidthFixed(font, "0000") + "/" + computeCellWidthFixed(font, longValue); assertTrue("Expected to have cell width > 0 when computing manually, but had " + info, widthManual > 0); assertTrue("Expected to have cell width > 0 BEFORE auto-size, but had " + info, widthBeforeCell > 0); diff --git a/src/testcases/org/apache/poi/ss/util/TestSheetUtil.java b/src/testcases/org/apache/poi/ss/util/TestSheetUtil.java index 5d94d3ea99..e1c788436c 100644 --- a/src/testcases/org/apache/poi/ss/util/TestSheetUtil.java +++ b/src/testcases/org/apache/poi/ss/util/TestSheetUtil.java @@ -72,7 +72,7 @@ public final class TestSheetUtil extends TestCase { Workbook wb = new HSSFWorkbook(); // cannot check on result because on some machines we get back false here! - SheetUtil.canComputeColumnWidht(wb.getFontAt((short)0)); + SheetUtil.canComputeColumnWidth(wb.getFontAt((short)0)); wb.close(); }