summaryrefslogtreecommitdiff
path: root/forms/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 14:00:54 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:16 +0200
commitbe1bb7b1ccee28be616b89cc95e97d656e78bbe3 (patch)
treed67d16a68d1469b5096a27c743c4b0326a0c0ebe /forms/qa
parent56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff)
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'forms/qa')
-rw-r--r--forms/qa/integration/forms/CellBinding.java8
-rw-r--r--forms/qa/integration/forms/ControlValidation.java6
-rw-r--r--forms/qa/integration/forms/FormControlTest.java10
-rw-r--r--forms/qa/integration/forms/ListBox.java2
-rw-r--r--forms/qa/integration/forms/ListSelection.java2
-rw-r--r--forms/qa/integration/forms/SingleControlValidation.java2
-rw-r--r--forms/qa/integration/forms/XMLFormSettings.java2
-rw-r--r--forms/qa/org/openoffice/xforms/Model.java2
8 files changed, 17 insertions, 17 deletions
diff --git a/forms/qa/integration/forms/CellBinding.java b/forms/qa/integration/forms/CellBinding.java
index 784355b89173..e2dd6e86a400 100644
--- a/forms/qa/integration/forms/CellBinding.java
+++ b/forms/qa/integration/forms/CellBinding.java
@@ -215,7 +215,7 @@ public class CellBinding extends complexlib.ComplexTestCase
{
XPropertySet checkBox = m_formLayer.createControlAndShape( "DatabaseCheckBox", 30, 59, 40, 4 );
checkBox.setPropertyValue( "Label", "check box" );
- checkBox.setPropertyValue( "TriState", new Boolean( true ) );
+ checkBox.setPropertyValue( "TriState", Boolean.TRUE );
short col = (short)0;
short row = (short)13;
@@ -245,7 +245,7 @@ public class CellBinding extends complexlib.ComplexTestCase
XPropertySet checkBox = m_formLayer.createControlAndShape( "DatabaseCheckBox", 30, 68, 40, 4 );
checkBox.setPropertyValue( "Label", "check box with ref value" );
- checkBox.setPropertyValue( "TriState", new Boolean( true ) );
+ checkBox.setPropertyValue( "TriState", Boolean.TRUE );
checkBox.setPropertyValue( "RefValue", refValue );
short col = (short)0;
@@ -276,7 +276,7 @@ public class CellBinding extends complexlib.ComplexTestCase
public void checkListBoxBinding( ) throws com.sun.star.uno.Exception, java.lang.Exception
{
XPropertySet listBox = m_formLayer.createControlAndShape( "DatabaseListBox", 30, 80, 40, 6 );
- listBox.setPropertyValue( "Dropdown", new Boolean( true ) );
+ listBox.setPropertyValue( "Dropdown", Boolean.TRUE );
listBox.setPropertyValue( "StringItemList", new String[] { "Apples", "Oranges", "Peaches" } );
short col = (short)0;
@@ -317,7 +317,7 @@ public class CellBinding extends complexlib.ComplexTestCase
public void checkListBoxIndexBinding() throws com.sun.star.uno.Exception, java.lang.Exception
{
XPropertySet listBox = m_formLayer.createControlAndShape( "DatabaseListBox", 30, 94, 40, 6 );
- listBox.setPropertyValue( "Dropdown", new Boolean( true ) );
+ listBox.setPropertyValue( "Dropdown", Boolean.TRUE );
listBox.setPropertyValue( "StringItemList", new String[] { "Pears", "Bananas", "Strawberries" } );
short col = (short)0;
diff --git a/forms/qa/integration/forms/ControlValidation.java b/forms/qa/integration/forms/ControlValidation.java
index 6946307578ba..c4994c0bbc60 100644
--- a/forms/qa/integration/forms/ControlValidation.java
+++ b/forms/qa/integration/forms/ControlValidation.java
@@ -119,21 +119,21 @@ public class ControlValidation extends complexlib.ComplexTestCase implements com
validation = new SingleControlValidation( m_document, 5, 55, "DatabaseDateField", new DateValidator() );
validation.setExplanatoryText( "Please enter a date in the current month" );
- validation.getInputField().setPropertyValue( "Dropdown", new Boolean( true ) );
+ validation.getInputField().setPropertyValue( "Dropdown", Boolean.TRUE );
validation = new SingleControlValidation( m_document, 90, 55, "DatabaseTimeField", new TimeValidator() );
validation.setExplanatoryText( "Please enter a time. Valid values are all full hours." );
validation = new SingleControlValidation( m_document, 5, 110, "DatabaseCheckBox", new BooleanValidator( false ) );
validation.setExplanatoryText( "Please check (well, or uncheck) the box. Don't leave it in indetermined state." );
- validation.getInputField().setPropertyValue( "TriState", new Boolean( true ) );
+ validation.getInputField().setPropertyValue( "TriState", Boolean.TRUE );
validation = new SingleControlValidation( m_document, 90, 110, "DatabaseRadioButton", new BooleanValidator( true ), 3, 0 );
validation.setExplanatoryText( "Please check any but the first button" );
validation = new SingleControlValidation( m_document, 5, 165, "DatabaseListBox", new ListSelectionValidator( ), 1, 24 );
validation.setExplanatoryText( "Please select not more than two entries." );
- validation.getInputField().setPropertyValue( "MultiSelection", new Boolean( true ) );
+ validation.getInputField().setPropertyValue( "MultiSelection", Boolean.TRUE );
validation.getInputField().setPropertyValue( "StringItemList", new String[] { "first", "second", "third", "forth", "fivth" } );
// switch to alive mode
diff --git a/forms/qa/integration/forms/FormControlTest.java b/forms/qa/integration/forms/FormControlTest.java
index b6932e316a7b..bf741e0a8de4 100644
--- a/forms/qa/integration/forms/FormControlTest.java
+++ b/forms/qa/integration/forms/FormControlTest.java
@@ -487,7 +487,7 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
XPropertySet dataSourceSettings = UnoRuntime.queryInterface( XPropertySet.class,
m_dataSourceProps.getPropertyValue( "Settings" ) );
- dataSourceSettings.setPropertyValue( "FormsCheckRequiredFields", new Boolean( false ) );
+ dataSourceSettings.setPropertyValue( "FormsCheckRequiredFields", Boolean.FALSE );
return m_dataSource != null;
}
@@ -527,13 +527,13 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
m_formLayer.insertControlLine( "DatabaseTextField", "dummy", "", 150 );
xIDField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
- xImageField.setPropertyValue( "ScaleImage", new Boolean( true) );
- xImageField.setPropertyValue( "Tabstop", new Boolean( true ) );
- xCheckBox.setPropertyValue( "TriState", new Boolean( true ) );
+ 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 ) );
xTimeField.setPropertyValue( "TimeMax", new Integer( 23595999 ) );
- xReqField.setPropertyValue( "ConvertEmptyToNull", new Boolean( false ) );
+ xReqField.setPropertyValue( "ConvertEmptyToNull", Boolean.FALSE );
// the logical form
m_masterForm = (XPropertySet)dbfTools.getParent( xIDField, XPropertySet.class );
diff --git a/forms/qa/integration/forms/ListBox.java b/forms/qa/integration/forms/ListBox.java
index 8d3bcc7d5d0d..60f115df6221 100644
--- a/forms/qa/integration/forms/ListBox.java
+++ b/forms/qa/integration/forms/ListBox.java
@@ -273,7 +273,7 @@ public class ListBox extends TestCase
final String columnFKName = fieldTypes[i] + "_fk";
final String columnPKName = fieldTypes[i] + "_pk";
XPropertySet listBoxModel = m_formLayer.insertControlLine( "DatabaseListBox", columnFKName, null, 10, 20 + 10*i, 6 );
- listBoxModel.setPropertyValue( "Dropdown", new Boolean( true ) );
+ listBoxModel.setPropertyValue( "Dropdown", Boolean.TRUE );
listBoxModel.setPropertyValue( "ListSourceType", ListSourceType.SQL );
listBoxModel.setPropertyValue( "ListSource", new String[] { "SELECT \"content\", \"" + columnPKName +
"\" FROM \"" + tableName + "\"" } );
diff --git a/forms/qa/integration/forms/ListSelection.java b/forms/qa/integration/forms/ListSelection.java
index 17a63bde458e..ee7d7ca4606a 100644
--- a/forms/qa/integration/forms/ListSelection.java
+++ b/forms/qa/integration/forms/ListSelection.java
@@ -247,7 +247,7 @@ public class ListSelection extends integration.forms.TestCase
// and a list box
XPropertySet listBox = m_formLayer.createControlAndShape( "ListBox", 50, 10, 40, 6 );
- listBox.setPropertyValue( "Dropdown", new Boolean( true ) );
+ listBox.setPropertyValue( "Dropdown", Boolean.TRUE );
listBox.setPropertyValue( "StringItemList", newSheetNames );
listBox.setPropertyValue( "Name", "ListBox" );
diff --git a/forms/qa/integration/forms/SingleControlValidation.java b/forms/qa/integration/forms/SingleControlValidation.java
index c0e1508bf013..160d23e867c9 100644
--- a/forms/qa/integration/forms/SingleControlValidation.java
+++ b/forms/qa/integration/forms/SingleControlValidation.java
@@ -78,7 +78,7 @@ public class SingleControlValidation implements XFormComponentValidityListener
try
{
m_inputLabel = m_formLayer.createControlAndShape( "FixedText", columnPos, rowPos, 70, 12, null );
- m_inputLabel.setPropertyValue( "MultiLine", new Boolean( true ) );
+ m_inputLabel.setPropertyValue( "MultiLine", Boolean.TRUE );
com.sun.star.awt.FontDescriptor font = (com.sun.star.awt.FontDescriptor)m_inputLabel.getPropertyValue( "FontDescriptor" );
font.Weight = com.sun.star.awt.FontWeight.BOLD;
diff --git a/forms/qa/integration/forms/XMLFormSettings.java b/forms/qa/integration/forms/XMLFormSettings.java
index 31ab48e0a790..c23e648f3d5c 100644
--- a/forms/qa/integration/forms/XMLFormSettings.java
+++ b/forms/qa/integration/forms/XMLFormSettings.java
@@ -153,7 +153,7 @@ public class XMLFormSettings extends complexlib.ComplexTestCase
XPropertySet dateControl = m_formLayer.createControlAndShape(
"DatabaseDateField", 40, 26, 25, 6 );
- dateControl.setPropertyValue( "Dropdown", new Boolean( true ) );
+ dateControl.setPropertyValue( "Dropdown", Boolean.TRUE );
impl_bind( dateControl, m_dateBinding );
m_document.getCurrentView( ).toggleFormDesignMode( );
diff --git a/forms/qa/org/openoffice/xforms/Model.java b/forms/qa/org/openoffice/xforms/Model.java
index c8e5c880042a..a573fe5bf974 100644
--- a/forms/qa/org/openoffice/xforms/Model.java
+++ b/forms/qa/org/openoffice/xforms/Model.java
@@ -75,7 +75,7 @@ public class Model
{
try
{
- m_modelProps.setPropertyValue("ExternalData", new Boolean(!_internalData));
+ m_modelProps.setPropertyValue("ExternalData", Boolean.valueOf(!_internalData));
}
catch (Exception ex)
{