summaryrefslogtreecommitdiff
path: root/forms/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 15:09:06 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:17 +0200
commitff0ad0493ee1729c726587f667761b04101d774c (patch)
tree8c0f97e8740fbdb2ed0cdbfc5d99d82cae8f7df6 /forms/qa
parentbe1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff)
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'forms/qa')
-rw-r--r--forms/qa/integration/forms/CellBinding.java2
-rw-r--r--forms/qa/integration/forms/FormControlTest.java4
-rw-r--r--forms/qa/integration/forms/FormLayer.java2
-rw-r--r--forms/qa/integration/forms/FormPropertyBags.java4
-rw-r--r--forms/qa/integration/forms/MasterDetailForms.java10
-rw-r--r--forms/qa/integration/forms/SingleControlValidation.java2
6 files changed, 12 insertions, 12 deletions
diff --git a/forms/qa/integration/forms/CellBinding.java b/forms/qa/integration/forms/CellBinding.java
index e2dd6e86a400..170feb9d1c0a 100644
--- a/forms/qa/integration/forms/CellBinding.java
+++ b/forms/qa/integration/forms/CellBinding.java
@@ -509,7 +509,7 @@ public class CellBinding extends complexlib.ComplexTestCase
XAccessibleValue xValue = UnoRuntime.queryInterface(
XAccessibleValue.class, accessible.getAccessibleContext() );
- Integer newValue = new Integer( 1 );
+ Integer newValue = Integer.valueOf( 1 );
xValue.setCurrentValue( newValue );
}
diff --git a/forms/qa/integration/forms/FormControlTest.java b/forms/qa/integration/forms/FormControlTest.java
index bf741e0a8de4..323b15f74715 100644
--- a/forms/qa/integration/forms/FormControlTest.java
+++ b/forms/qa/integration/forms/FormControlTest.java
@@ -532,13 +532,13 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
xCheckBox.setPropertyValue( "TriState", Boolean.TRUE );
xCheckBox.setPropertyValue( "DefaultState", new Short( (short)2 ) );
xTimeField.setPropertyValue( "TimeFormat", new Short( (short)1 ) );
- xTimeField.setPropertyValue( "TimeMax", new Integer( 23595999 ) );
+ xTimeField.setPropertyValue( "TimeMax", Integer.valueOf( 23595999 ) );
xReqField.setPropertyValue( "ConvertEmptyToNull", Boolean.FALSE );
// the logical form
m_masterForm = (XPropertySet)dbfTools.getParent( xIDField, XPropertySet.class );
m_masterForm.setPropertyValue( "DataSourceName", m_dataSourceProps.getPropertyValue( "Name" ) );
- m_masterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) );
+ m_masterForm.setPropertyValue( "CommandType", Integer.valueOf( CommandType.TABLE ) );
m_masterForm.setPropertyValue( "Command", s_tableName );
insertRadio( 3, "none", "none" );
diff --git a/forms/qa/integration/forms/FormLayer.java b/forms/qa/integration/forms/FormLayer.java
index ca142896418d..ed684be68bae 100644
--- a/forms/qa/integration/forms/FormLayer.java
+++ b/forms/qa/integration/forms/FormLayer.java
@@ -219,7 +219,7 @@ public class FormLayer
{
xFieldModel.setPropertyValue( "Border", new Short( VisualEffect.FLAT ) );
if ( xFieldModel.getPropertySetInfo().hasPropertyByName( "BorderColor" ) )
- xFieldModel.setPropertyValue( "BorderColor", new Integer( 0x00C0C0C0 ) );
+ xFieldModel.setPropertyValue( "BorderColor", Integer.valueOf( 0x00C0C0C0 ) );
}
// knit it to it's label component
xFieldModel.setPropertyValue( "LabelControl", xLabelModel );
diff --git a/forms/qa/integration/forms/FormPropertyBags.java b/forms/qa/integration/forms/FormPropertyBags.java
index 8d6781b78aaa..4a3966acd5c7 100644
--- a/forms/qa/integration/forms/FormPropertyBags.java
+++ b/forms/qa/integration/forms/FormPropertyBags.java
@@ -102,7 +102,7 @@ public class FormPropertyBags extends complexlib.ComplexTestCase implements XPro
propContainer.addProperty( "SomeBoundText", PropertyAttribute.BOUND, "InitialBoundText" );
propContainer.addProperty( "SomeTransientText", PropertyAttribute.TRANSIENT, "InitialTransientProperty" );
propContainer.addProperty( "SomeReadonlyText", PropertyAttribute.READONLY, "InitialReadonlyText" );
- propContainer.addProperty( "SomeNumericValue", PropertyAttribute.BOUND, new Integer( 42 ) );
+ propContainer.addProperty( "SomeNumericValue", PropertyAttribute.BOUND, Integer.valueOf( 42 ) );
XPropertySetInfo propertyInfo = textFieldModel.getPropertySetInfo();
assure( "Per service definition, dynamic properties are expected to be forced to be removable",
@@ -171,7 +171,7 @@ public class FormPropertyBags extends complexlib.ComplexTestCase implements XPro
// all persistent properties should have the expected values
assure( "persistent properties did not survive reload (1)!", ((String)textFieldModel.getPropertyValue( "SomeBoundText" )).equals( "ChangedBoundText" ) );
assure( "persistent properties did not survive reload (2)!", ((String)textFieldModel.getPropertyValue( "SomeReadonlyText" )).equals( "InitialReadonlyText" ) );
-// assure( "persistent properties did not survive reload (3)!", ((Integer)textFieldModel.getPropertyValue( "SomeNumericValue" )).equals( new Integer( 42 ) ) );
+// assure( "persistent properties did not survive reload (3)!", ((Integer)textFieldModel.getPropertyValue( "SomeNumericValue" )).equals( Integer.valueOf( 42 ) ) );
// cannot check this until the types really survice - at the moment, integers are converted to doubles ...
// the transient property should not have survived
diff --git a/forms/qa/integration/forms/MasterDetailForms.java b/forms/qa/integration/forms/MasterDetailForms.java
index 48868bce8397..3117c3661f98 100644
--- a/forms/qa/integration/forms/MasterDetailForms.java
+++ b/forms/qa/integration/forms/MasterDetailForms.java
@@ -119,14 +119,14 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
{
m_masterForm = dbfTools.queryPropertySet( m_orb.createInstance( "com.sun.star.form.component.DataForm" ) );
m_masterForm.setPropertyValue( "ActiveConnection", _databaseDocument.defaultConnection().getXConnection() );
- m_masterForm.setPropertyValue( "CommandType", new Integer( com.sun.star.sdb.CommandType.TABLE ) );
+ m_masterForm.setPropertyValue( "CommandType", Integer.valueOf( com.sun.star.sdb.CommandType.TABLE ) );
m_masterForm.setPropertyValue( "Command", "master" );
m_masterResult = new ResultSet( m_masterForm );
m_detailForm = dbfTools.queryPropertySet( m_orb.createInstance( "com.sun.star.form.component.DataForm" ) );
m_detailForm.setPropertyValue( "ActiveConnection", _databaseDocument.defaultConnection().getXConnection() );
- m_detailForm.setPropertyValue( "CommandType", new Integer( com.sun.star.sdb.CommandType.TABLE ) );
+ m_detailForm.setPropertyValue( "CommandType", Integer.valueOf( com.sun.star.sdb.CommandType.TABLE ) );
m_detailForm.setPropertyValue( "Command", "detail" );
m_detailResult = new ResultSet( m_detailForm );
@@ -241,12 +241,12 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
m_masterForm = (XPropertySet)dbfTools.getParent( controlModel, XPropertySet.class );
m_masterForm.setPropertyValue( "Command", "categories" );
- m_masterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) );
+ m_masterForm.setPropertyValue( "CommandType", Integer.valueOf( CommandType.TABLE ) );
// create a detail form
m_detailForm = UnoRuntime.queryInterface( XPropertySet.class, subDocument.createSubForm( m_masterForm, "products" ) );
m_detailForm.setPropertyValue( "Command", "SELECT \"ID\", \"Name\", \"CategoryID\" FROM \"products\"" );
- m_detailForm.setPropertyValue( "CommandType", new Integer( CommandType.COMMAND ) );
+ m_detailForm.setPropertyValue( "CommandType", Integer.valueOf( CommandType.COMMAND ) );
m_detailForm.setPropertyValue( "MasterFields", new String[] { "ID" } );
m_detailForm.setPropertyValue( "DetailFields", new String[] { "CategoryID" } );
@@ -256,7 +256,7 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
XIndexContainer gridColumns = UnoRuntime.queryInterface( XIndexContainer.class, gridControlModel );
impl_createGridColumn( gridColumns, "TextField", "ID" );
XPropertySet nameColumn = impl_createGridColumn( gridColumns, "TextField", "Name" );
- nameColumn.setPropertyValue( "Width", new Integer( 600 ) ); // 6 cm
+ nameColumn.setPropertyValue( "Width", Integer.valueOf( 600 ) ); // 6 cm
nameColumn.setPropertyValue( "DefaultText", "default text" );
// go live
diff --git a/forms/qa/integration/forms/SingleControlValidation.java b/forms/qa/integration/forms/SingleControlValidation.java
index 160d23e867c9..044af2f22afe 100644
--- a/forms/qa/integration/forms/SingleControlValidation.java
+++ b/forms/qa/integration/forms/SingleControlValidation.java
@@ -155,7 +155,7 @@ public class SingleControlValidation implements XFormComponentValidityListener
boolean isValid = xComp.isValid();
m_statusField.setPropertyValue("Label", isValid ? "valid" : "invalid" );
- m_statusField.setPropertyValue( "TextColor", new Integer( isValid ? 0x008000 : 0x800000 ) );
+ m_statusField.setPropertyValue( "TextColor", Integer.valueOf( isValid ? 0x008000 : 0x800000 ) );
String validityMessage = "";
if ( !isValid )