From be1bb7b1ccee28be616b89cc95e97d656e78bbe3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 12 Aug 2014 14:00:54 +0200 Subject: java: use Boolean.valueOf instead of instantiating Boolean objects Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74 --- odk/examples/DevelopersGuide/Text/TextDocuments.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'odk/examples/DevelopersGuide/Text') diff --git a/odk/examples/DevelopersGuide/Text/TextDocuments.java b/odk/examples/DevelopersGuide/Text/TextDocuments.java index ab66ebd5f3a8..92b5504f536b 100644 --- a/odk/examples/DevelopersGuide/Text/TextDocuments.java +++ b/odk/examples/DevelopersGuide/Text/TextDocuments.java @@ -439,7 +439,7 @@ public class TextDocuments { PropertyValue[] loadProps = new PropertyValue[1]; loadProps[0] = new PropertyValue(); loadProps[0].Name = "AsTemplate"; - loadProps[0].Value = new Boolean(true); + loadProps[0].Value = Boolean.TRUE; // load return xComponentLoader.loadComponentFromURL(loadUrl, "_blank", 0, loadProps); @@ -717,7 +717,7 @@ public class TextDocuments { XPropertySet xRow = UnoRuntime.queryInterface( XPropertySet.class, xRows.getByIndex ( 0 ) ); // If BackTransparant is false, then the background color is visible - xRow.setPropertyValue( "BackTransparent", new Boolean(false)); + xRow.setPropertyValue( "BackTransparent", Boolean.FALSE); // Specify the color of the background to be dark blue xRow.setPropertyValue( "BackColor", new Integer(6710932)); @@ -725,7 +725,7 @@ public class TextDocuments { XPropertySet xTableProps = UnoRuntime.queryInterface( XPropertySet.class, xTable ); // We want visible background colors - xTableProps.setPropertyValue( "BackTransparent", new Boolean(false)); + xTableProps.setPropertyValue( "BackTransparent", Boolean.FALSE); // Set the background colour to light blue xTableProps.setPropertyValue( "BackColor", new Integer(13421823)); @@ -863,7 +863,7 @@ public class TextDocuments { // We want a visible background xTableProps.setPropertyValue( "BackTransparent", - new Boolean(false)); + Boolean.FALSE); // We want the background to be light blue xTableProps.setPropertyValue( "BackColor", new Integer(13421823)); @@ -879,7 +879,7 @@ public class TextDocuments { XPropertySet.class, xRows.getByIndex ( 0 ) ); // We want the background of the first row to be visible too - xRow.setPropertyValue( "BackTransparent", new Boolean(false)); + xRow.setPropertyValue( "BackTransparent", Boolean.FALSE); // And let's make it dark blue xRow.setPropertyValue( "BackColor", new Integer(6710932)); -- cgit