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/DevelopersGuide/Drawing/LayerDemo.java | |
parent | 56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff) |
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'odk/examples/DevelopersGuide/Drawing/LayerDemo.java')
-rw-r--r-- | odk/examples/DevelopersGuide/Drawing/LayerDemo.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/odk/examples/DevelopersGuide/Drawing/LayerDemo.java b/odk/examples/DevelopersGuide/Drawing/LayerDemo.java index cbf66354ba14..b22d301150a3 100644 --- a/odk/examples/DevelopersGuide/Drawing/LayerDemo.java +++ b/odk/examples/DevelopersGuide/Drawing/LayerDemo.java @@ -76,7 +76,7 @@ public class LayerDemo PropertyValue[] pPropValues = new PropertyValue[ 1 ]; pPropValues[ 0 ] = new PropertyValue(); pPropValues[ 0 ].Name = "Silent"; - pPropValues[ 0 ].Value = new Boolean( true ); + pPropValues[ 0 ].Value = Boolean.TRUE; xDrawDoc = Helper.createDocument( xOfficeContext, "private:factory/sdraw", "_blank", 0, pPropValues ); @@ -122,8 +122,8 @@ public class LayerDemo xLayerPropSet = UnoRuntime.queryInterface( XPropertySet.class, xNotVisibleAndEditable ); xLayerPropSet.setPropertyValue( "Name", "NotVisibleAndEditable" ); - xLayerPropSet.setPropertyValue( "IsVisible", new Boolean( false ) ); - xLayerPropSet.setPropertyValue( "IsLocked", new Boolean( true ) ); + xLayerPropSet.setPropertyValue( "IsVisible", Boolean.FALSE ); + xLayerPropSet.setPropertyValue( "IsLocked", Boolean.TRUE ); // create a second layer XLayer xNotEditable = xLayerManager.insertNewByIndex( @@ -132,8 +132,8 @@ public class LayerDemo xLayerPropSet = UnoRuntime.queryInterface( XPropertySet.class, xNotEditable ); xLayerPropSet.setPropertyValue( "Name", "NotEditable" ); - xLayerPropSet.setPropertyValue( "IsVisible", new Boolean( true ) ); - xLayerPropSet.setPropertyValue( "IsLocked", new Boolean( true ) ); + xLayerPropSet.setPropertyValue( "IsVisible", Boolean.TRUE ); + xLayerPropSet.setPropertyValue( "IsLocked", Boolean.TRUE ); // attach the layer to the rectangles xLayerManager.attachShapeToLayer( xRect1, xNotVisibleAndEditable ); |