aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2017-06-09 12:49:01 +0000
committerDominik Stadler <centic@apache.org>2017-06-09 12:49:01 +0000
commit902124a5fd2aadbe4d106c4a4efd907769984a05 (patch)
tree2e4fdb3626c01ed16cb113c33c22d86f60614f96 /src/java/org/apache
parent20ed0075e80fd3ed7534a768f3b0ec9f942497d6 (diff)
downloadpoi-902124a5fd2aadbe4d106c4a4efd907769984a05.tar.gz
poi-902124a5fd2aadbe4d106c4a4efd907769984a05.zip
Move one testcase with incorrect source location
remove some junit dependencies in example-code build: do not pass junit-jar to normal compile targets to avoid introducing it as dependency again Reformat code, fix warnings, ... git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798202 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/poi/ss/util/SheetUtil.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/java/org/apache/poi/ss/util/SheetUtil.java b/src/java/org/apache/poi/ss/util/SheetUtil.java
index 98c307f3ee..6dd27b40fd 100644
--- a/src/java/org/apache/poi/ss/util/SheetUtil.java
+++ b/src/java/org/apache/poi/ss/util/SheetUtil.java
@@ -91,6 +91,7 @@ public class SheetUtil {
public void evaluateAll() {}
@Override
public int evaluateFormulaCell(Cell cell) {
+ //noinspection deprecation
return cell.getCachedFormulaResultType();
}
/**
@@ -157,9 +158,9 @@ public class SheetUtil {
AttributedString str = new AttributedString(txt);
copyAttributes(font, str, 0, txt.length());
- if (rt.numFormattingRuns() > 0) {
+ /*if (rt.numFormattingRuns() > 0) {
// TODO: support rich text fragments
- }
+ }*/
width = getCellWidth(defaultCharWidth, colspan, style, width, str);
}
@@ -329,7 +330,7 @@ public class SheetUtil {
/**
* Copy text attributes from the supplied Font to Java2D AttributedString
*/
- private static void copyAttributes(Font font, AttributedString str, int startIdx, int endIdx) {
+ private static void copyAttributes(Font font, AttributedString str, @SuppressWarnings("SameParameterValue") int startIdx, int endIdx) {
str.addAttribute(TextAttribute.FAMILY, font.getFontName(), startIdx, endIdx);
str.addAttribute(TextAttribute.SIZE, (float)font.getFontHeightInPoints());
if (font.getBold()) str.addAttribute(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD, startIdx, endIdx);
@@ -360,9 +361,9 @@ public class SheetUtil {
* Use this where you want to know if the given cell is explicitly defined
* or not.
*
- * @param sheet
- * @param rowIx
- * @param colIx
+ * @param sheet The workbook sheet to look at.
+ * @param rowIx The 0-based index of the row.
+ * @param colIx The 0-based index of the cell.
* @return cell at the given location, or null if not defined
* @throws NullPointerException if sheet is null
*/
@@ -384,10 +385,10 @@ public class SheetUtil {
* then will return the cell itself.
* <p>If there is no cell defined at the given co-ordinates, will return
* null.
- *
- * @param sheet
- * @param rowIx
- * @param colIx
+ *
+ * @param sheet The workbook sheet to look at.
+ * @param rowIx The 0-based index of the row.
+ * @param colIx The 0-based index of the cell.
* @return cell at the given location, its base merged cell, or null if not defined
* @throws NullPointerException if sheet is null
*/