summaryrefslogtreecommitdiff
path: root/odk/examples/java/Text
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 14:00:54 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:16 +0200
commitbe1bb7b1ccee28be616b89cc95e97d656e78bbe3 (patch)
treed67d16a68d1469b5096a27c743c4b0326a0c0ebe /odk/examples/java/Text
parent56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff)
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'odk/examples/java/Text')
-rw-r--r--odk/examples/java/Text/BookmarkInsertion.java2
-rw-r--r--odk/examples/java/Text/SWriter.java8
-rw-r--r--odk/examples/java/Text/StyleCreation.java2
3 files changed, 6 insertions, 6 deletions
diff --git a/odk/examples/java/Text/BookmarkInsertion.java b/odk/examples/java/Text/BookmarkInsertion.java
index bb5a44e3413c..3358e23ebcbb 100644
--- a/odk/examples/java/Text/BookmarkInsertion.java
+++ b/odk/examples/java/Text/BookmarkInsertion.java
@@ -160,7 +160,7 @@ public class BookmarkInsertion {
com.sun.star.beans.XPropertySet.class, xSearchDescriptor);
xPropertySet.setPropertyValue("SearchRegularExpression",
- new Boolean( true ) );
+ Boolean.TRUE );
xSearchInterface = (com.sun.star.uno.XInterface)
xSearchable.findFirst(xSearchDescriptor);
diff --git a/odk/examples/java/Text/SWriter.java b/odk/examples/java/Text/SWriter.java
index d96c583ce6b5..393edc1c01d5 100644
--- a/odk/examples/java/Text/SWriter.java
+++ b/odk/examples/java/Text/SWriter.java
@@ -155,9 +155,9 @@ public class SWriter {
// Change the BackColor
try {
- xTTPS.setPropertyValue("BackTransparent", new Boolean(false));
+ xTTPS.setPropertyValue("BackTransparent", Boolean.FALSE);
xTTPS.setPropertyValue("BackColor",new Integer(13421823));
- xTTRowPS.setPropertyValue("BackTransparent", new Boolean(false));
+ xTTRowPS.setPropertyValue("BackTransparent", Boolean.FALSE);
xTTRowPS.setPropertyValue("BackColor",new Integer(6710932));
} catch (Exception e) {
@@ -206,7 +206,7 @@ public class SWriter {
// Change the CharColor and add a Shadow
try {
xTCPS.setPropertyValue("CharColor",new Integer(255));
- xTCPS.setPropertyValue("CharShadowed", new Boolean(true));
+ xTCPS.setPropertyValue("CharShadowed", Boolean.TRUE);
} catch (Exception e) {
System.err.println("Couldn't change the color " + e);
e.printStackTrace(System.err);
@@ -316,7 +316,7 @@ public class SWriter {
// Change the CharColor and add a Shadow
try {
xTCPS.setPropertyValue("CharColor",new Integer(65536));
- xTCPS.setPropertyValue("CharShadowed", new Boolean(false));
+ xTCPS.setPropertyValue("CharShadowed", Boolean.FALSE);
} catch (Exception e) {
System.err.println("Couldn't change the color " + e);
e.printStackTrace(System.err);
diff --git a/odk/examples/java/Text/StyleCreation.java b/odk/examples/java/Text/StyleCreation.java
index a5ae0cc790f0..04207407c41d 100644
--- a/odk/examples/java/Text/StyleCreation.java
+++ b/odk/examples/java/Text/StyleCreation.java
@@ -99,7 +99,7 @@ public class StyleCreation {
new Float( com.sun.star.awt.FontWeight.BOLD ) );
System.out.println( "set the font attribute 'Bold'" );
- xPropertySet.setPropertyValue("CharAutoKerning", new Boolean( true ) );
+ xPropertySet.setPropertyValue("CharAutoKerning", Boolean.TRUE );
System.out.println( "set the paragraph attribute 'AutoKerning'" );
xPropertySet.setPropertyValue("ParaAdjust",
new Integer( com.sun.star.style.ParagraphAdjust.CENTER_value ) );