[Libreoffice-commits] core.git: xmerge/source

rbuj robert.buj at gmail.com
Sun Jul 27 23:43:22 PDT 2014


 xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java                |    5 --
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java |   19 ++--------
 2 files changed, 6 insertions(+), 18 deletions(-)

New commits:
commit a8df51771d01903cbb06913f9bfa6ceb2b020d42
Author: rbuj <robert.buj at gmail.com>
Date:   Sun Jul 27 11:44:47 2014 +0200

    xmerge: If statement is redundant
    
    Change-Id: Ic36d66e376f6fca536a25db4b3b69b50e2b95ae2
    Reviewed-on: https://gerrit.libreoffice.org/10570
    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/ConverterFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java
index 7003779..1b4c0d1 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java
@@ -55,10 +55,7 @@ public class ConverterFactory {
         else
             foundInfo = ConverterInfoMgr.findConverterInfo(mimeTypeOut, mimeTypeIn);
 
-        if (foundInfo != null)
-            return true;
-        else
-            return false;
+        return foundInfo != null;
     }
 
 
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java
index 985bee0..b02efb6 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java
@@ -143,10 +143,7 @@ public class ColumnRowInfo {
      */
     public boolean isRow() {
 
-        if(type==ROW)
-            return true;
-        else
-            return false;
+        return type==ROW;
     }
 
     /**
@@ -156,10 +153,7 @@ public class ColumnRowInfo {
      */
     public boolean isColumn() {
 
-        if(type==COLUMN)
-            return true;
-        else
-            return false;
+        return type==COLUMN;
     }
 
     /**
@@ -179,11 +173,8 @@ public class ColumnRowInfo {
      */
     public boolean isDefaultSize() {
 
-        if( type==ROW &&
-            dimension>DEFAULTROWSIZE_MIN &&
-            dimension<DEFAULTROWSIZE_MAX)
-            return true;
-        else
-            return false;
+        return type==ROW &&
+                dimension>DEFAULTROWSIZE_MIN &&
+                dimension<DEFAULTROWSIZE_MAX;
     }
 }


More information about the Libreoffice-commits mailing list