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/GUI | |
parent | 56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff) |
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'odk/examples/DevelopersGuide/GUI')
-rw-r--r-- | odk/examples/DevelopersGuide/GUI/MessageBox.java | 2 | ||||
-rw-r--r-- | odk/examples/DevelopersGuide/GUI/SystemDialog.java | 2 | ||||
-rw-r--r-- | odk/examples/DevelopersGuide/GUI/UnoDialogSample.java | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/odk/examples/DevelopersGuide/GUI/MessageBox.java b/odk/examples/DevelopersGuide/GUI/MessageBox.java index 055659a04204..7cc1159518d1 100644 --- a/odk/examples/DevelopersGuide/GUI/MessageBox.java +++ b/odk/examples/DevelopersGuide/GUI/MessageBox.java @@ -152,7 +152,7 @@ public class MessageBox { com.sun.star.beans.PropertyValue[] args = new com.sun.star.beans.PropertyValue [1]; args[0] = new com.sun.star.beans.PropertyValue(); args[0].Name = "Hidden"; - args[0].Value = new Boolean(true); + args[0].Value = Boolean.TRUE; String strDoc = "private:factory/swriter"; xComp = xCLoader.loadComponentFromURL(strDoc, "_blank", 0, args); diff --git a/odk/examples/DevelopersGuide/GUI/SystemDialog.java b/odk/examples/DevelopersGuide/GUI/SystemDialog.java index 453d9b99cd72..1fb63c61890d 100644 --- a/odk/examples/DevelopersGuide/GUI/SystemDialog.java +++ b/odk/examples/DevelopersGuide/GUI/SystemDialog.java @@ -104,7 +104,7 @@ public class SystemDialog { // add a control to the dialog to add the extension automatically to the filename... XFilePickerControlAccess xFilePickerControlAccess = UnoRuntime.queryInterface(XFilePickerControlAccess.class, xFilePicker); - xFilePickerControlAccess.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION, (short) 0, new Boolean(true)); + xFilePickerControlAccess.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION, (short) 0, Boolean.TRUE); xComponent = UnoRuntime.queryInterface(XComponent.class, xFilePicker); diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java index 3c52f56fd10e..750b4a5d4a59 100644 --- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java +++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java @@ -1266,7 +1266,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis } // Alternatively we could have done it also this way: // bdoEnable = (nState == 1); - xModelPropertySet.setPropertyValue("Enabled", new Boolean(bdoEnable)); + xModelPropertySet.setPropertyValue("Enabled", Boolean.valueOf(bdoEnable)); }catch (com.sun.star.uno.Exception ex){ /* perform individual exception handling here. * Possible exception types are: @@ -1352,7 +1352,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis XPropertySet xRMItemPSet = UnoRuntime.queryInterface(XPropertySet.class, oRoadmapItem); xRMItemPSet.setPropertyValue("Label", _sLabel); // sometimes steps are supposed to be set disabled depending on the program logic... - xRMItemPSet.setPropertyValue("Enabled", new Boolean(_bEnabled)); + xRMItemPSet.setPropertyValue("Enabled", Boolean.valueOf(_bEnabled)); // in this context the "ID" is meant to refer to a step of the dialog xRMItemPSet.setPropertyValue("ID", new Integer(_ID)); m_xRMIndexCont.insertByIndex(Index, oRoadmapItem); |