From 265d19861222898e5e6decbe88e598559d945333 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Tue, 3 Nov 2015 07:23:09 +0000 Subject: [PATCH] bug 58576: rename canComputeColumnWidht to canComputeColumnWidth git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1712219 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/ss/util/SheetUtil.java | 2 +- .../testcases/org/apache/poi/xssf/usermodel/TestXSSFFont.java | 4 ++-- .../org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java | 4 ++-- src/testcases/org/apache/poi/ss/util/TestSheetUtil.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/org/apache/poi/ss/util/SheetUtil.java b/src/java/org/apache/poi/ss/util/SheetUtil.java index 2c2633a3e..3916d5685 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 cbb66daf3..addaba2fb 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 4a14035f9..85ba6c9b1 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 5d94d3ea9..e1c788436 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(); }