diff options
author | rbuj <robert.buj@gmail.com> | 2014-09-09 16:15:58 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2014-09-09 18:34:11 +0000 |
commit | c346e0faa20845555e9392c1c8aaba7cf3508fdb (patch) | |
tree | e404e24d309a3cc116d4d84c8d20fb74c259f863 /xmerge | |
parent | df5c8887017fe5f5c1726211df3c48347e89e5f8 (diff) |
xmerge: use a character literal
Change-Id: I99168faf1ad346f4e18495c15b5bad79fd16818f
Reviewed-on: https://gerrit.libreoffice.org/11357
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'xmerge')
6 files changed, 11 insertions, 11 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java index 41fb07014a4c..0d61b1a60cc7 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java @@ -209,9 +209,9 @@ public class TextStyle extends Style implements Cloneable { else if (value.startsWith("0% ")) turnAttributesOff(SUPERSCRIPT | SUBSCRIPT); else { - String firstPart = value.substring(0, value.indexOf(" ")); + String firstPart = value.substring(0, value.indexOf(' ')); if (firstPart.endsWith("%")) { - firstPart = firstPart.substring(0, value.indexOf("%")); + firstPart = firstPart.substring(0, value.indexOf('%')); int amount; try { amount = Integer.parseInt(firstPart); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java index 1e319f4d7da3..48c84efe406e 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java @@ -170,9 +170,9 @@ public class CellStyle extends Style implements Cloneable { else if (value.startsWith("0% ")) fmt.setAttribute(Format.SUPERSCRIPT | Format.SUBSCRIPT, false); else { - String firstPart = value.substring(0, value.indexOf(" ")); + String firstPart = value.substring(0, value.indexOf(' ')); if (firstPart.endsWith("%")) { - firstPart = firstPart.substring(0, value.indexOf("%")); + firstPart = firstPart.substring(0, value.indexOf('%')); int amount; try { amount = Integer.parseInt(firstPart); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java index d2ce990d554b..bd33a30b3821 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java @@ -129,10 +129,10 @@ public class ColumnStyle extends Style implements Cloneable { int width = 255; // Default value if(value.indexOf("cm")!=-1) { - float widthCM = Float.parseFloat(value.substring(0,value.indexOf("c"))); + float widthCM = Float.parseFloat(value.substring(0,value.indexOf('c'))); width = TwipsConverter.cm2twips(widthCM); } else if(value.indexOf("inch")!=-1) { - float widthInch = Float.parseFloat(value.substring(0,value.indexOf("i"))); + float widthInch = Float.parseFloat(value.substring(0,value.indexOf('i'))); width = TwipsConverter.inches2twips(widthInch); } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java index 343a4df96cfd..e8cd0e08f298 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java @@ -128,10 +128,10 @@ public class RowStyle extends Style implements Cloneable { int height = 255; // Default value if(value.indexOf("cm")!=-1) { - float heightCM = Float.parseFloat(value.substring(0,value.indexOf("c"))); + float heightCM = Float.parseFloat(value.substring(0,value.indexOf('c'))); height = TwipsConverter.cm2twips(heightCM); } else if(value.indexOf("inch")!=-1) { - float heightInch = Float.parseFloat(value.substring(0,value.indexOf("i"))); + float heightInch = Float.parseFloat(value.substring(0,value.indexOf('i'))); height = TwipsConverter.inches2twips(heightInch); } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java index aa4e5c146256..c590f4e04983 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java @@ -879,7 +879,7 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, if (child.getNodeType() == Node.TEXT_NODE) { String s = child.getNodeValue(); - int k = s.lastIndexOf("."); + int k = s.lastIndexOf('.'); if (k > 0) { s = s.substring(k+1); decimals = s.length(); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java index 949565d5af88..c3433f2e8b2f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java @@ -51,14 +51,14 @@ public class OfficeUtil implements OfficeConstants { * Office text runs. There may be more runs in OO because * runs of 2 or more spaces map to nodes. */ - while ((text.indexOf(" ") != -1) || (text.indexOf("\t") != 1)) { + while ((text.indexOf(" ") != -1) || (text.indexOf('\t') != 1)) { /* * Find the indices of tabs and multiple spaces, and * figure out which of them occurs first in the string. */ int spaceIndex = text.indexOf(" "); - int tabIndex = text.indexOf("\t"); + int tabIndex = text.indexOf('\t'); if ((spaceIndex == -1) && (tabIndex == -1)) break; // DJP This should not be necessary. What is wrong // with the while() stmt up above? |