diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 15:12:27 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:18 +0200 |
commit | 0764292c5dcb7daa62e9adeb1ac9af1dbe14066f (patch) | |
tree | 17a4e9f2393d23aaba1e68bbc944aa8e18b9e2f6 /forms/qa | |
parent | 8a2c6c29af41cd7a62f37861fb0d4e81a857bb45 (diff) |
java: use 'Short.valueOf' instead of 'new Short'
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
Diffstat (limited to 'forms/qa')
-rw-r--r-- | forms/qa/integration/forms/CellBinding.java | 6 | ||||
-rw-r--r-- | forms/qa/integration/forms/FormControlTest.java | 14 | ||||
-rw-r--r-- | forms/qa/integration/forms/FormLayer.java | 2 | ||||
-rw-r--r-- | forms/qa/integration/forms/ListBox.java | 2 | ||||
-rw-r--r-- | forms/qa/integration/forms/MasterDetailForms.java | 2 | ||||
-rw-r--r-- | forms/qa/integration/forms/SingleControlValidation.java | 2 |
6 files changed, 14 insertions, 14 deletions
diff --git a/forms/qa/integration/forms/CellBinding.java b/forms/qa/integration/forms/CellBinding.java index 170feb9d1c0a..d039aee762a2 100644 --- a/forms/qa/integration/forms/CellBinding.java +++ b/forms/qa/integration/forms/CellBinding.java @@ -222,7 +222,7 @@ public class CellBinding extends complexlib.ComplexTestCase bindToCell( checkBox, col, row ); // initialize with "not checked" - checkBox.setPropertyValue( "State", new Short( (short)0 ) ); + checkBox.setPropertyValue( "State", Short.valueOf( (short)0 ) ); verifyNumericCellContent( col, row, 0, "programmatically unchecking the check box is not propagated to the cell." ); // first click: "not checked" -> "checked" @@ -253,7 +253,7 @@ public class CellBinding extends complexlib.ComplexTestCase bindToCell( checkBox, col, row ); // initialize with "not checked" - checkBox.setPropertyValue( "State", new Short( (short)0 ) ); + checkBox.setPropertyValue( "State", Short.valueOf( (short)0 ) ); verifyNumericCellContent( col, row, 0, "programmatically unchecking the check box is not propagated to the cell." ); // first click: "not checked" -> "checked" @@ -524,7 +524,7 @@ public class CellBinding extends complexlib.ComplexTestCase XAccessibleValue xValue = UnoRuntime.queryInterface( XAccessibleValue.class, accessible.getAccessibleContext() ); - xValue.setCurrentValue( new Short( state ) ); + xValue.setCurrentValue( Short.valueOf( state ) ); } /* ------------------------------------------------------------------ */ diff --git a/forms/qa/integration/forms/FormControlTest.java b/forms/qa/integration/forms/FormControlTest.java index 323b15f74715..d78fd581d133 100644 --- a/forms/qa/integration/forms/FormControlTest.java +++ b/forms/qa/integration/forms/FormControlTest.java @@ -223,7 +223,7 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE } XPropertySet checkModel = getControlModel( "f_tinyint" ); - checkModel.setPropertyValue( "State", new Short( (short)0 ) ); + checkModel.setPropertyValue( "State", Short.valueOf( (short)0 ) ); // setting the state of the check box needs to be reflected in the formatted field immediately if ( !checkDoubleValue( 0, "f_tinyint_format", "EffectiveValue" ) ) @@ -233,7 +233,7 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE } // same for the "indetermined" state of the check box - checkModel.setPropertyValue( "State", new Short( (short)2 ) ); + checkModel.setPropertyValue( "State", Short.valueOf( (short)2 ) ); if ( !checkNullValue( "f_tinyint_format", "EffectiveValue" ) ) { failed( "cross-update failed: updating the check box should result in updating the same-bound formatted field (2)!" ); @@ -294,7 +294,7 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE } XPropertySet radioModel = getRadioModel( "radio_group", "normal" ); - radioModel.setPropertyValue( "State", new Short( (short)1 ) ); + radioModel.setPropertyValue( "State", Short.valueOf( (short)1 ) ); // setting the state of the radio button needs to be reflected in the formatted field immediately if ( !checkStringValue( "normal", "f_text_enum_text", "Text" ) ) @@ -304,7 +304,7 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE } // same for the "indetermined" state of the check box - getRadioModel( "radio_group", "important" ).setPropertyValue( "State", new Short( (short)1 ) ); + getRadioModel( "radio_group", "important" ).setPropertyValue( "State", Short.valueOf( (short)1 ) ); if ( !checkStringValue( "important", "f_text_enum_text", "Text" ) ) { failed( "cross-update failed: updating the radio button should result in updating the same-bound text field (2)!" ); @@ -526,12 +526,12 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE m_formLayer.insertControlLine( "DatabaseFormattedField","f_tinyint", "_format",80, 41, 6 ); m_formLayer.insertControlLine( "DatabaseTextField", "dummy", "", 150 ); - xIDField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) ); + xIDField.setPropertyValue( "DecimalAccuracy", Short.valueOf( (short)0 ) ); xImageField.setPropertyValue( "ScaleImage", Boolean.TRUE ); xImageField.setPropertyValue( "Tabstop", Boolean.TRUE ); xCheckBox.setPropertyValue( "TriState", Boolean.TRUE ); - xCheckBox.setPropertyValue( "DefaultState", new Short( (short)2 ) ); - xTimeField.setPropertyValue( "TimeFormat", new Short( (short)1 ) ); + xCheckBox.setPropertyValue( "DefaultState", Short.valueOf( (short)2 ) ); + xTimeField.setPropertyValue( "TimeFormat", Short.valueOf( (short)1 ) ); xTimeField.setPropertyValue( "TimeMax", Integer.valueOf( 23595999 ) ); xReqField.setPropertyValue( "ConvertEmptyToNull", Boolean.FALSE ); diff --git a/forms/qa/integration/forms/FormLayer.java b/forms/qa/integration/forms/FormLayer.java index ed684be68bae..a86f6f1aeb6b 100644 --- a/forms/qa/integration/forms/FormLayer.java +++ b/forms/qa/integration/forms/FormLayer.java @@ -217,7 +217,7 @@ public class FormLayer xFieldModel.setPropertyValue( "DataField", sFieldName ); if ( xFieldModel.getPropertySetInfo().hasPropertyByName( "Border" ) ) { - xFieldModel.setPropertyValue( "Border", new Short( VisualEffect.FLAT ) ); + xFieldModel.setPropertyValue( "Border", Short.valueOf( VisualEffect.FLAT ) ); if ( xFieldModel.getPropertySetInfo().hasPropertyByName( "BorderColor" ) ) xFieldModel.setPropertyValue( "BorderColor", Integer.valueOf( 0x00C0C0C0 ) ); } diff --git a/forms/qa/integration/forms/ListBox.java b/forms/qa/integration/forms/ListBox.java index 60f115df6221..1d1275127e82 100644 --- a/forms/qa/integration/forms/ListBox.java +++ b/forms/qa/integration/forms/ListBox.java @@ -277,7 +277,7 @@ public class ListBox extends TestCase listBoxModel.setPropertyValue( "ListSourceType", ListSourceType.SQL ); listBoxModel.setPropertyValue( "ListSource", new String[] { "SELECT \"content\", \"" + columnPKName + "\" FROM \"" + tableName + "\"" } ); - listBoxModel.setPropertyValue( "BoundColumn", new Short( (short)1 ) ); + listBoxModel.setPropertyValue( "BoundColumn", Short.valueOf( (short)1 ) ); } m_document.getCurrentView().toggleFormDesignMode(); diff --git a/forms/qa/integration/forms/MasterDetailForms.java b/forms/qa/integration/forms/MasterDetailForms.java index 3117c3661f98..7619539ed562 100644 --- a/forms/qa/integration/forms/MasterDetailForms.java +++ b/forms/qa/integration/forms/MasterDetailForms.java @@ -227,7 +227,7 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com formFactory.createInstanceWithArguments( "com.sun.star.sdb.DocumentDefinition", loadArgs ) ); Command command = new Command(); command.Name = "openDesign"; - command.Argument = new Short( OpenMode.DOCUMENT ); + command.Argument = Short.valueOf( OpenMode.DOCUMENT ); DocumentHelper subDocument = new DocumentHelper( m_orb, UnoRuntime.queryInterface( XComponent.class, diff --git a/forms/qa/integration/forms/SingleControlValidation.java b/forms/qa/integration/forms/SingleControlValidation.java index 044af2f22afe..239789decabe 100644 --- a/forms/qa/integration/forms/SingleControlValidation.java +++ b/forms/qa/integration/forms/SingleControlValidation.java @@ -96,7 +96,7 @@ public class SingleControlValidation implements XFormComponentValidityListener controls[ i ].setPropertyValue( "Tag", String.valueOf( i ) ); if ( controls[ i ].getPropertySetInfo().hasPropertyByName( "Border" ) ) - controls[ i ].setPropertyValue( "Border", new Short( (short)2 ) ); + controls[ i ].setPropertyValue( "Border", Short.valueOf( (short)2 ) ); XValidatableFormComponent xComp = UnoRuntime.queryInterface( XValidatableFormComponent.class, controls[ i ] ); |