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/OfficeDev | |
parent | 56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff) |
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'odk/examples/DevelopersGuide/OfficeDev')
3 files changed, 5 insertions, 5 deletions
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java index e02af229a601..0ce02128ca79 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java @@ -229,7 +229,7 @@ public class CustomizeView extends JPanel com.sun.star.beans.PropertyValue[] lProperties = new com.sun.star.beans.PropertyValue[1]; lProperties[0] = new com.sun.star.beans.PropertyValue(); lProperties[0].Name = m_sProp; - lProperties[0].Value = new Boolean(bState); + lProperties[0].Value = Boolean.valueOf(bState); // execute (dispatch) it into the frame if (m_xFrame==null) diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java index c7099bb19ef4..887d8f35ffa3 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java @@ -174,7 +174,7 @@ public class LinguisticExamples PropertyValue[] aProps = new PropertyValue[1]; aProps[0] = new PropertyValue(); aProps[0].Name = "IsGermanPreReform"; - aProps[0].Value = new Boolean( true ); + aProps[0].Value = Boolean.TRUE; GetSpell(); @@ -292,7 +292,7 @@ public class LinguisticExamples // set a spellchecker and hyphenator property value to a defined state try { - aLinguProps.setPropertyValue("IsGermanPreReform", new Boolean(true)); + aLinguProps.setPropertyValue("IsGermanPreReform", Boolean.TRUE); } catch (Exception e) { } @@ -305,7 +305,7 @@ public class LinguisticExamples // event that eventually results in the listeners // 'processLinguServiceEvent' function being called try { - aLinguProps.setPropertyValue("IsGermanPreReform", new Boolean(false)); + aLinguProps.setPropertyValue("IsGermanPreReform", Boolean.FALSE); } catch (Exception e) { } diff --git a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java index 31643329ad5a..0f7e25851a4d 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java @@ -175,7 +175,7 @@ public class Number_Formats UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xIndexAccess.getByIndex(1)); - xColPropSet.setPropertyValue( "OptimalWidth", new Boolean(true) ); + xColPropSet.setPropertyValue( "OptimalWidth", Boolean.TRUE ); } |