diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 14:00:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:16 +0200 |
commit | be1bb7b1ccee28be616b89cc95e97d656e78bbe3 (patch) | |
tree | d67d16a68d1469b5096a27c743c4b0326a0c0ebe /odk/examples/java/DocumentHandling | |
parent | 56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff) |
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'odk/examples/java/DocumentHandling')
-rw-r--r-- | odk/examples/java/DocumentHandling/DocumentConverter.java | 4 | ||||
-rw-r--r-- | odk/examples/java/DocumentHandling/DocumentSaver.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/odk/examples/java/DocumentHandling/DocumentConverter.java b/odk/examples/java/DocumentHandling/DocumentConverter.java index aeb6f022d2ca..35002fb5de1b 100644 --- a/odk/examples/java/DocumentHandling/DocumentConverter.java +++ b/odk/examples/java/DocumentHandling/DocumentConverter.java @@ -103,7 +103,7 @@ public class DocumentConverter { new com.sun.star.beans.PropertyValue[1]; propertyValues[0] = new com.sun.star.beans.PropertyValue(); propertyValues[0].Name = "Hidden"; - propertyValues[0].Value = new Boolean(true); + propertyValues[0].Value = Boolean.TRUE; Object oDocToStore = DocumentConverter.xCompLoader.loadComponentFromURL( @@ -120,7 +120,7 @@ public class DocumentConverter { // Setting the flag for overwriting propertyValues[0] = new com.sun.star.beans.PropertyValue(); propertyValues[0].Name = "Overwrite"; - propertyValues[0].Value = new Boolean(true); + propertyValues[0].Value = Boolean.TRUE; // Setting the filter name propertyValues[1] = new com.sun.star.beans.PropertyValue(); propertyValues[1].Name = "FilterName"; diff --git a/odk/examples/java/DocumentHandling/DocumentSaver.java b/odk/examples/java/DocumentHandling/DocumentSaver.java index 052b344a3d2e..42a99e91b5c9 100644 --- a/odk/examples/java/DocumentHandling/DocumentSaver.java +++ b/odk/examples/java/DocumentHandling/DocumentSaver.java @@ -86,7 +86,7 @@ public class DocumentSaver { new com.sun.star.beans.PropertyValue[1]; propertyValue[0] = new com.sun.star.beans.PropertyValue(); propertyValue[0].Name = "Hidden"; - propertyValue[0].Value = new Boolean(true); + propertyValue[0].Value = Boolean.TRUE; Object oDocToStore = xCompLoader.loadComponentFromURL( sLoadUrl.toString(), "_blank", 0, propertyValue ); @@ -97,7 +97,7 @@ public class DocumentSaver { propertyValue = new com.sun.star.beans.PropertyValue[ 2 ]; propertyValue[0] = new com.sun.star.beans.PropertyValue(); propertyValue[0].Name = "Overwrite"; - propertyValue[0].Value = new Boolean(true); + propertyValue[0].Value = Boolean.TRUE; propertyValue[1] = new com.sun.star.beans.PropertyValue(); propertyValue[1].Name = "FilterName"; propertyValue[1].Value = "StarOffice XML (Writer)"; |