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 /qadevOOo/tests/java/ifc | |
parent | 56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff) |
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'qadevOOo/tests/java/ifc')
37 files changed, 81 insertions, 81 deletions
diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlButtonModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlButtonModel.java index 4951d40382e1..d9a3d5424eee 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlButtonModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlButtonModel.java @@ -57,10 +57,10 @@ public class _UnoControlButtonModel extends MultiPropertyTest { protected PropertyTester BoolTester = new PropertyTester() { @Override protected Object getNewValue(String propName, Object oldValue) { - if (util.ValueComparer.equalValue(oldValue, new Boolean(true))) - return new Boolean(false); + if (util.ValueComparer.equalValue(oldValue, Boolean.TRUE)) + return Boolean.FALSE; else - return new Boolean(true); + return Boolean.TRUE; } }; diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlCheckBoxModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlCheckBoxModel.java index b9c2d926e6eb..263205974388 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlCheckBoxModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlCheckBoxModel.java @@ -73,7 +73,7 @@ public class _UnoControlCheckBoxModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - if (utils.isVoid(old)) return new Boolean(true) ; + if (utils.isVoid(old)) return Boolean.TRUE ; else return null ; } }) ; diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlComboBoxModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlComboBoxModel.java index 13674faea5f7..2f61348e09f7 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlComboBoxModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlComboBoxModel.java @@ -92,7 +92,7 @@ public class _UnoControlComboBoxModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - return utils.isVoid(old) ? new Boolean(true) : null ; + return utils.isVoid(old) ? Boolean.TRUE : null ; } }) ; } diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlCurrencyFieldModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlCurrencyFieldModel.java index 17bc0a67b987..cedc9274c009 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlCurrencyFieldModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlCurrencyFieldModel.java @@ -69,7 +69,7 @@ public class _UnoControlCurrencyFieldModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String prop, Object old) { - return utils.isVoid(old) ? new Boolean(true) : null ; + return utils.isVoid(old) ? Boolean.TRUE : null ; } }) ; } diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlDateFieldModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlDateFieldModel.java index a9f8626754b0..cbbf2e2592cb 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlDateFieldModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlDateFieldModel.java @@ -96,7 +96,7 @@ public class _UnoControlDateFieldModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String prop, Object old) { - return utils.isVoid(old) ? new Boolean(true) : null ; + return utils.isVoid(old) ? Boolean.TRUE : null ; } }) ; } @@ -144,10 +144,10 @@ public class _UnoControlDateFieldModel extends MultiPropertyTest { Boolean dsc = null; if (util.utils.isVoid(oDsc)) { log.println("Property is void, set it to true"); - dsc = new Boolean(true); + dsc = Boolean.TRUE; } else { dsc = (Boolean) oDsc; - dsc = new Boolean(!dsc.booleanValue()); + dsc = Boolean.valueOf(!dsc.booleanValue()); log.println("Setting property to "+dsc); } oObj.setPropertyValue("DateShowCentury",dsc); diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlEditModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlEditModel.java index 4820a9163cad..38a888e65325 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlEditModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlEditModel.java @@ -96,7 +96,7 @@ public class _UnoControlEditModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - return utils.isVoid(old) ? new Boolean(true) : null ; + return utils.isVoid(old) ? Boolean.TRUE : null ; } }) ; } diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlFileControlModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlFileControlModel.java index 97354b886738..54fddfe7715c 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlFileControlModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlFileControlModel.java @@ -105,7 +105,7 @@ public class _UnoControlFileControlModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - return utils.isVoid(old) ? new Boolean(true) : null ; + return utils.isVoid(old) ? Boolean.TRUE : null ; } }) ; } diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java index ae22942e0138..a119eee6a55b 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java @@ -216,7 +216,7 @@ public class _UnoControlFormattedFieldModel extends MultiPropertyTest { testProperty("StrictFromat", new PropertyTester() { @Override protected Object getNewValue(String p, Object v) { - return utils.isVoid(v) ? new Boolean(true) : + return utils.isVoid(v) ? Boolean.TRUE : super.getNewValue(p,v) ; } }) ; @@ -230,7 +230,7 @@ public class _UnoControlFormattedFieldModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object v) { - return utils.isVoid(v) ? new Boolean(true) : + return utils.isVoid(v) ? Boolean.TRUE : null ; } }) ; diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlImageControlModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlImageControlModel.java index 518644321931..cc9094a34432 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlImageControlModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlImageControlModel.java @@ -94,7 +94,7 @@ public class _UnoControlImageControlModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object v) { - return utils.isVoid(v) ? new Boolean(true) : + return utils.isVoid(v) ? Boolean.TRUE : null ; } }) ; diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlListBoxModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlListBoxModel.java index 49c1377e4012..7c2a3f2d72e5 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlListBoxModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlListBoxModel.java @@ -92,7 +92,7 @@ public class _UnoControlListBoxModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - return utils.isVoid(old) ? new Boolean(true) : null ; + return utils.isVoid(old) ? Boolean.TRUE : null ; } }) ; } diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlNumericFieldModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlNumericFieldModel.java index 724ac84e975d..f0985238f1a1 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlNumericFieldModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlNumericFieldModel.java @@ -108,7 +108,7 @@ public class _UnoControlNumericFieldModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - return utils.isVoid(old) ? new Boolean(true) : null ; + return utils.isVoid(old) ? Boolean.TRUE : null ; } }) ; } diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlPatternFieldModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlPatternFieldModel.java index 0cbd17cd9d40..4b7abedf8448 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlPatternFieldModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlPatternFieldModel.java @@ -104,7 +104,7 @@ public class _UnoControlPatternFieldModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - return utils.isVoid(old) ? new Boolean(true) : null ; + return utils.isVoid(old) ? Boolean.TRUE : null ; } }) ; } diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlRadioButtonModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlRadioButtonModel.java index 84302c1484a4..e4b228f85dee 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlRadioButtonModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlRadioButtonModel.java @@ -60,7 +60,7 @@ public class _UnoControlRadioButtonModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - return utils.isVoid(old) ? new Boolean(true) : null ; + return utils.isVoid(old) ? Boolean.TRUE : null ; } }) ; } diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlTimeFieldModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlTimeFieldModel.java index 13824c0da596..ec072aa23f81 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlTimeFieldModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlTimeFieldModel.java @@ -126,7 +126,7 @@ public class _UnoControlTimeFieldModel extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - return utils.isVoid(old) ? new Boolean(true) : null ; + return utils.isVoid(old) ? Boolean.TRUE : null ; } }) ; } diff --git a/qadevOOo/tests/java/ifc/chart/_BarDiagram.java b/qadevOOo/tests/java/ifc/chart/_BarDiagram.java index 5b546774bf9b..caf2f5ddc4e1 100644 --- a/qadevOOo/tests/java/ifc/chart/_BarDiagram.java +++ b/qadevOOo/tests/java/ifc/chart/_BarDiagram.java @@ -76,7 +76,7 @@ public class _BarDiagram extends MultiPropertyTest { oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); log.println("Set it to 3D"); try { - oObj.setPropertyValue("Dim3D", new Boolean(true)); + oObj.setPropertyValue("Dim3D", Boolean.TRUE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Exception while set property value"); e.printStackTrace(log); @@ -125,8 +125,8 @@ public class _BarDiagram extends MultiPropertyTest { public void _NumberOfLines() { log.println("Set it to 2D"); try { - oObj.setPropertyValue("Dim3D", new Boolean(false)); - oObj.setPropertyValue("Vertical", new Boolean(false)); + oObj.setPropertyValue("Dim3D", Boolean.FALSE); + oObj.setPropertyValue("Vertical", Boolean.FALSE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Exception while set property value"); e.printStackTrace(log); diff --git a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java index a255ae217414..401b1d9bbe8a 100644 --- a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java +++ b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java @@ -65,7 +65,7 @@ public class _Chart3DBarProperties extends MultiPropertyTest { log.println("Change Diagram to 3D"); oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); try { - oObj.setPropertyValue("Dim3D", new Boolean(true)); + oObj.setPropertyValue("Dim3D", Boolean.TRUE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Couldn't change Diagram to 3D"); e.printStackTrace(log); @@ -98,7 +98,7 @@ public class _Chart3DBarProperties extends MultiPropertyTest { log.println("Change Diagram to 3D"); oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); try { - oObj.setPropertyValue("Dim3D", new Boolean(false)); + oObj.setPropertyValue("Dim3D", Boolean.FALSE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Couldn't change Diagram back to 2D"); e.printStackTrace(log); diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxis.java b/qadevOOo/tests/java/ifc/chart/_ChartAxis.java index e4932e7e021b..f63413ebe7cb 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartAxis.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartAxis.java @@ -61,8 +61,8 @@ public class _ChartAxis extends MultiPropertyTest { try { //if AutoOrigin isn't true then this property works only when //current Origin is less then new value of Max - oObj.setPropertyValue("AutoOrigin", new Boolean(true)); - oObj.setPropertyValue("AutoMax",new Boolean(false)); + oObj.setPropertyValue("AutoOrigin", Boolean.TRUE); + oObj.setPropertyValue("AutoMax",Boolean.FALSE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Couldn't set property value"); e.printStackTrace(log); @@ -93,8 +93,8 @@ public class _ChartAxis extends MultiPropertyTest { try { //if AutoOrigin isn't true then this property works only when //current Origin is greater then new value of Min - oObj.setPropertyValue("AutoOrigin", new Boolean(true)); - oObj.setPropertyValue("AutoMin", new Boolean(false)); + oObj.setPropertyValue("AutoOrigin", Boolean.TRUE); + oObj.setPropertyValue("AutoMin", Boolean.FALSE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Couldn't set property value"); e.printStackTrace(log); @@ -122,7 +122,7 @@ public class _ChartAxis extends MultiPropertyTest { */ public void _Origin() { try { - oObj.setPropertyValue("Logarithmic",new Boolean(false)); + oObj.setPropertyValue("Logarithmic",Boolean.FALSE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Couldn't set property value"); e.printStackTrace(log); @@ -162,8 +162,8 @@ public class _ChartAxis extends MultiPropertyTest { */ public void _StepMain() { try { - oObj.setPropertyValue("AutoStepMain", new Boolean(false)); - oObj.setPropertyValue("Logarithmic",new Boolean(false)); + oObj.setPropertyValue("AutoStepMain", Boolean.FALSE); + oObj.setPropertyValue("Logarithmic",Boolean.FALSE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Couldn't set property value"); e.printStackTrace(log); diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxisXSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartAxisXSupplier.java index 310ebf02560d..4f9075ef953d 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartAxisXSupplier.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartAxisXSupplier.java @@ -66,7 +66,7 @@ public class _ChartAxisXSupplier extends MultiPropertyTest { tRes.tested("HasXAxis", !setVal); // leave axis untouched - oObj.setPropertyValue("HasXAxis", new Boolean(res)); + oObj.setPropertyValue("HasXAxis", Boolean.valueOf(res)); } catch (com.sun.star.lang.WrappedTargetException e) { log.println(e.getMessage()); @@ -101,7 +101,7 @@ public class _ChartAxisXSupplier extends MultiPropertyTest { "HasXAxisDescription")).booleanValue(); log.println("Start value: " + res); - oObj.setPropertyValue("HasXAxisDescription", new Boolean(!res)); + oObj.setPropertyValue("HasXAxisDescription", Boolean.valueOf(!res)); boolean setValue = ((Boolean)oObj.getPropertyValue( "HasXAxisDescription")).booleanValue(); log.println("Changed value: " + setValue); diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java index 62eb9748fbba..ca2d6aedf7e5 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java @@ -91,7 +91,7 @@ public class _ChartAxisYSupplier extends MultiPropertyTest { tRes.tested("HasYAxis", !setVal); // leave axis untouched - oObj.setPropertyValue("HasYAxis", new Boolean(res)); + oObj.setPropertyValue("HasYAxis", Boolean.valueOf(res)); } catch (com.sun.star.lang.WrappedTargetException e) { log.println(e.getMessage()); @@ -126,7 +126,7 @@ public class _ChartAxisYSupplier extends MultiPropertyTest { "HasYAxisDescription")).booleanValue(); log.println("Start value: " + res); - oObj.setPropertyValue("HasYAxisDescription", new Boolean(!res)); + oObj.setPropertyValue("HasYAxisDescription", Boolean.valueOf(!res)); boolean setValue = ((Boolean)oObj.getPropertyValue( "HasYAxisDescription")).booleanValue(); log.println("Changed value: " + setValue); diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java index 33e2e8afec10..30ac5bc92677 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java @@ -67,7 +67,7 @@ public class _ChartAxisZSupplier extends MultiPropertyTest { log.println("Set it to 3D"); oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); try { - oObj.setPropertyValue("Dim3D", new Boolean(true)); + oObj.setPropertyValue("Dim3D", Boolean.TRUE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Exception while set property value"); e.printStackTrace(log); @@ -120,7 +120,7 @@ public class _ChartAxisZSupplier extends MultiPropertyTest { tRes.tested("HasZAxis", !setVal); // leave axis untouched - oObj.setPropertyValue("HasZAxis", new Boolean(res)); + oObj.setPropertyValue("HasZAxis", Boolean.valueOf(res)); } catch (com.sun.star.lang.WrappedTargetException e) { log.println(e.getMessage()); @@ -155,7 +155,7 @@ public class _ChartAxisZSupplier extends MultiPropertyTest { "HasZAxisDescription")).booleanValue(); log.println("Start value: " + res); - oObj.setPropertyValue("HasZAxisDescription", new Boolean(!res)); + oObj.setPropertyValue("HasZAxisDescription", Boolean.valueOf(!res)); boolean setValue = ((Boolean)oObj.getPropertyValue( "HasZAxisDescription")).booleanValue(); log.println("Changed value: " + setValue); diff --git a/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java index 9cbcd9ed0d0e..fcd260994435 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java @@ -69,7 +69,7 @@ public class _ChartTwoAxisXSupplier extends MultiPropertyTest { log.println("Set it to 3D"); oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); try { - oObj.setPropertyValue("Dim3D", new Boolean(true)); + oObj.setPropertyValue("Dim3D", Boolean.TRUE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Exception while set property value"); e.printStackTrace(log); diff --git a/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java index 588242ad6a3d..a6b690d71daf 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java @@ -69,7 +69,7 @@ public class _ChartTwoAxisYSupplier extends MultiPropertyTest { log.println("Set it to 3D"); oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); try { - oObj.setPropertyValue("Dim3D", new Boolean(true)); + oObj.setPropertyValue("Dim3D", Boolean.TRUE); } catch(com.sun.star.lang.WrappedTargetException e) { log.println("Exception while set property value"); e.printStackTrace(log); diff --git a/qadevOOo/tests/java/ifc/configuration/backend/_XLayerHandler.java b/qadevOOo/tests/java/ifc/configuration/backend/_XLayerHandler.java index 445a820c6bff..39ca600a0185 100644 --- a/qadevOOo/tests/java/ifc/configuration/backend/_XLayerHandler.java +++ b/qadevOOo/tests/java/ifc/configuration/backend/_XLayerHandler.java @@ -45,7 +45,7 @@ public class _XLayerHandler extends MultiMethodTest { oObj.overrideNode("Office", (short) 0, false); oObj.overrideProperty("ooSetupInstCompleted", (short) 0, new Type(String.class), false); - oObj.setPropertyValue(new Boolean(false)); + oObj.setPropertyValue(Boolean.FALSE); oObj.endProperty(); oObj.overrideNode("Factories", (short) 0, false); oObj.addOrReplaceNode("com.sun.star.chart.ChartDocument", diff --git a/qadevOOo/tests/java/ifc/configuration/backend/_XUpdateHandler.java b/qadevOOo/tests/java/ifc/configuration/backend/_XUpdateHandler.java index 4c38734682b7..f999d981ca43 100644 --- a/qadevOOo/tests/java/ifc/configuration/backend/_XUpdateHandler.java +++ b/qadevOOo/tests/java/ifc/configuration/backend/_XUpdateHandler.java @@ -42,7 +42,7 @@ public class _XUpdateHandler extends MultiMethodTest { xLayerHandler.overrideProperty("ooSetupInstCompleted", (short) 0, new Type(String.class), false); - xLayerHandler.setPropertyValue(new Boolean(false)); + xLayerHandler.setPropertyValue(Boolean.FALSE); xLayerHandler.endProperty(); xLayerHandler.overrideNode("Factories", (short) 0, false); xLayerHandler.addOrReplaceNode("com.sun.star.chart.ChartDocument", diff --git a/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java b/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java index d9f7f3c31361..082babb9956b 100644 --- a/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java +++ b/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java @@ -117,7 +117,7 @@ public class _DrawingDocumentDrawView extends MultiPropertyTest { public void _IsMasterPageMode() { testProperty("IsMasterPageMode"); try { - oObj.setPropertyValue("IsMasterPageMode", new Boolean(false)); + oObj.setPropertyValue("IsMasterPageMode", Boolean.FALSE); } catch(com.sun.star.lang.WrappedTargetException e) { e.printStackTrace(log); } catch(com.sun.star.beans.UnknownPropertyException e) { @@ -132,7 +132,7 @@ public class _DrawingDocumentDrawView extends MultiPropertyTest { public void _IsLayerMode() { testProperty("IsLayerMode"); try { - oObj.setPropertyValue("IsLayerMode", new Boolean(false)); + oObj.setPropertyValue("IsLayerMode", Boolean.FALSE); } catch(com.sun.star.lang.WrappedTargetException e) { e.printStackTrace(log); } catch(com.sun.star.beans.UnknownPropertyException e) { diff --git a/qadevOOo/tests/java/ifc/form/component/_GridControl.java b/qadevOOo/tests/java/ifc/form/component/_GridControl.java index aa146e043e55..04f3442eb933 100644 --- a/qadevOOo/tests/java/ifc/form/component/_GridControl.java +++ b/qadevOOo/tests/java/ifc/form/component/_GridControl.java @@ -58,7 +58,7 @@ public class _GridControl extends MultiPropertyTest { testProperty("Tabstop", new PropertyTester() { @Override protected Object getNewValue(String prop, Object old) { - return util.utils.isVoid(old) ? new Boolean(true) : + return util.utils.isVoid(old) ? Boolean.TRUE : super.getNewValue(prop, old) ; } }) ; diff --git a/qadevOOo/tests/java/ifc/sdb/_DataSource.java b/qadevOOo/tests/java/ifc/sdb/_DataSource.java index c190babb6e50..fd64da644b7a 100644 --- a/qadevOOo/tests/java/ifc/sdb/_DataSource.java +++ b/qadevOOo/tests/java/ifc/sdb/_DataSource.java @@ -154,7 +154,7 @@ public class _DataSource extends MultiPropertyTest { @Override public void after() { try { - oObj.setPropertyValue("IsPasswordRequired",new Boolean(false)); + oObj.setPropertyValue("IsPasswordRequired",Boolean.FALSE); } catch (Exception e) { log.println("Couldn't set 'IsPasswordRequired' to false"); } diff --git a/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java b/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java index 29705c6e84a9..36761c342f3d 100644 --- a/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java +++ b/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java @@ -270,7 +270,7 @@ public class _XCellRangesQuery extends MultiMethodTest { XPropertySet rowProp = UnoRuntime.queryInterface( XPropertySet.class, oRows.getByIndex(0)); - rowProp.setPropertyValue("IsVisible", new Boolean(vis)); + rowProp.setPropertyValue("IsVisible", Boolean.valueOf(vis)); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { log.println("couldn't get Row " + e.getLocalizedMessage()); } catch (com.sun.star.lang.WrappedTargetException e) { diff --git a/qadevOOo/tests/java/ifc/style/_CharacterProperties.java b/qadevOOo/tests/java/ifc/style/_CharacterProperties.java index 49370918ace9..da30b2cbed20 100644 --- a/qadevOOo/tests/java/ifc/style/_CharacterProperties.java +++ b/qadevOOo/tests/java/ifc/style/_CharacterProperties.java @@ -304,7 +304,7 @@ public class _CharacterProperties extends MultiPropertyTest { testProperty("RubyIsAbove") ; } else { changeProp((XPropertySet) oPara, (XPropertySet) oPort, - "RubyIsAbove",new Boolean(true)); + "RubyIsAbove",Boolean.TRUE); } } diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java index 335d8968e6bf..33caa19966f3 100644 --- a/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java +++ b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java @@ -188,10 +188,10 @@ public class _ParagraphProperties extends MultiPropertyTest { @Override protected Object getNewValue(String propName, Object oldValue) { if ((oldValue != null) && - (oldValue.equals(new Boolean(false)))) { - return new Boolean(true); + (oldValue.equals(Boolean.FALSE))) { + return Boolean.TRUE; } else { - return new Boolean(false); + return Boolean.FALSE; } } }; diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesAsian.java b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesAsian.java index b63fa9c2fd63..9c2faafa0529 100644 --- a/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesAsian.java +++ b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesAsian.java @@ -41,10 +41,10 @@ public class _ParagraphPropertiesAsian extends MultiPropertyTest { @Override protected Object getNewValue(String propName, Object oldValue) { if ((oldValue != null) && - (oldValue.equals(new Boolean(false)))) { - return new Boolean(true); + (oldValue.equals(Boolean.FALSE))) { + return Boolean.TRUE; } else { - return new Boolean(false); + return Boolean.FALSE; } } }; diff --git a/qadevOOo/tests/java/ifc/table/_TableColumn.java b/qadevOOo/tests/java/ifc/table/_TableColumn.java index 05b39cea1b88..db95e7fea419 100644 --- a/qadevOOo/tests/java/ifc/table/_TableColumn.java +++ b/qadevOOo/tests/java/ifc/table/_TableColumn.java @@ -47,7 +47,7 @@ public class _TableColumn extends MultiPropertyTest { aRange.getCellByPosition(0,0).setFormula("Thats a pretty long text"); Object width_before = oObj.getPropertyValue("Width"); log.println("Before setting to optimal width: "+width_before); - oObj.setPropertyValue("OptimalWidth", new Boolean(true)); + oObj.setPropertyValue("OptimalWidth", Boolean.TRUE); Object width_after = oObj.getPropertyValue("Width"); log.println("After setting to optimal width: "+width_after); res = ! ValueComparer.equalValue(width_before,width_after); diff --git a/qadevOOo/tests/java/ifc/text/_NumberingLevel.java b/qadevOOo/tests/java/ifc/text/_NumberingLevel.java index ebeaf004b4f3..bc9a59442146 100644 --- a/qadevOOo/tests/java/ifc/text/_NumberingLevel.java +++ b/qadevOOo/tests/java/ifc/text/_NumberingLevel.java @@ -82,27 +82,27 @@ public class _NumberingLevel { _NumberingLevel.log = log; //key = PropertyName, value = Ooptional - NumberingLevel.put("Adjust", new Boolean(false)); - NumberingLevel.put("ParentNumbering", new Boolean(true)); - NumberingLevel.put("Prefix", new Boolean(false)); - NumberingLevel.put("Suffix", new Boolean(false)); - NumberingLevel.put("CharStyleName", new Boolean(true)); - NumberingLevel.put("BulletId", new Boolean(true)); - NumberingLevel.put("BulletChar", new Boolean(false)); - NumberingLevel.put("BulletFontName", new Boolean(false)); - NumberingLevel.put("BulletFont", new Boolean(true)); - NumberingLevel.put("GraphicURL", new Boolean(false)); - NumberingLevel.put("GraphicBitmap", new Boolean(true)); - NumberingLevel.put("GraphicSize", new Boolean(true)); - NumberingLevel.put("VertOrient", new Boolean(true)); - NumberingLevel.put("StartWith", new Boolean(true)); - NumberingLevel.put("LeftMargin", new Boolean(false)); - NumberingLevel.put("SymbolTextDistance", new Boolean(true)); - NumberingLevel.put("FirstLineOffset", new Boolean(false)); - NumberingLevel.put("NumberingType", new Boolean(false)); - NumberingLevel.put("HeadingStyleName", new Boolean(false)); - NumberingLevel.put("BulletColor", new Boolean(true)); - NumberingLevel.put("BulletRelSize", new Boolean(true)); + NumberingLevel.put("Adjust", Boolean.FALSE); + NumberingLevel.put("ParentNumbering", Boolean.TRUE); + NumberingLevel.put("Prefix", Boolean.FALSE); + NumberingLevel.put("Suffix", Boolean.FALSE); + NumberingLevel.put("CharStyleName", Boolean.TRUE); + NumberingLevel.put("BulletId", Boolean.TRUE); + NumberingLevel.put("BulletChar", Boolean.FALSE); + NumberingLevel.put("BulletFontName", Boolean.FALSE); + NumberingLevel.put("BulletFont", Boolean.TRUE); + NumberingLevel.put("GraphicURL", Boolean.FALSE); + NumberingLevel.put("GraphicBitmap", Boolean.TRUE); + NumberingLevel.put("GraphicSize", Boolean.TRUE); + NumberingLevel.put("VertOrient", Boolean.TRUE); + NumberingLevel.put("StartWith", Boolean.TRUE); + NumberingLevel.put("LeftMargin", Boolean.FALSE); + NumberingLevel.put("SymbolTextDistance", Boolean.TRUE); + NumberingLevel.put("FirstLineOffset", Boolean.FALSE); + NumberingLevel.put("NumberingType", Boolean.FALSE); + NumberingLevel.put("HeadingStyleName", Boolean.FALSE); + NumberingLevel.put("BulletColor", Boolean.TRUE); + NumberingLevel.put("BulletRelSize", Boolean.TRUE); } diff --git a/qadevOOo/tests/java/ifc/text/_XPagePrintable.java b/qadevOOo/tests/java/ifc/text/_XPagePrintable.java index 42f08e8af37a..55bf4fae025d 100644 --- a/qadevOOo/tests/java/ifc/text/_XPagePrintable.java +++ b/qadevOOo/tests/java/ifc/text/_XPagePrintable.java @@ -92,7 +92,7 @@ public class _XPagePrintable extends MultiMethodTest { boolean res = true; Boolean landscape = (Boolean) PrintSettings[8].Value; - Boolean newlandscape = new Boolean(!landscape.booleanValue()); + Boolean newlandscape = Boolean.valueOf(!landscape.booleanValue()); PrintSettings[8].Value = newlandscape; oObj.setPagePrintSettings(PrintSettings); res = (oObj.getPagePrintSettings()[8].Value.equals(newlandscape)); diff --git a/qadevOOo/tests/java/ifc/util/_XSortable.java b/qadevOOo/tests/java/ifc/util/_XSortable.java index dd987cdeff41..f6a60f740dab 100644 --- a/qadevOOo/tests/java/ifc/util/_XSortable.java +++ b/qadevOOo/tests/java/ifc/util/_XSortable.java @@ -177,11 +177,11 @@ public class _XSortable extends MultiMethodTest { } if (oPV[i].Name.equals("isSortInTable")) { - oPV[i].Value = new Boolean(true); + oPV[i].Value = Boolean.TRUE; } if (oPV[i].Name.equals("IsSortColumns")) { - oPV[i].Value = new Boolean(false); + oPV[i].Value = Boolean.FALSE; } } diff --git a/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java b/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java index 813cafca06ae..4eceb4ac15c7 100644 --- a/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java +++ b/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java @@ -96,7 +96,7 @@ public class _XPrintJobBroadcaster extends MultiMethodTest { printProps[0].State = com.sun.star.beans.PropertyState.DEFAULT_VALUE; printProps[1] = new PropertyValue(); printProps[1].Name = "Wait"; - printProps[1].Value = new Boolean(true); + printProps[1].Value = Boolean.TRUE; } /** diff --git a/qadevOOo/tests/java/ifc/view/_XPrintable.java b/qadevOOo/tests/java/ifc/view/_XPrintable.java index cc00ae30940d..21e470fef18c 100644 --- a/qadevOOo/tests/java/ifc/view/_XPrintable.java +++ b/qadevOOo/tests/java/ifc/view/_XPrintable.java @@ -152,7 +152,7 @@ public class _XPrintable extends MultiMethodTest { PrintOptions[0] = firstProp; PrintOptions[1] = new PropertyValue(); PrintOptions[1].Name = "Wait"; - PrintOptions[1].Value = new Boolean(true); + PrintOptions[1].Value = Boolean.TRUE; oObj.print(PrintOptions); } catch (com.sun.star.lang.IllegalArgumentException ex) { |