summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 15:12:27 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:18 +0200
commit0764292c5dcb7daa62e9adeb1ac9af1dbe14066f (patch)
tree17a4e9f2393d23aaba1e68bbc944aa8e18b9e2f6 /odk
parent8a2c6c29af41cd7a62f37861fb0d4e81a857bb45 (diff)
java: use 'Short.valueOf' instead of 'new Short'
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java8
-rw-r--r--odk/examples/DevelopersGuide/Charts/ChartHelper.java4
-rw-r--r--odk/examples/DevelopersGuide/Forms/DataAwareness.java10
-rw-r--r--odk/examples/DevelopersGuide/Forms/FormLayer.java4
-rw-r--r--odk/examples/DevelopersGuide/Forms/SalesFilter.java4
-rw-r--r--odk/examples/DevelopersGuide/Forms/SingleControlValidation.java2
-rw-r--r--odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java8
-rw-r--r--odk/examples/DevelopersGuide/GUI/DialogDocument.java2
-rw-r--r--odk/examples/DevelopersGuide/GUI/ImageControlSample.java4
-rw-r--r--odk/examples/DevelopersGuide/GUI/SystemDialog.java2
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample.java20
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java4
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoMenu2.java2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java4
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java2
-rw-r--r--odk/examples/DevelopersGuide/Text/TextDocuments.java20
-rw-r--r--odk/examples/java/Text/WriterSelector.java2
18 files changed, 52 insertions, 52 deletions
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java b/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java
index f7479b26a8ca..c455e5ff9f2d 100644
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java
+++ b/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java
@@ -167,7 +167,7 @@ public class SampleDialog extends WeakBase implements XServiceInfo, XJobExecutor
xPSetButton.setPropertyValue( "Width", Integer.valueOf( 50 ) );
xPSetButton.setPropertyValue( "Height", Integer.valueOf( 14 ) );
xPSetButton.setPropertyValue( "Name", _buttonName );
- xPSetButton.setPropertyValue( "TabIndex", new Short( (short)0 ) );
+ xPSetButton.setPropertyValue( "TabIndex", Short.valueOf( (short)0 ) );
xPSetButton.setPropertyValue( "Label", new String( "Click Me" ) );
// create the label model and set the properties
@@ -180,7 +180,7 @@ public class SampleDialog extends WeakBase implements XServiceInfo, XJobExecutor
xPSetLabel.setPropertyValue( "Width", Integer.valueOf( 100 ) );
xPSetLabel.setPropertyValue( "Height", Integer.valueOf( 14 ) );
xPSetLabel.setPropertyValue( "Name", _labelName );
- xPSetLabel.setPropertyValue( "TabIndex", new Short( (short)1 ) );
+ xPSetLabel.setPropertyValue( "TabIndex", Short.valueOf( (short)1 ) );
xPSetLabel.setPropertyValue( "Label", _labelPrefix );
// create a Cancel button model and set the properties
@@ -193,8 +193,8 @@ public class SampleDialog extends WeakBase implements XServiceInfo, XJobExecutor
xPSetCancelButton.setPropertyValue( "Width", Integer.valueOf( 50 ) );
xPSetCancelButton.setPropertyValue( "Height", Integer.valueOf( 14 ) );
xPSetCancelButton.setPropertyValue( "Name", _cancelButtonName );
- xPSetCancelButton.setPropertyValue( "TabIndex", new Short( (short)2 ) );
- xPSetCancelButton.setPropertyValue( "PushButtonType", new Short( (short)2 ) );
+ xPSetCancelButton.setPropertyValue( "TabIndex", Short.valueOf( (short)2 ) );
+ xPSetCancelButton.setPropertyValue( "PushButtonType", Short.valueOf( (short)2 ) );
xPSetCancelButton.setPropertyValue( "Label", new String( "Cancel" ) );
// insert the control models into the dialog model
diff --git a/odk/examples/DevelopersGuide/Charts/ChartHelper.java b/odk/examples/DevelopersGuide/Charts/ChartHelper.java
index 90dccd153800..19d1ede85c45 100644
--- a/odk/examples/DevelopersGuide/Charts/ChartHelper.java
+++ b/odk/examples/DevelopersGuide/Charts/ChartHelper.java
@@ -108,10 +108,10 @@ public class ChartHelper
xShape.setSize( aExtent );
aAny = new Any(new Type(Short.class),
- new Short(com.sun.star.text.VertOrientation.NONE));
+ Short.valueOf(com.sun.star.text.VertOrientation.NONE));
xPropSet.setPropertyValue("VertOrient", aAny );
aAny = new Any(new Type(Short.class),
- new Short(com.sun.star.text.HoriOrientation.NONE));
+ Short.valueOf(com.sun.star.text.HoriOrientation.NONE));
xPropSet.setPropertyValue("HoriOrient", aAny );
aAny = new Any(new Type(Integer.class), Integer.valueOf(aUpperLeft.Y));
xPropSet.setPropertyValue("VertOrientPosition", aAny );
diff --git a/odk/examples/DevelopersGuide/Forms/DataAwareness.java b/odk/examples/DevelopersGuide/Forms/DataAwareness.java
index e7401c13bb34..1386aa316385 100644
--- a/odk/examples/DevelopersGuide/Forms/DataAwareness.java
+++ b/odk/examples/DevelopersGuide/Forms/DataAwareness.java
@@ -704,8 +704,8 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
m_formLayer.insertControlLine( "FormattedField", "BIRTHDATE", "", 51 );
// for the salesman number / zip code, we don't want to have decimal places:
- xSNRField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
- xZipField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
+ xSNRField.setPropertyValue( "DecimalAccuracy", Short.valueOf( (short)0 ) );
+ xZipField.setPropertyValue( "DecimalAccuracy", Short.valueOf( (short)0 ) );
/** need the form the control models belong to
@@ -771,10 +771,10 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
m_aSalesNameValidator = new GridFieldValidator( m_xCtx, xSalesNameColumn );
m_aSalesNameValidator.enableColumnWatch( m_bAllowEmptySales );
- xKeyColumn.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
+ xKeyColumn.setPropertyValue( "DecimalAccuracy", Short.valueOf( (short)0 ) );
// init the list box which is for choosing the customer a sale belongs to
- xCustomerColumn.setPropertyValue( "BoundColumn", new Short( (short)1 ) );
+ xCustomerColumn.setPropertyValue( "BoundColumn", Short.valueOf( (short)1 ) );
xCustomerColumn.setPropertyValue( "Label", "Customer" );
xCustomerColumn.setPropertyValue( "ListSourceType", ListSourceType.SQL );
@@ -859,7 +859,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
m_aSalesLocker.enableLock( m_bProtectKeyFields );
// initially, we want to generate keys when moving to a new record
- xKeyGen.setPropertyValue( "DefaultState", new Short( (short)1 ) );
+ xKeyGen.setPropertyValue( "DefaultState", Short.valueOf( (short)1 ) );
// second options block
diff --git a/odk/examples/DevelopersGuide/Forms/FormLayer.java b/odk/examples/DevelopersGuide/Forms/FormLayer.java
index 0e8ebb88eb44..6b049a2e5324 100644
--- a/odk/examples/DevelopersGuide/Forms/FormLayer.java
+++ b/odk/examples/DevelopersGuide/Forms/FormLayer.java
@@ -117,10 +117,10 @@ public class FormLayer
if ( xPSI.hasPropertyByName( "Border" ) )
{
if ( ((Short)xModelProps.getPropertyValue( "Border" )).shortValue() == com.sun.star.awt.VisualEffect.LOOK3D )
- xModelProps.setPropertyValue( "Border", new Short( com.sun.star.awt.VisualEffect.FLAT ) );
+ xModelProps.setPropertyValue( "Border", Short.valueOf( com.sun.star.awt.VisualEffect.FLAT ) );
}
if ( xPSI.hasPropertyByName( "VisualEffect" ) )
- xModelProps.setPropertyValue( "VisualEffect", new Short( com.sun.star.awt.VisualEffect.FLAT ) );
+ xModelProps.setPropertyValue( "VisualEffect", Short.valueOf( com.sun.star.awt.VisualEffect.FLAT ) );
if ( m_document.classify() != DocumentType.CALC )
if ( xPSI.hasPropertyByName( "BorderColor" ) )
xModelProps.setPropertyValue( "BorderColor", Integer.valueOf( 0x00C0C0C0 ) );
diff --git a/odk/examples/DevelopersGuide/Forms/SalesFilter.java b/odk/examples/DevelopersGuide/Forms/SalesFilter.java
index 2a6ed6a66c35..ee2aedf1c99d 100644
--- a/odk/examples/DevelopersGuide/Forms/SalesFilter.java
+++ b/odk/examples/DevelopersGuide/Forms/SalesFilter.java
@@ -84,9 +84,9 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis
// init control models
m_xFilterList.setPropertyValue( "Dropdown", Boolean.TRUE );
- m_xFilterList.setPropertyValue( "LineCount", new Short( (short)11 ) );
+ m_xFilterList.setPropertyValue( "LineCount", Short.valueOf( (short)11 ) );
m_xFilterList.setPropertyValue( "StringItemList", new String[] { "ever (means no filter)", "this morning", "1 week ago", "1 month ago", "1 year ago", "<other>" } );
- m_xFilterList.setPropertyValue( "DefaultSelection", new Short[] { new Short( (short)0 ) } );
+ m_xFilterList.setPropertyValue( "DefaultSelection", new Short[] { Short.valueOf( (short)0 ) } );
m_xApplyFilter.setPropertyValue( "Label", "Apply Filter" );
diff --git a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
index f4c2e0fba29f..115d4c381bff 100644
--- a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
+++ b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
@@ -92,7 +92,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 ] );
diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
index d599eeef54ae..d860c2c6c840 100644
--- a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
+++ b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
@@ -51,10 +51,10 @@ public class SpreadsheetValueBinding extends DocumentBasedExample
// a numeric control
XPropertySet numericControl = m_formLayer.insertControlLine( "NumericField",
"enter a value", "", 30 );
- numericControl.setPropertyValue( "ValueMin", new Short( (short)1 ) );
- numericControl.setPropertyValue( "ValueMax", new Short( (short)5 ) );
- numericControl.setPropertyValue( "Value", new Short( (short)1 ) );
- numericControl.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
+ numericControl.setPropertyValue( "ValueMin", Short.valueOf( (short)1 ) );
+ numericControl.setPropertyValue( "ValueMax", Short.valueOf( (short)5 ) );
+ numericControl.setPropertyValue( "Value", Short.valueOf( (short)1 ) );
+ numericControl.setPropertyValue( "DecimalAccuracy", Short.valueOf( (short)0 ) );
numericControl.setPropertyValue( "Spin", Boolean.TRUE );
// bind the control model to cell B2
diff --git a/odk/examples/DevelopersGuide/GUI/DialogDocument.java b/odk/examples/DevelopersGuide/GUI/DialogDocument.java
index 8ec7681cab38..570f5b2a78f5 100644
--- a/odk/examples/DevelopersGuide/GUI/DialogDocument.java
+++ b/odk/examples/DevelopersGuide/GUI/DialogDocument.java
@@ -65,7 +65,7 @@ public class DialogDocument extends UnoDialogSample {
XMultiComponentFactory xMCF = xContext.getServiceManager();
oDialogDocument = new DialogDocument(xContext, xMCF);
oDialogDocument.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { Integer.valueOf(400), Boolean.TRUE, "Dialog1", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(1), new Short((short) 0), "Document-Dialog", Integer.valueOf(300)});
+ new Object[] { Integer.valueOf(400), Boolean.TRUE, "Dialog1", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(1), Short.valueOf((short) 0), "Document-Dialog", Integer.valueOf(300)});
oDialogDocument.createWindowPeer();
Object oFTHeaderModel = oDialogDocument.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
diff --git a/odk/examples/DevelopersGuide/GUI/ImageControlSample.java b/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
index ac2bf2791930..7415b055bb92 100644
--- a/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
+++ b/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
@@ -69,7 +69,7 @@ public class ImageControlSample extends UnoDialogSample{
XMultiComponentFactory xMCF = xContext.getServiceManager();
oImageControlSample = new ImageControlSample(xContext, xMCF);
oImageControlSample.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { Integer.valueOf(100), Boolean.TRUE, "MyTestDialog", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(0), new Short((short) 0), "OpenOffice", Integer.valueOf(230)});
+ new Object[] { Integer.valueOf(100), Boolean.TRUE, "MyTestDialog", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(0), Short.valueOf((short) 0), "OpenOffice", Integer.valueOf(230)});
Object oFTHeaderModel = oImageControlSample.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
xFTHeaderModelMPSet.setPropertyValues(
@@ -116,7 +116,7 @@ public class ImageControlSample extends UnoDialogSample{
// The image is not scaled
xICModelMPSet.setPropertyValues(
new String[] {"Border", "Height", "Name", "PositionX", "PositionY", "ScaleImage", "Width"},
- new Object[] { new Short((short) 1), Integer.valueOf(_nHeight), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.FALSE, Integer.valueOf(_nWidth)});
+ new Object[] { Short.valueOf((short) 1), Integer.valueOf(_nHeight), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.FALSE, Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oICModel);
diff --git a/odk/examples/DevelopersGuide/GUI/SystemDialog.java b/odk/examples/DevelopersGuide/GUI/SystemDialog.java
index 1fb63c61890d..3631678d3f20 100644
--- a/odk/examples/DevelopersGuide/GUI/SystemDialog.java
+++ b/odk/examples/DevelopersGuide/GUI/SystemDialog.java
@@ -99,7 +99,7 @@ public class SystemDialog {
// choose the template that defines the capabilities of the filepicker dialog
XInitialization xInitialize = UnoRuntime.queryInterface(XInitialization.class, xFilePicker);
- Short[] listAny = new Short[] { new Short(com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION)};
+ Short[] listAny = new Short[] { Short.valueOf(com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION)};
xInitialize.initialize(listAny);
// add a control to the dialog to add the extension automatically to the filename...
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
index 6a0f6fab85dd..6fa8055d3a11 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
@@ -134,7 +134,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
XMultiComponentFactory xMCF = xContext.getServiceManager();
oUnoDialogSample = new UnoDialogSample(xContext, xMCF);
oUnoDialogSample.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { Integer.valueOf(380), Boolean.TRUE, "MyTestDialog", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(0), new Short((short) 0), "OpenOffice", Integer.valueOf(380)});
+ new Object[] { Integer.valueOf(380), Boolean.TRUE, "MyTestDialog", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(0), Short.valueOf((short) 0), "OpenOffice", Integer.valueOf(380)});
Object oFTHeaderModel = oUnoDialogSample.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
xFTHeaderModelMPSet.setPropertyValues(
@@ -508,7 +508,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// The following property may also be set with XMultiPropertySet but we
// use the XPropertySet interface merely for reasons of demonstration
- xTFModelPSet.setPropertyValue("EchoChar", new Short((short) '*'));
+ xTFModelPSet.setPropertyValue("EchoChar", Short.valueOf((short) '*'));
XControl xTFControl = m_xDlgContainer.getControl(sName);
// add a textlistener that is notified on each change of the controlvalue...
@@ -553,7 +553,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// The following properties may also be set with XMultiPropertySet but we
// use the XPropertySet interface merely for reasons of demonstration
- xTFModelPSet.setPropertyValue("TimeFormat", new Short((short) 5));
+ xTFModelPSet.setPropertyValue("TimeFormat", Short.valueOf((short) 5));
xTFModelPSet.setPropertyValue("TimeMin", _aTimeMin);
xTFModelPSet.setPropertyValue("TimeMax", _aTimeMax);
xTFModelPSet.setPropertyValue("Time", _aTime);
@@ -595,7 +595,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// The following properties may also be set with XMultiPropertySet but we
// use the XPropertySet interface merely for reasons of demonstration
- xDFModelPSet.setPropertyValue("DateFormat", new Short((short) 7));
+ xDFModelPSet.setPropertyValue("DateFormat", Short.valueOf((short) 7));
xDFModelPSet.setPropertyValue("DateMin", new Date((short)1, (short)4, (short)2007));
xDFModelPSet.setPropertyValue("DateMax", new Date((short)1, (short)5, (short)2007));
xDFModelPSet.setPropertyValue("Date", new Date((short)15, (short)4, (short)2000));
@@ -688,7 +688,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
xNFModelPSet.setPropertyValue("Value", new Double(_fValue));
xNFModelPSet.setPropertyValue("ValueStep", new Double(_fValueStep));
xNFModelPSet.setPropertyValue("ShowThousandsSeparator", Boolean.TRUE);
- xNFModelPSet.setPropertyValue("DecimalAccuracy", new Short(_nDecimalAccuracy));
+ xNFModelPSet.setPropertyValue("DecimalAccuracy", Short.valueOf(_nDecimalAccuracy));
} catch (com.sun.star.uno.Exception ex) {
/* perform individual exception handling here.
* Possible exception types are:
@@ -793,7 +793,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// use the XPropertySet interface merely for reasons of demonstration
XPropertySet xCBModelPSet = UnoRuntime.queryInterface(XPropertySet.class, xCBMPSet);
xCBModelPSet.setPropertyValue("TriState", Boolean.TRUE);
- xCBModelPSet.setPropertyValue("State", new Short((short) 1));
+ xCBModelPSet.setPropertyValue("State", Short.valueOf((short) 1));
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oCBModel);
@@ -830,7 +830,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xRBMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "State", "TabIndex", "Width" } ,
- new Object[] {Integer.valueOf(8), "~First Option", sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), new Short((short) 1), new Short(_nTabIndex++),Integer.valueOf(_nWidth)});
+ new Object[] {Integer.valueOf(8), "~First Option", sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Short.valueOf((short) 1), Short.valueOf(_nTabIndex++),Integer.valueOf(_nWidth)});
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oRBModel);
@@ -842,7 +842,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xRBMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "TabIndex", "Width" } ,
- new Object[] {Integer.valueOf(8), "~Second Option", sName, Integer.valueOf(130), Integer.valueOf(214), new Short(_nTabIndex), Integer.valueOf(150)});
+ new Object[] {Integer.valueOf(8), "~Second Option", sName, Integer.valueOf(130), Integer.valueOf(214), Short.valueOf(_nTabIndex), Integer.valueOf(150)});
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oRBModel);
} catch (com.sun.star.uno.Exception ex) {
@@ -919,7 +919,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// The following property may also be set with XMultiPropertySet but we
// use the XPropertySet interface merely for reasons of demonstration
XPropertySet xCbBModelPSet = UnoRuntime.queryInterface(XPropertySet.class, xCbBModelMPSet);
- xCbBModelPSet.setPropertyValue("MaxTextLen", new Short((short) 10));
+ xCbBModelPSet.setPropertyValue("MaxTextLen", Short.valueOf((short) 10));
xCbBModelPSet.setPropertyValue("ReadOnly", Boolean.FALSE);
// add the model to the NameContainer of the dialog model
@@ -1072,7 +1072,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xButtonMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "PushButtonType", "Width" } ,
- new Object[] {Integer.valueOf(14), _sLabel, sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), new Short(_nPushButtonType), Integer.valueOf(_nWidth)});
+ new Object[] {Integer.valueOf(14), _sLabel, sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Short.valueOf(_nPushButtonType), Integer.valueOf(_nWidth)});
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oButtonModel);
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
index a73362a53a87..1e1ba1bbc659 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
@@ -100,7 +100,7 @@ public class UnoDialogSample2 extends UnoDialogSample {
final int nListBoxHeight = nDialogHeight - 4*nControlMargin - nButtonHeight;
oUnoDialogSample2 = new UnoDialogSample2(xContext, xMCF, oUnoObject);
oUnoDialogSample2.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { Integer.valueOf(nDialogHeight), Boolean.TRUE, "Dialog1", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(1), new Short((short) 0), "Inspect a Uno-Object", Integer.valueOf(nDialogWidth)});
+ new Object[] { Integer.valueOf(nDialogHeight), Boolean.TRUE, "Dialog1", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(1), Short.valueOf((short) 0), "Inspect a Uno-Object", Integer.valueOf(nDialogWidth)});
String sIntroLabel = "This Dialog lists information about a given Uno-Object.\nIt offers a view to inspect all suppported servicenames, exported interfaces, methods and properties.";
oUnoDialogSample2.insertMultiLineFixedText(nControlPosX, 27, nControlWidth, 4, 1, sIntroLabel);
// get the data from the UNO object...
@@ -127,7 +127,7 @@ public class UnoDialogSample2 extends UnoDialogSample {
oUnoDialogSample2.insertRoadmapItem(2, true, "Interfaces", 3);
oUnoDialogSample2.insertRoadmapItem(3, true, "Methods", 4);
oUnoDialogSample2.insertRoadmapItem(4, true, "Properties", 5);
- oUnoDialogSample2.m_xRMPSet.setPropertyValue("CurrentItemID", new Short((short) 1));
+ oUnoDialogSample2.m_xRMPSet.setPropertyValue("CurrentItemID", Short.valueOf((short) 1));
oUnoDialogSample2.m_xRMPSet.setPropertyValue("Complete", Boolean.TRUE);
oUnoDialogSample2.xDialog = UnoRuntime.queryInterface(XDialog.class, oUnoDialogSample2.m_xDialogControl);
oUnoDialogSample2.xDialog.execute();
diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu2.java b/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
index 8869cf4394e3..9e7ed3d0fed1 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
@@ -42,7 +42,7 @@ public UnoMenu2(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
XMultiComponentFactory xMCF = xContext.getServiceManager();
oUnoMenu2 = new UnoMenu2(xContext, xMCF);
oUnoMenu2.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { Integer.valueOf(140), Boolean.TRUE, "Dialog1", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(1), new Short((short) 0), "Menu-Dialog", Integer.valueOf(200)});
+ new Object[] { Integer.valueOf(140), Boolean.TRUE, "Dialog1", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(1), Short.valueOf((short) 0), "Menu-Dialog", Integer.valueOf(200)});
Object oFTHeaderModel = oUnoMenu2.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java
index 41af02a39613..2f542f739668 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java
@@ -83,7 +83,7 @@ public class Clipboard
com.sun.star.view.XViewSettingsSupplier.class,
xModel.getCurrentController());
xViewSettings.getViewSettings().setPropertyValue(
- "ZoomType", new Short((short)0));
+ "ZoomType", Short.valueOf((short)0));
}
// test document will be closed later
diff --git a/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java b/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java
index 3f0297dcc0ac..eaecc4c5e44e 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java
@@ -83,7 +83,7 @@ public class ContextMenuInterceptor implements XContextMenuInterceptor {
UnoRuntime.queryInterface(
com.sun.star.view.XViewSettingsSupplier.class, xModel.getCurrentController());
xViewSettings.getViewSettings().setPropertyValue(
- "ZoomType", new Short((short)0));
+ "ZoomType", Short.valueOf((short)0));
}
// test document will be closed later
@@ -165,7 +165,7 @@ public class ContextMenuInterceptor implements XContextMenuInterceptor {
com.sun.star.beans.XPropertySet.class,
xMenuElementFactory.createInstance( "com.sun.star.ui.ActionTriggerSeparator" ));
- Short aSeparatorType = new Short( ActionTriggerSeparatorType.LINE );
+ Short aSeparatorType = Short.valueOf( ActionTriggerSeparatorType.LINE );
xSeparator.setPropertyValue( "SeparatorType", aSeparatorType );
// query sub menu for index container to get access
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java b/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
index 2f161b42708e..37fbc0988c3c 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
@@ -116,7 +116,7 @@ public class DisableCommandsTest extends java.lang.Object {
com.sun.star.view.XViewSettingsSupplier.class,
xModel.getCurrentController());
xViewSettings.getViewSettings().setPropertyValue(
- "ZoomType", new Short((short)0));
+ "ZoomType", Short.valueOf((short)0));
}
// test document will be closed later
diff --git a/odk/examples/DevelopersGuide/Text/TextDocuments.java b/odk/examples/DevelopersGuide/Text/TextDocuments.java
index dc767f3d7494..ba78fc7e0255 100644
--- a/odk/examples/DevelopersGuide/Text/TextDocuments.java
+++ b/odk/examples/DevelopersGuide/Text/TextDocuments.java
@@ -1053,7 +1053,7 @@ public class TextDocuments {
"AlternativeText", "Big dogs! Falling on my head!");
// The Level property _must_ be set
- xEntry.setPropertyValue ( "Level", new Short ( (short) 1 ) );
+ xEntry.setPropertyValue ( "Level", Short.valueOf( (short) 1 ) );
// Create a ContentIndex and access its XPropertySet interface
XPropertySet xIndex = UnoRuntime.queryInterface(
@@ -1061,7 +1061,7 @@ public class TextDocuments {
mxDocFactory.createInstance ( "com.sun.star.text.ContentIndex" ) );
// Again, the Level property _must_ be set
- xIndex.setPropertyValue ( "Level", new Short ( (short) 10 ) );
+ xIndex.setPropertyValue ( "Level", Short.valueOf( (short) 10 ) );
// Access the XTextContent interfaces of both the Index and the
// IndexMark
@@ -1172,11 +1172,11 @@ public class TextDocuments {
// specify that the source is a reference mark (could also be a
// footnote, bookmark or sequence field )
xFieldProps.setPropertyValue ( "ReferenceFieldSource",
- new Short(ReferenceFieldSource.REFERENCE_MARK));
+ Short.valueOf(ReferenceFieldSource.REFERENCE_MARK));
// We want the reference displayed as 'above' or 'below'
xFieldProps.setPropertyValue ( "ReferenceFieldPart",
- new Short(ReferenceFieldPart.UP_DOWN));
+ Short.valueOf(ReferenceFieldPart.UP_DOWN));
// Get the XTextContent interface of the GetReference text field
@@ -1489,13 +1489,13 @@ public class TextDocuments {
switch ( i )
{
case 0 : aProps[j].Value =
- new Short(NumberingType.ROMAN_UPPER);
+ Short.valueOf(NumberingType.ROMAN_UPPER);
break;
case 1 : aProps[j].Value =
- new Short(NumberingType.CHARS_UPPER_LETTER);
+ Short.valueOf(NumberingType.CHARS_UPPER_LETTER);
break;
case 2 : aProps[j].Value =
- new Short(NumberingType.ARABIC);
+ Short.valueOf(NumberingType.ARABIC);
break;
}
// Put the updated PropertyValue sequence back into the
@@ -1523,15 +1523,15 @@ public class TextDocuments {
// Set the first paragraph that was inserted to a numbering level of
// 2 (thus it will have Arabic style numbering)
- xParas[0].setPropertyValue ( "NumberingLevel", new Short((short) 2));
+ xParas[0].setPropertyValue ( "NumberingLevel", Short.valueOf((short) 2));
// Set the second paragraph that was inserted to a numbering level of
// 1 (thus it will have 'Chars Upper Letter' style numbering)
- xParas[1].setPropertyValue ( "NumberingLevel", new Short((short) 1));
+ xParas[1].setPropertyValue ( "NumberingLevel", Short.valueOf((short) 1));
// Set the third paragraph that was inserted to a numbering level of
// 0 (thus it will have 'Chars Upper Letter' style numbering)
- xParas[2].setPropertyValue ( "NumberingLevel", new Short((short) 0));
+ xParas[2].setPropertyValue ( "NumberingLevel", Short.valueOf((short) 0));
}
catch (Exception e)
{
diff --git a/odk/examples/java/Text/WriterSelector.java b/odk/examples/java/Text/WriterSelector.java
index 1343293a968a..338db681ae87 100644
--- a/odk/examples/java/Text/WriterSelector.java
+++ b/odk/examples/java/Text/WriterSelector.java
@@ -82,7 +82,7 @@ public class WriterSelector {
UnoRuntime.queryInterface(
com.sun.star.view.XViewSettingsSupplier.class, xModel.getCurrentController());
xViewSettings.getViewSettings().setPropertyValue(
- "ZoomType", new Short((short)0));
+ "ZoomType", Short.valueOf((short)0));
}
// test document will be closed later