Kaydet (Commit) fa52447b authored tarafından rbuj's avatar rbuj Kaydeden (comit) Noel Grandin

xmerge: Integer & Boolean Parsing

Change-Id: I9553121a7faf10799c9d9a53336470cb2634c4ee
Reviewed-on: https://gerrit.libreoffice.org/11329Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 889e27c1
......@@ -148,8 +148,7 @@ public class BookSettings implements OfficeConstants {
if(name.equals("ActiveTable")) {
activeSheet = value;
} else if(name.equals("HasColumnRowHeaders")) {
Boolean b = Boolean.valueOf(value);
hasColumnRowHeaders = b.booleanValue();
hasColumnRowHeaders = Boolean.parseBoolean(value);
}
}
......
......@@ -386,16 +386,10 @@ public abstract class SxcDocumentSerializer implements OfficeConstants,
// There is a number of rows repeated attribute:
if (rowsRepeatedNode != null) {
// Get the number of times the row is repeated
String rowsRepeatedString = rowsRepeatedNode.getNodeValue();
Integer rowsRepeatedInt = Integer.valueOf(rowsRepeatedString);
rowsRepeated = rowsRepeatedInt.intValue();
rowsRepeated = Integer.parseInt(rowsRepeatedString);
} else {
// The row is not repeated
rowsRepeated = 1;
}
......@@ -575,14 +569,10 @@ public abstract class SxcDocumentSerializer implements OfficeConstants,
// There is a number of cols repeated attribute
if (colsRepeatedNode != null) {
// Get the number of times the cell is repeated
String colsRepeatedString = colsRepeatedNode.getNodeValue();
Integer colsRepeatedInt = Integer.valueOf(colsRepeatedString);
colsRepeated = colsRepeatedInt.intValue();
colsRepeated = Integer.parseInt(colsRepeatedString);
} else {
// The cell is not repeated
colsRepeated = 1;
}
......
......@@ -118,12 +118,10 @@ public class IteratorRowCompare implements DiffAlgorithm {
int modRowNum = 1;
if (orgRowRepeated.length() > 0) {
orgRowNum =
Integer.valueOf(orgRowRepeated).intValue();
orgRowNum = Integer.parseInt(orgRowRepeated);
}
if (modRowRepeated.length() > 0) {
modRowNum =
Integer.valueOf(modRowRepeated).intValue();
modRowNum = Integer.parseInt(modRowRepeated);
}
// try to find out the common number of repeated Rows
......
......@@ -95,12 +95,10 @@ public final class PositionBaseRowMerge implements NodeMergeAlgorithm {
int modColNum = 1;
if (orgColRepeated.length() > 0) {
orgColNum =
Integer.valueOf(orgColRepeated).intValue();
orgColNum = Integer.parseInt(orgColRepeated);
}
if (modColRepeated.length() > 0) {
modColNum =
Integer.valueOf(modColRepeated).intValue();
modColNum = Integer.parseInt(modColRepeated);
}
// try to find out the common number of repeated cols
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment