[Libreoffice-commits] core.git: xmerge/source
rbuj
robert.buj at gmail.com
Mon Sep 8 00:30:11 PDT 2014
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java | 3 --
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java | 14 +---------
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java | 6 +---
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java | 6 +---
4 files changed, 7 insertions(+), 22 deletions(-)
New commits:
commit fa52447b24a833849d0be79487822c036b44554d
Author: rbuj <robert.buj at gmail.com>
Date: Sun Sep 7 23:24:12 2014 +0200
xmerge: Integer & Boolean Parsing
Change-Id: I9553121a7faf10799c9d9a53336470cb2634c4ee
Reviewed-on: https://gerrit.libreoffice.org/11329
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java
index 2b1a48f..e96951a 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java
@@ -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);
}
}
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 bf6d2dc7..aa4e5c1 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
@@ -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;
}
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java
index f2689d1..8be248c 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java
@@ -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
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java
index b3bff5b..6aa6d25 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java
@@ -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
More information about the Libreoffice-commits
mailing list