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/FirstSteps | |
parent | 56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff) |
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'odk/examples/DevelopersGuide/FirstSteps')
-rw-r--r-- | odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java | 2 | ||||
-rw-r--r-- | odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java index ac8d6430874b..c98124d6ca09 100644 --- a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java +++ b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java @@ -123,7 +123,7 @@ public class FirstLoadComponent { // instantiate PropertyValue struct and set its member fields PropertyValue asTemplate = new PropertyValue(); asTemplate.Name = "AsTemplate"; - asTemplate.Value = new Boolean(true); + asTemplate.Value = Boolean.TRUE; // assign PropertyValue struct to array of references for PropertyValue // structs diff --git a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java index 301db58a2c6f..9d27e66a5d42 100644 --- a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java +++ b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java @@ -134,7 +134,7 @@ public class HelloTextTableShape { XPropertySet xShapeProps = UnoRuntime.queryInterface( XPropertySet.class, writerShape); // wrap text inside shape - xShapeProps.setPropertyValue("TextContourFrame", new Boolean(true)); + xShapeProps.setPropertyValue("TextContourFrame", Boolean.TRUE); XText xShapeText = UnoRuntime.queryInterface(XText.class, writerShape); @@ -217,7 +217,7 @@ public class HelloTextTableShape { XCell xCell = xSpreadsheetCells.getCellByPosition(0,1); XPropertySet xCellProps = UnoRuntime.queryInterface( XPropertySet.class, xCell); - xCellProps.setPropertyValue("IsTextWrapped", new Boolean(true)); + xCellProps.setPropertyValue("IsTextWrapped", Boolean.TRUE); XText xCellText = UnoRuntime.queryInterface(XText.class, xCell); @@ -244,7 +244,7 @@ public class HelloTextTableShape { XPropertySet xShapeProps = UnoRuntime.queryInterface( XPropertySet.class, calcShape); // wrap text inside shape - xShapeProps.setPropertyValue("TextContourFrame", new Boolean(true)); + xShapeProps.setPropertyValue("TextContourFrame", Boolean.TRUE); XText xShapeText = UnoRuntime.queryInterface(XText.class, calcShape); @@ -291,7 +291,7 @@ public class HelloTextTableShape { XPropertySet.class, drawShape); // wrap text inside shape - xShapeProps.setPropertyValue("TextContourFrame", new Boolean(true)); + xShapeProps.setPropertyValue("TextContourFrame", Boolean.TRUE); manipulateText(xShapeText); manipulateShape(xDrawShape); |