summaryrefslogtreecommitdiff
path: root/scripting
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 /scripting
parentbe1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff)
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'scripting')
-rw-r--r--scripting/examples/java/Highlight/HighlightText.java2
-rw-r--r--scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java72
-rw-r--r--scripting/java/com/sun/star/script/framework/browse/DialogFactory.java8
-rw-r--r--scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java2
-rw-r--r--scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java2
-rw-r--r--scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java2
-rw-r--r--scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java2
-rw-r--r--scripting/workben/ifc/scripting/_XScriptInvocation.java2
-rw-r--r--scripting/workben/ifc/scripting/_XScriptNameResolver.java2
-rw-r--r--scripting/workben/ifc/scripting/_XScriptSecurity.java2
-rw-r--r--scripting/workben/mod/_scripting/ScriptInfo.java2
-rw-r--r--scripting/workben/mod/_scripting/ScriptStorage.java2
12 files changed, 50 insertions, 50 deletions
diff --git a/scripting/examples/java/Highlight/HighlightText.java b/scripting/examples/java/Highlight/HighlightText.java
index 11f5249acba8..8da530161ae7 100644
--- a/scripting/examples/java/Highlight/HighlightText.java
+++ b/scripting/examples/java/Highlight/HighlightText.java
@@ -152,7 +152,7 @@ public class HighlightText implements com.sun.star.awt.XActionListener {
// Sets the replaced text property color value to RGB parameter
PropertyValue cv = new PropertyValue("CharColor", -1,
- new Integer(red),
+ Integer.valueOf(red),
com.sun.star.beans.PropertyState.DIRECT_VALUE);
// Apply the properties
diff --git a/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java b/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java
index 57e72843203c..5c1523ec5301 100644
--- a/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java
+++ b/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java
@@ -237,10 +237,10 @@ XInitialization {
"com.sun.star.awt.UnoControlDialogModel", _xComponentContext );
XPropertySet xPSetDialog = UnoRuntime.queryInterface(
XPropertySet.class, dialogModel );
- xPSetDialog.setPropertyValue( "PositionX", new Integer( dialogX) );
- xPSetDialog.setPropertyValue( "PositionY", new Integer( dialogY));
- xPSetDialog.setPropertyValue( "Width", new Integer( dialogW+cbIncrW ));
- xPSetDialog.setPropertyValue( "Height", new Integer( dialogH+cbIncrH ));
+ xPSetDialog.setPropertyValue( "PositionX", Integer.valueOf( dialogX) );
+ xPSetDialog.setPropertyValue( "PositionY", Integer.valueOf( dialogY));
+ xPSetDialog.setPropertyValue( "Width", Integer.valueOf( dialogW+cbIncrW ));
+ xPSetDialog.setPropertyValue( "Height", Integer.valueOf( dialogH+cbIncrH ));
xPSetDialog.setPropertyValue( "Title", _title );
// get the service manager from the dialog model
@@ -254,10 +254,10 @@ XInitialization {
XPropertySet.class, runButtonModel );
LogUtils.DEBUG("run: x="+(((dialogW+cbIncrW)/2)-runButtonW -1) );
LogUtils.DEBUG("run: y="+(dialogH+cbIncrH-runButtonH-1));
- xPSetButton.setPropertyValue( "PositionX", new Integer( (((dialogW+cbIncrW)/2)-runButtonW -1) ));
- xPSetButton.setPropertyValue( "PositionY", new Integer( dialogH+cbIncrH-runButtonH-1));
- xPSetButton.setPropertyValue( "Width", new Integer( runButtonW ));
- xPSetButton.setPropertyValue( "Height", new Integer( runButtonH ));
+ xPSetButton.setPropertyValue( "PositionX", Integer.valueOf( (((dialogW+cbIncrW)/2)-runButtonW -1) ));
+ xPSetButton.setPropertyValue( "PositionY", Integer.valueOf( dialogH+cbIncrH-runButtonH-1));
+ xPSetButton.setPropertyValue( "Width", Integer.valueOf( runButtonW ));
+ xPSetButton.setPropertyValue( "Height", Integer.valueOf( runButtonH ));
xPSetButton.setPropertyValue( "Name", _runButtonName );
xPSetButton.setPropertyValue( "TabIndex", new Short( (short)1 ) );
xPSetButton.setPropertyValue( "Label", _runMacro );
@@ -269,10 +269,10 @@ XInitialization {
XPropertySet.class, doNotRunButtonModel );
LogUtils.DEBUG("dontrun: x="+(((dialogW+cbIncrW)/2)-1) );
LogUtils.DEBUG("dontrun: y="+(dialogH+cbIncrH-doNotRunButtonH-1 ));
- xPSetButton.setPropertyValue( "PositionX", new Integer( (((dialogW+cbIncrW)/2) + 1) ));
- xPSetButton.setPropertyValue( "PositionY", new Integer( (dialogH+cbIncrH-doNotRunButtonH-1 ) ));
- xPSetButton.setPropertyValue( "Width", new Integer( doNotRunButtonW ));
- xPSetButton.setPropertyValue( "Height", new Integer( doNotRunButtonH ));
+ xPSetButton.setPropertyValue( "PositionX", Integer.valueOf( (((dialogW+cbIncrW)/2) + 1) ));
+ xPSetButton.setPropertyValue( "PositionY", Integer.valueOf( (dialogH+cbIncrH-doNotRunButtonH-1 ) ));
+ xPSetButton.setPropertyValue( "Width", Integer.valueOf( doNotRunButtonW ));
+ xPSetButton.setPropertyValue( "Height", Integer.valueOf( doNotRunButtonH ));
xPSetButton.setPropertyValue( "Name", _doNotRunButtonName );
xPSetButton.setPropertyValue( "TabIndex", new Short( (short)0 ) );
xPSetButton.setPropertyValue( "Label", _doNotRunMacro );
@@ -291,10 +291,10 @@ XInitialization {
"com.sun.star.awt.UnoControlFixedTextModel" );
XPropertySet xPSetLabel = UnoRuntime.queryInterface(
XPropertySet.class, label2Model );
- xPSetLabel.setPropertyValue( "PositionX", new Integer( label2X ));
- xPSetLabel.setPropertyValue( "PositionY", new Integer( label2Y ));
- xPSetLabel.setPropertyValue( "Width", new Integer( label2W ));
- xPSetLabel.setPropertyValue( "Height", new Integer( label2H ));
+ xPSetLabel.setPropertyValue( "PositionX", Integer.valueOf( label2X ));
+ xPSetLabel.setPropertyValue( "PositionY", Integer.valueOf( label2Y ));
+ xPSetLabel.setPropertyValue( "Width", Integer.valueOf( label2W ));
+ xPSetLabel.setPropertyValue( "Height", Integer.valueOf( label2H ));
xPSetLabel.setPropertyValue( "Name", _label2Name );
xPSetLabel.setPropertyValue( "TabIndex", new Short( (short)1 ) );
xPSetLabel.setPropertyValue( "Label", _label2String );
@@ -304,10 +304,10 @@ XInitialization {
"com.sun.star.awt.UnoControlFixedTextModel" );
XPropertySet xPSetLabel3 = UnoRuntime.queryInterface(
XPropertySet.class, label3Model );
- xPSetLabel3.setPropertyValue( "PositionX", new Integer( label3X ));
- xPSetLabel3.setPropertyValue( "PositionY", new Integer( label3Y ));
- xPSetLabel3.setPropertyValue( "Width", new Integer( label3W ));
- xPSetLabel3.setPropertyValue( "Height", new Integer( label3H ));
+ xPSetLabel3.setPropertyValue( "PositionX", Integer.valueOf( label3X ));
+ xPSetLabel3.setPropertyValue( "PositionY", Integer.valueOf( label3Y ));
+ xPSetLabel3.setPropertyValue( "Width", Integer.valueOf( label3W ));
+ xPSetLabel3.setPropertyValue( "Height", Integer.valueOf( label3H ));
xPSetLabel3.setPropertyValue( "Name", _label3Name );
xPSetLabel3.setPropertyValue( "TabIndex", new Short( (short)1 ) );
xPSetLabel3.setPropertyValue( "Label", _label3String );
@@ -317,10 +317,10 @@ XInitialization {
"com.sun.star.awt.UnoControlFixedTextModel" );
XPropertySet xPSetLabel4 = UnoRuntime.queryInterface(
XPropertySet.class, label4Model );
- xPSetLabel4.setPropertyValue( "PositionX", new Integer( label4X ));
- xPSetLabel4.setPropertyValue( "PositionY", new Integer( label4Y ));
- xPSetLabel4.setPropertyValue( "Width", new Integer( label4W ));
- xPSetLabel4.setPropertyValue( "Height", new Integer( label4H ));
+ xPSetLabel4.setPropertyValue( "PositionX", Integer.valueOf( label4X ));
+ xPSetLabel4.setPropertyValue( "PositionY", Integer.valueOf( label4Y ));
+ xPSetLabel4.setPropertyValue( "Width", Integer.valueOf( label4W ));
+ xPSetLabel4.setPropertyValue( "Height", Integer.valueOf( label4H ));
xPSetLabel4.setPropertyValue( "Name", _label4Name );
xPSetLabel4.setPropertyValue( "TabIndex", new Short( (short)1 ) );
xPSetLabel4.setPropertyValue( "Label", _label4String );
@@ -330,10 +330,10 @@ XInitialization {
"com.sun.star.awt.UnoControlCheckBoxModel" );
XPropertySet xPSetCheckBox = UnoRuntime.queryInterface(
XPropertySet.class, checkBoxModel );
- xPSetCheckBox.setPropertyValue( "PositionX", new Integer( checkBoxX ));
- xPSetCheckBox.setPropertyValue( "PositionY", new Integer( checkBoxY ));
- xPSetCheckBox.setPropertyValue( "Width", new Integer( checkBoxW ));
- xPSetCheckBox.setPropertyValue( "Height", new Integer( checkBoxH ));
+ xPSetCheckBox.setPropertyValue( "PositionX", Integer.valueOf( checkBoxX ));
+ xPSetCheckBox.setPropertyValue( "PositionY", Integer.valueOf( checkBoxY ));
+ xPSetCheckBox.setPropertyValue( "Width", Integer.valueOf( checkBoxW ));
+ xPSetCheckBox.setPropertyValue( "Height", Integer.valueOf( checkBoxH ));
xPSetCheckBox.setPropertyValue( "State", new Short((short)0) );
xPSetCheckBox.setPropertyValue( "Name", _checkBoxName );
xPSetCheckBox.setPropertyValue( "TabIndex", new Short( (short)1 ) );
@@ -352,10 +352,10 @@ XInitialization {
"com.sun.star.awt.UnoControlFixedTextModel" );
XPropertySet xPSetLabel5 = UnoRuntime.queryInterface(
XPropertySet.class, label5Model );
- xPSetLabel5.setPropertyValue( "PositionX", new Integer( label5X ));
- xPSetLabel5.setPropertyValue( "PositionY", new Integer( label5Y ));
- xPSetLabel5.setPropertyValue( "Width", new Integer( label5W ));
- xPSetLabel5.setPropertyValue( "Height", new Integer( label5H ));
+ xPSetLabel5.setPropertyValue( "PositionX", Integer.valueOf( label5X ));
+ xPSetLabel5.setPropertyValue( "PositionY", Integer.valueOf( label5Y ));
+ xPSetLabel5.setPropertyValue( "Width", Integer.valueOf( label5W ));
+ xPSetLabel5.setPropertyValue( "Height", Integer.valueOf( label5H ));
xPSetLabel5.setPropertyValue( "Name", _label5Name );
xPSetLabel5.setPropertyValue( "TabIndex", new Short( (short)1 ) );
xPSetLabel5.setPropertyValue( "Label", checkBoxPath2 );
@@ -369,10 +369,10 @@ XInitialization {
"com.sun.star.awt.UnoControlFixedTextModel" );
XPropertySet xPSetLabel = UnoRuntime.queryInterface(
XPropertySet.class, labelModel );
- xPSetLabel.setPropertyValue( "PositionX", new Integer( label1X ));
- xPSetLabel.setPropertyValue( "PositionY", new Integer( label1Y ));
- xPSetLabel.setPropertyValue( "Width", new Integer( label1W ));
- xPSetLabel.setPropertyValue( "Height", new Integer( label1H ));
+ xPSetLabel.setPropertyValue( "PositionX", Integer.valueOf( label1X ));
+ xPSetLabel.setPropertyValue( "PositionY", Integer.valueOf( label1Y ));
+ xPSetLabel.setPropertyValue( "Width", Integer.valueOf( label1W ));
+ xPSetLabel.setPropertyValue( "Height", Integer.valueOf( label1H ));
xPSetLabel.setPropertyValue( "Name", _label1Name );
xPSetLabel.setPropertyValue( "TabIndex", new Short( (short)1 ) );
xPSetLabel.setPropertyValue( "Label", _label1String );
diff --git a/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java b/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java
index 6e46e193f8cf..78c97cf5b07a 100644
--- a/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java
+++ b/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java
@@ -131,10 +131,10 @@ public class DialogFactory
{
XPropertySet props = UnoRuntime.queryInterface(XPropertySet.class, o);
- props.setPropertyValue("PositionX", new Integer(x));
- props.setPropertyValue("PositionY", new Integer(y));
- props.setPropertyValue("Height", new Integer(height));
- props.setPropertyValue("Width", new Integer(width));
+ props.setPropertyValue("PositionX", Integer.valueOf(x));
+ props.setPropertyValue("PositionY", Integer.valueOf(y));
+ props.setPropertyValue("Height", Integer.valueOf(height));
+ props.setPropertyValue("Width", Integer.valueOf(width));
}
private XDialog createInputDialog(String title, String prompt)
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java
index 0fe4b8b1518b..137d1a21ca6f 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java
@@ -76,7 +76,7 @@ public class InstallationPathDescriptor extends WizardDescriptor {
protected void updateState() {
super.updateState();
putProperty("WizardPanel_contentData", iterator.getSteps()); // NOI18N
- putProperty("WizardPanel_contentSelectedIndex", new Integer(iterator.getIndex())); // NOI18N
+ putProperty("WizardPanel_contentSelectedIndex", Integer.valueOf(iterator.getIndex())); // NOI18N
}
}
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java
index 4aee8814a065..918bcbdf0b49 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java
@@ -87,7 +87,7 @@ public class InstallationPathIterator implements WizardDescriptor.Iterator {
public String name() {
return NbBundle.getMessage(InstallationPathIterator.class, "TITLE_x_of_y",
- new Integer(index + 1), new Integer(getPanels().length));
+ Integer.valueOf(index + 1), Integer.valueOf(getPanels().length));
}
public boolean hasNext() {
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java
index bf22ecfc35d2..8a326201301b 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java
@@ -161,7 +161,7 @@ public class JavaScriptIterator implements TemplateWizard.Iterator {
if (c instanceof JComponent) { // assume Swing components
JComponent jc = (JComponent)c;
// Step #.
- jc.putClientProperty("WizardPanel_contentSelectedIndex", new Integer(i)); // NOI18N
+ jc.putClientProperty("WizardPanel_contentSelectedIndex", Integer.valueOf(i)); // NOI18N
// Step name (actually the whole list for reference).
jc.putClientProperty("WizardPanel_contentData", steps); // NOI18N
}
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java
index a48ff2d1592f..510a9adb638c 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java
@@ -163,7 +163,7 @@ public class ParcelContentsIterator implements TemplateWizard.Iterator {
if (c instanceof JComponent) { // assume Swing components
JComponent jc = (JComponent)c;
// Step #.
- jc.putClientProperty("WizardPanel_contentSelectedIndex", new Integer(i)); // NOI18N
+ jc.putClientProperty("WizardPanel_contentSelectedIndex", Integer.valueOf(i)); // NOI18N
// Step name (actually the whole list for reference).
jc.putClientProperty("WizardPanel_contentData", steps); // NOI18N
}
diff --git a/scripting/workben/ifc/scripting/_XScriptInvocation.java b/scripting/workben/ifc/scripting/_XScriptInvocation.java
index ba96ccc55f78..e7c4e28acf46 100644
--- a/scripting/workben/ifc/scripting/_XScriptInvocation.java
+++ b/scripting/workben/ifc/scripting/_XScriptInvocation.java
@@ -90,7 +90,7 @@ public class _XScriptInvocation extends MultiMethodTest {
ctx = loadDocument(context);
HashMap<String,Object> map = new HashMap<String,Object>();
- map.put("SCRIPTING_DOC_STORAGE_ID", new Integer(storageId));
+ map.put("SCRIPTING_DOC_STORAGE_ID", Integer.valueOf(storageId));
map.put("SCRIPTING_DOC_URI", "hahaha");
if (ctx != null)
map.put("SCRIPTING_DOC_REF", ctx);
diff --git a/scripting/workben/ifc/scripting/_XScriptNameResolver.java b/scripting/workben/ifc/scripting/_XScriptNameResolver.java
index f62c0baf24d8..77385d28a3be 100644
--- a/scripting/workben/ifc/scripting/_XScriptNameResolver.java
+++ b/scripting/workben/ifc/scripting/_XScriptNameResolver.java
@@ -82,7 +82,7 @@ public class _XScriptNameResolver extends MultiMethodTest {
log.println(description + ": " + logicalname);
HashMap<String,Object> map = new HashMap<String,Object>();
- map.put("SCRIPTING_DOC_STORAGE_ID", new Integer(storageId));
+ map.put("SCRIPTING_DOC_STORAGE_ID", Integer.valueOf(storageId));
map.put("SCRIPTING_DOC_URI", util.utils.getFullTestURL(location));
Parameters params = new Parameters(map);
diff --git a/scripting/workben/ifc/scripting/_XScriptSecurity.java b/scripting/workben/ifc/scripting/_XScriptSecurity.java
index 4f6abe8edbf8..7791aa92a13e 100644
--- a/scripting/workben/ifc/scripting/_XScriptSecurity.java
+++ b/scripting/workben/ifc/scripting/_XScriptSecurity.java
@@ -278,7 +278,7 @@ public class _XScriptSecurity extends MultiMethodTest {
xNameReplace.replaceByName( "SecureURL", aSecureURLs );
log.println("setting OfficeBasic");
- xNameReplace.replaceByName( "OfficeBasic", new Integer(officeBasic) );
+ xNameReplace.replaceByName( "OfficeBasic", Integer.valueOf(officeBasic) );
Boolean bConfirm = null;
if( ( confirm != null ) && ( confirm.equals("true") ) )
diff --git a/scripting/workben/mod/_scripting/ScriptInfo.java b/scripting/workben/mod/_scripting/ScriptInfo.java
index c1fd57520c3f..8001ca99d5c7 100644
--- a/scripting/workben/mod/_scripting/ScriptInfo.java
+++ b/scripting/workben/mod/_scripting/ScriptInfo.java
@@ -77,7 +77,7 @@ public class ScriptInfo extends TestCase {
access = UnoRuntime.queryInterface( XSimpleFileAccess.class, xInterface );
Object storageObj = xMSF.createInstanceWithArguments(
"drafts.com.sun.star.script.framework.storage.ScriptStorage",
- new Object[]{ access, new Integer(99), docPath } );
+ new Object[]{ access, Integer.valueOf(99), docPath } );
XScriptInfoAccess infoAccess = UnoRuntime.queryInterface(XScriptInfoAccess.class, storageObj);
XScriptInfo[] infos = infoAccess.getImplementations("script://MemoryUtils.MemUsage?location=document");
oObj = infos[0];
diff --git a/scripting/workben/mod/_scripting/ScriptStorage.java b/scripting/workben/mod/_scripting/ScriptStorage.java
index 1d55c18060af..dc8749bf103f 100644
--- a/scripting/workben/mod/_scripting/ScriptStorage.java
+++ b/scripting/workben/mod/_scripting/ScriptStorage.java
@@ -74,7 +74,7 @@ public class ScriptStorage extends TestCase {
access = UnoRuntime.queryInterface( XSimpleFileAccess.class, xInterface );
oObj = ( XInterface )xMSF.createInstanceWithArguments(
"drafts.com.sun.star.script.framework.storage.ScriptStorage",
- new Object[]{ access, new Integer(99), docPath } );
+ new Object[]{ access, Integer.valueOf(99), docPath } );
} catch (com.sun.star.uno.Exception e) {
throw new StatusException("Can't create object environment", e) ;