diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 15:09:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:17 +0200 |
commit | ff0ad0493ee1729c726587f667761b04101d774c (patch) | |
tree | 8c0f97e8740fbdb2ed0cdbfc5d99d82cae8f7df6 /odk | |
parent | be1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff) |
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'odk')
59 files changed, 258 insertions, 258 deletions
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java b/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java index 1e3fd149ee12..f7479b26a8ca 100644 --- a/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java +++ b/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java @@ -147,10 +147,10 @@ public class SampleDialog extends WeakBase implements XServiceInfo, XJobExecutor "com.sun.star.awt.UnoControlDialogModel", _xComponentContext ); XPropertySet xPSetDialog = ( XPropertySet )UnoRuntime.queryInterface( XPropertySet.class, dialogModel ); - xPSetDialog.setPropertyValue( "PositionX", new Integer( 100 ) ); - xPSetDialog.setPropertyValue( "PositionY", new Integer( 100 ) ); - xPSetDialog.setPropertyValue( "Width", new Integer( 150 ) ); - xPSetDialog.setPropertyValue( "Height", new Integer( 100 ) ); + xPSetDialog.setPropertyValue( "PositionX", Integer.valueOf( 100 ) ); + xPSetDialog.setPropertyValue( "PositionY", Integer.valueOf( 100 ) ); + xPSetDialog.setPropertyValue( "Width", Integer.valueOf( 150 ) ); + xPSetDialog.setPropertyValue( "Height", Integer.valueOf( 100 ) ); xPSetDialog.setPropertyValue( "Title", new String( "Runtime Dialog Demo" ) ); // get the service manager from the dialog model @@ -162,10 +162,10 @@ public class SampleDialog extends WeakBase implements XServiceInfo, XJobExecutor "com.sun.star.awt.UnoControlButtonModel" ); XPropertySet xPSetButton = ( XPropertySet )UnoRuntime.queryInterface( XPropertySet.class, buttonModel ); - xPSetButton.setPropertyValue( "PositionX", new Integer( 20 ) ); - xPSetButton.setPropertyValue( "PositionY", new Integer( 70 ) ); - xPSetButton.setPropertyValue( "Width", new Integer( 50 ) ); - xPSetButton.setPropertyValue( "Height", new Integer( 14 ) ); + xPSetButton.setPropertyValue( "PositionX", Integer.valueOf( 20 ) ); + xPSetButton.setPropertyValue( "PositionY", Integer.valueOf( 70 ) ); + 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( "Label", new String( "Click Me" ) ); @@ -175,10 +175,10 @@ public class SampleDialog extends WeakBase implements XServiceInfo, XJobExecutor "com.sun.star.awt.UnoControlFixedTextModel" ); XPropertySet xPSetLabel = ( XPropertySet )UnoRuntime.queryInterface( XPropertySet.class, labelModel ); - xPSetLabel.setPropertyValue( "PositionX", new Integer( 40 ) ); - xPSetLabel.setPropertyValue( "PositionY", new Integer( 30 ) ); - xPSetLabel.setPropertyValue( "Width", new Integer( 100 ) ); - xPSetLabel.setPropertyValue( "Height", new Integer( 14 ) ); + xPSetLabel.setPropertyValue( "PositionX", Integer.valueOf( 40 ) ); + xPSetLabel.setPropertyValue( "PositionY", Integer.valueOf( 30 ) ); + 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( "Label", _labelPrefix ); @@ -188,10 +188,10 @@ public class SampleDialog extends WeakBase implements XServiceInfo, XJobExecutor "com.sun.star.awt.UnoControlButtonModel" ); XPropertySet xPSetCancelButton = ( XPropertySet )UnoRuntime.queryInterface( XPropertySet.class, cancelButtonModel ); - xPSetCancelButton.setPropertyValue( "PositionX", new Integer( 80 ) ); - xPSetCancelButton.setPropertyValue( "PositionY", new Integer( 70 ) ); - xPSetCancelButton.setPropertyValue( "Width", new Integer( 50 ) ); - xPSetCancelButton.setPropertyValue( "Height", new Integer( 14 ) ); + xPSetCancelButton.setPropertyValue( "PositionX", Integer.valueOf( 80 ) ); + xPSetCancelButton.setPropertyValue( "PositionY", Integer.valueOf( 70 ) ); + 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 ) ); diff --git a/odk/examples/DevelopersGuide/Charts/ChartHelper.java b/odk/examples/DevelopersGuide/Charts/ChartHelper.java index 7208c58b30f5..90dccd153800 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartHelper.java +++ b/odk/examples/DevelopersGuide/Charts/ChartHelper.java @@ -113,9 +113,9 @@ public class ChartHelper aAny = new Any(new Type(Short.class), new Short(com.sun.star.text.HoriOrientation.NONE)); xPropSet.setPropertyValue("HoriOrient", aAny ); - aAny = new Any(new Type(Integer.class), new Integer(aUpperLeft.Y)); + aAny = new Any(new Type(Integer.class), Integer.valueOf(aUpperLeft.Y)); xPropSet.setPropertyValue("VertOrientPosition", aAny ); - aAny = new Any(new Type(Integer.class), new Integer(aUpperLeft.X)); + aAny = new Any(new Type(Integer.class), Integer.valueOf(aUpperLeft.X)); xPropSet.setPropertyValue("HoriOrientPosition", aAny ); // retrieve the chart document as model of the OLE shape diff --git a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java index ee493144f98a..76791e3bb9f9 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java +++ b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java @@ -176,7 +176,7 @@ public class ChartInCalc // change attributes for all series // set line width to 0.5mm - aDiaProp.setPropertyValue( "LineWidth", new Integer( 50 )); + aDiaProp.setPropertyValue( "LineWidth", Integer.valueOf( 50 )); } } @@ -193,7 +193,7 @@ public class ChartInCalc for( int i = 1; i <= 3; i++ ) { aSeriesProp = maDiagram.getDataRowProperties( i ); - aSeriesProp.setPropertyValue( "LineColor", new Integer( + aSeriesProp.setPropertyValue( "LineColor", Integer.valueOf( 0x400000 * i + 0x005000 * i + 0x0000ff - 0x40 * i )); @@ -209,12 +209,12 @@ public class ChartInCalc } // set a bitmap via URL as symbol for the first series - aSeriesProp.setPropertyValue( "SymbolType", new Integer( ChartSymbolType.BITMAPURL )); + aSeriesProp.setPropertyValue( "SymbolType", Integer.valueOf( ChartSymbolType.BITMAPURL )); aSeriesProp.setPropertyValue( "SymbolBitmapURL", sUrl.toString() ); } else { - aSeriesProp.setPropertyValue( "SymbolType", new Integer( ChartSymbolType.SYMBOL1 )); + aSeriesProp.setPropertyValue( "SymbolType", Integer.valueOf( ChartSymbolType.SYMBOL1 )); aSeriesProp.setPropertyValue( "SymbolSize", new Size( 250, 250 )); } } @@ -254,13 +254,13 @@ public class ChartInCalc XPropertySet aPointProp = maDiagram.getDataPointProperties( 0, 1 ); // set a different, larger symbol - aPointProp.setPropertyValue( "SymbolType", new Integer( ChartSymbolType.SYMBOL6 )); + aPointProp.setPropertyValue( "SymbolType", Integer.valueOf( ChartSymbolType.SYMBOL6 )); aPointProp.setPropertyValue( "SymbolSize", new Size( 600, 600 )); // add a label text with bold font, bordeaux red 14pt - aPointProp.setPropertyValue( "DataCaption", new Integer( ChartDataCaption.VALUE )); + aPointProp.setPropertyValue( "DataCaption", Integer.valueOf( ChartDataCaption.VALUE )); aPointProp.setPropertyValue( "CharHeight", new Float( 14.0 )); - aPointProp.setPropertyValue( "CharColor", new Integer( 0x993366 )); + aPointProp.setPropertyValue( "CharColor", Integer.valueOf( 0x993366 )); aPointProp.setPropertyValue( "CharWeight", new Float( FontWeight.BOLD )); } catch( IndexOutOfBoundsException ex ) @@ -281,7 +281,7 @@ public class ChartInCalc { // change background color of entire chart aArea.setPropertyValue( "FillStyle", FillStyle.SOLID ); - aArea.setPropertyValue( "FillColor", new Integer( 0xeeeeee )); + aArea.setPropertyValue( "FillColor", Integer.valueOf( 0xeeeeee )); } } @@ -296,7 +296,7 @@ public class ChartInCalc // change background color of area aWall.setPropertyValue( "FillStyle", FillStyle.SOLID ); - aWall.setPropertyValue( "FillColor", new Integer( 0xcccccc )); + aWall.setPropertyValue( "FillColor", Integer.valueOf( 0xcccccc )); } @@ -346,8 +346,8 @@ public class ChartInCalc XAxisXSupplier.class, maDiagram ).getXAxis(); if( aAxisProp != null ) { - aAxisProp.setPropertyValue( "Max", new Integer( 24 )); - aAxisProp.setPropertyValue( "StepMain", new Integer( 3 )); + aAxisProp.setPropertyValue( "Max", Integer.valueOf( 24 )); + aAxisProp.setPropertyValue( "StepMain", Integer.valueOf( 3 )); } // change number format for y axis @@ -370,7 +370,7 @@ public class ChartInCalc if( aAxisProp != null ) { - aAxisProp.setPropertyValue( "NumberFormat", new Integer( nNewNumberFormat )); + aAxisProp.setPropertyValue( "NumberFormat", Integer.valueOf( nNewNumberFormat )); } } @@ -396,10 +396,10 @@ public class ChartInCalc aDash.DashLen = 200; aDash.Distance = 100; - aGridProp.setPropertyValue( "LineColor", new Integer( 0x999999 )); + aGridProp.setPropertyValue( "LineColor", Integer.valueOf( 0x999999 )); aGridProp.setPropertyValue( "LineStyle", LineStyle.DASH ); aGridProp.setPropertyValue( "LineDash", aDash ); - aGridProp.setPropertyValue( "LineWidth", new Integer( 30 )); + aGridProp.setPropertyValue( "LineWidth", Integer.valueOf( 30 )); } } diff --git a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java index ee9e05d49d79..19e4855461e5 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java +++ b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java @@ -143,7 +143,7 @@ public class ChartInDraw { // change background color of entire chart aArea.setPropertyValue( "FillStyle", FillStyle.SOLID ); - aArea.setPropertyValue( "FillColor", new Integer( 0xeeeeee )); + aArea.setPropertyValue( "FillColor", Integer.valueOf( 0xeeeeee )); } } @@ -157,7 +157,7 @@ public class ChartInDraw X3DDisplay.class, maDiagram ).getWall(); // change background color of area - aWall.setPropertyValue( "FillColor", new Integer( 0xcccccc )); + aWall.setPropertyValue( "FillColor", Integer.valueOf( 0xcccccc )); aWall.setPropertyValue( "FillStyle", FillStyle.SOLID ); } @@ -193,7 +193,7 @@ public class ChartInDraw aLegendProp.setPropertyValue( "Alignment", ChartLegendPosition.LEFT ); aLegendProp.setPropertyValue( "FillStyle", FillStyle.SOLID ); - aLegendProp.setPropertyValue( "FillColor", new Integer( 0xeeddee )); + aLegendProp.setPropertyValue( "FillColor", Integer.valueOf( 0xeeddee )); } @@ -208,12 +208,12 @@ public class ChartInDraw aDiaProp.setPropertyValue( "Dim3D", aTrue ); aDiaProp.setPropertyValue( "Deep", aTrue ); // from Chart3DBarProperties: - aDiaProp.setPropertyValue( "SolidType", new Integer( ChartSolidType.CYLINDER )); + aDiaProp.setPropertyValue( "SolidType", Integer.valueOf( ChartSolidType.CYLINDER )); // change floor color to Magenta6 XPropertySet aFloor = UnoRuntime.queryInterface( X3DDisplay.class, maDiagram ).getFloor(); - aFloor.setPropertyValue( "FillColor", new Integer( 0x6b2394 )); + aFloor.setPropertyValue( "FillColor", Integer.valueOf( 0x6b2394 )); // apply changes to get a 3d scene unlockControllers(); @@ -268,7 +268,7 @@ public class ChartInDraw // in a chart by default only the second (non-specular) light source is switched on // light source 1 is a specular light source - aDiaProp.setPropertyValue( "D3DSceneLightColor1", new Integer( 0xff3333 )); + aDiaProp.setPropertyValue( "D3DSceneLightColor1", Integer.valueOf( 0xff3333 )); // set direction com.sun.star.drawing.Direction3D aDirection = new com.sun.star.drawing.Direction3D(); diff --git a/odk/examples/DevelopersGuide/Charts/ChartInWriter.java b/odk/examples/DevelopersGuide/Charts/ChartInWriter.java index d9585c31ff6c..124616db46be 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartInWriter.java +++ b/odk/examples/DevelopersGuide/Charts/ChartInWriter.java @@ -146,7 +146,7 @@ public class ChartInWriter X3DDisplay.class, maDiagram ).getWall(); // change background color of area - aWall.setPropertyValue( "FillColor", new Integer( 0xeecc99 )); + aWall.setPropertyValue( "FillColor", Integer.valueOf( 0xeecc99 )); aWall.setPropertyValue( "FillStyle", FillStyle.SOLID ); } diff --git a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java index 1af68e7cf570..8d15ff9d95d5 100644 --- a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java +++ b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java @@ -167,8 +167,8 @@ public class JavaSampleChartAddIn extends WeakBase implements XPropertySet aShapeProp = UnoRuntime.queryInterface( XPropertySet.class, maTopLine ); - aShapeProp.setPropertyValue( "LineColor", new Integer( 0xe01010 )); - aShapeProp.setPropertyValue( "LineWidth", new Integer( 50 )); + aShapeProp.setPropertyValue( "LineColor", Integer.valueOf( 0xe01010 )); + aShapeProp.setPropertyValue( "LineWidth", Integer.valueOf( 50 )); aShapeProp.setPropertyValue( "Name", "top" ); } } @@ -190,8 +190,8 @@ public class JavaSampleChartAddIn extends WeakBase implements XPropertySet aShapeProp = UnoRuntime.queryInterface( XPropertySet.class, maBottomLine ); - aShapeProp.setPropertyValue( "LineColor", new Integer( 0x10e010 )); - aShapeProp.setPropertyValue( "LineWidth", new Integer( 50 )); + aShapeProp.setPropertyValue( "LineColor", Integer.valueOf( 0x10e010 )); + aShapeProp.setPropertyValue( "LineWidth", Integer.valueOf( 50 )); aShapeProp.setPropertyValue( "Name", "bottom" ); } } diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java index 687fb4c8cd0e..5f786fe165f4 100644 --- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java +++ b/odk/examples/DevelopersGuide/Config/ConfigExamples.java @@ -757,7 +757,7 @@ public class ConfigExamples int nNew = 9999 - nOld; System.out.println("Replacing integer value: " + aItemNames [i]); - aReplace.replaceByName( aItemNames [i], new Integer( nNew ) ); + aReplace.replaceByName( aItemNames [i], Integer.valueOf( nNew ) ); } // and booleans by their negated value @@ -898,7 +898,7 @@ public class ConfigExamples xDataSourceProperties.setPropertyValue("URL", sDataSourceURL ); xDataSourceProperties.setPropertyValue("User", sUser ); xDataSourceProperties.setPropertyValue("IsPasswordRequired", Boolean.valueOf( bNeedsPassword ) ); - xDataSourceProperties.setPropertyValue("LoginTimeout", new Integer( nTimeout ) ); + xDataSourceProperties.setPropertyValue("LoginTimeout", Integer.valueOf( nTimeout ) ); if ( aTableFilter != null ) xDataSourceProperties.setPropertyValue("TableFilter", aTableFilter ); diff --git a/odk/examples/DevelopersGuide/Database/OpenQuery.java b/odk/examples/DevelopersGuide/Database/OpenQuery.java index 92b0413c7723..77490f8dbf8f 100644 --- a/odk/examples/DevelopersGuide/Database/OpenQuery.java +++ b/odk/examples/DevelopersGuide/Database/OpenQuery.java @@ -96,7 +96,7 @@ public class OpenQuery { xProp.setPropertyValue("DataSourceName","Bibliography"); // the CommandType must be TABLE, QUERY or COMMAND, here we use COMMAND - xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.COMMAND)); + xProp.setPropertyValue("CommandType",Integer.valueOf(com.sun.star.sdb.CommandType.COMMAND)); // the Command could be a table or query name or a SQL command, depending on the CommandType xProp.setPropertyValue("Command","SELECT IDENTIFIER, AUTHOR FROM biblio ORDER BY IDENTIFIER"); diff --git a/odk/examples/DevelopersGuide/Database/RowSet.java b/odk/examples/DevelopersGuide/Database/RowSet.java index 2fd6de38de9e..3f18f35797bb 100644 --- a/odk/examples/DevelopersGuide/Database/RowSet.java +++ b/odk/examples/DevelopersGuide/Database/RowSet.java @@ -87,7 +87,7 @@ public class RowSet XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,xRowRes); xProp.setPropertyValue("DataSourceName","Bibliography"); xProp.setPropertyValue("Command","biblio"); - xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE)); + xProp.setPropertyValue("CommandType",Integer.valueOf(com.sun.star.sdb.CommandType.TABLE)); xRowRes.execute(); System.out.println("RowSet executed!"); @@ -110,7 +110,7 @@ public class RowSet XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,xRowRes); xProp.setPropertyValue("DataSourceName","Bibliography"); xProp.setPropertyValue("Command","biblio"); - xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE)); + xProp.setPropertyValue("CommandType",Integer.valueOf(com.sun.star.sdb.CommandType.TABLE)); xRowRes.execute(); System.out.println("RowSet executed!"); @@ -144,7 +144,7 @@ public class RowSet XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,xRowRes); xProp.setPropertyValue("DataSourceName","Bibliography"); xProp.setPropertyValue("Command","biblio"); - xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE)); + xProp.setPropertyValue("CommandType",Integer.valueOf(com.sun.star.sdb.CommandType.TABLE)); xRowRes.execute(); System.out.println("RowSet executed!"); @@ -183,7 +183,7 @@ public class RowSet XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,xRowRes); xProp.setPropertyValue("DataSourceName","Bibliography"); xProp.setPropertyValue("Command","biblio"); - xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE)); + xProp.setPropertyValue("CommandType",Integer.valueOf(com.sun.star.sdb.CommandType.TABLE)); xRowRes.execute(); System.out.println("RowSet executed!"); diff --git a/odk/examples/DevelopersGuide/Database/Sales.java b/odk/examples/DevelopersGuide/Database/Sales.java index 7a983c727ec9..1733d21930b0 100644 --- a/odk/examples/DevelopersGuide/Database/Sales.java +++ b/odk/examples/DevelopersGuide/Database/Sales.java @@ -112,8 +112,8 @@ public class Sales { XStatement stmt = con.createStatement(); XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,stmt); - xProp.setPropertyValue("ResultSetType", new java.lang.Integer(ResultSetType.SCROLL_INSENSITIVE)); - xProp.setPropertyValue("ResultSetConcurrency", new java.lang.Integer(ResultSetConcurrency.READ_ONLY)); + xProp.setPropertyValue("ResultSetType", Integer.valueOf(ResultSetType.SCROLL_INSENSITIVE)); + xProp.setPropertyValue("ResultSetConcurrency", Integer.valueOf(ResultSetConcurrency.READ_ONLY)); XResultSet rs = stmt.executeQuery("SELECT NAME, PRICE FROM SALES"); XResultSetMetaDataSupplier xRsMetaSup = UnoRuntime.queryInterface(XResultSetMetaDataSupplier.class,rs); XResultSetMetaData xRsMetaData = xRsMetaSup.getMetaData(); diff --git a/odk/examples/DevelopersGuide/Database/sdbcx.java b/odk/examples/DevelopersGuide/Database/sdbcx.java index 4f73c8bb8286..fb498591f2ac 100644 --- a/odk/examples/DevelopersGuide/Database/sdbcx.java +++ b/odk/examples/DevelopersGuide/Database/sdbcx.java @@ -342,42 +342,42 @@ public class sdbcx XPropertySet xCol = xColFac.createDataDescriptor(); // create first column and append xCol.setPropertyValue("Name","SNR"); - xCol.setPropertyValue("Type",new Integer(DataType.INTEGER)); - xCol.setPropertyValue("IsNullable",new Integer(ColumnValue.NO_NULLS)); + xCol.setPropertyValue("Type",Integer.valueOf(DataType.INTEGER)); + xCol.setPropertyValue("IsNullable",Integer.valueOf(ColumnValue.NO_NULLS)); xAppend.appendByDescriptor(xCol); // 2nd only set the properties which differs xCol.setPropertyValue("Name","FIRSTNAME"); - xCol.setPropertyValue("Type",new Integer(DataType.VARCHAR)); - xCol.setPropertyValue("IsNullable",new Integer(ColumnValue.NULLABLE)); - xCol.setPropertyValue("Precision",new Integer(50)); + xCol.setPropertyValue("Type",Integer.valueOf(DataType.VARCHAR)); + xCol.setPropertyValue("IsNullable",Integer.valueOf(ColumnValue.NULLABLE)); + xCol.setPropertyValue("Precision",Integer.valueOf(50)); xAppend.appendByDescriptor(xCol); // 3nd only set the properties which differs xCol.setPropertyValue("Name","LASTNAME"); - xCol.setPropertyValue("Precision",new Integer(100)); + xCol.setPropertyValue("Precision",Integer.valueOf(100)); xAppend.appendByDescriptor(xCol); // 4nd only set the properties which differs xCol.setPropertyValue("Name","STREET"); - xCol.setPropertyValue("Precision",new Integer(50)); + xCol.setPropertyValue("Precision",Integer.valueOf(50)); xAppend.appendByDescriptor(xCol); // 5nd only set the properties which differs xCol.setPropertyValue("Name","STATE"); xAppend.appendByDescriptor(xCol); // 6nd only set the properties which differs xCol.setPropertyValue("Name","ZIP"); - xCol.setPropertyValue("Type",new Integer(DataType.INTEGER)); - xCol.setPropertyValue("Precision",new Integer(10)); // default value integer + xCol.setPropertyValue("Type",Integer.valueOf(DataType.INTEGER)); + xCol.setPropertyValue("Precision",Integer.valueOf(10)); // default value integer xAppend.appendByDescriptor(xCol); // 7nd only set the properties which differs xCol.setPropertyValue("Name","BIRTHDATE"); - xCol.setPropertyValue("Type",new Integer(DataType.DATE)); - xCol.setPropertyValue("Precision",new Integer(10)); // default value integer + xCol.setPropertyValue("Type",Integer.valueOf(DataType.DATE)); + xCol.setPropertyValue("Precision",Integer.valueOf(10)); // default value integer xAppend.appendByDescriptor(xCol); // now we create the primary key XKeysSupplier xKeySup = UnoRuntime.queryInterface(XKeysSupplier.class,xTable); XDataDescriptorFactory xKeyFac = UnoRuntime.queryInterface(XDataDescriptorFactory.class,xKeySup.getKeys()); XAppend xKeyAppend = UnoRuntime.queryInterface(XAppend.class,xKeyFac); XPropertySet xKey = xKeyFac.createDataDescriptor(); - xKey.setPropertyValue("Type",new Integer(KeyType.PRIMARY)); + xKey.setPropertyValue("Type",Integer.valueOf(KeyType.PRIMARY)); // now append the columns to key XColumnsSupplier xKeyColumSup = UnoRuntime.queryInterface(XColumnsSupplier.class,xKey); XDataDescriptorFactory xKeyColFac = UnoRuntime.queryInterface(XDataDescriptorFactory.class,xKeyColumSup.getColumns()); diff --git a/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java b/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java index 1def8ad4a131..cc3d614e7339 100644 --- a/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java +++ b/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java @@ -98,8 +98,8 @@ public class ChangeOrderDemo int nOrderOfShape1 = ((Integer)xPropSet1.getPropertyValue( "ZOrder" )).intValue(); int nOrderOfShape2 = ((Integer)xPropSet2.getPropertyValue( "ZOrder" )).intValue(); - xPropSet1.setPropertyValue( "ZOrder", new Integer( nOrderOfShape2 ) ); - xPropSet2.setPropertyValue( "ZOrder", new Integer( nOrderOfShape1 ) ); + xPropSet1.setPropertyValue( "ZOrder", Integer.valueOf( nOrderOfShape2 ) ); + xPropSet2.setPropertyValue( "ZOrder", Integer.valueOf( nOrderOfShape1 ) ); } catch( Exception ex ) { diff --git a/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java b/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java index 926a34a3eba1..1c0eb18d68fd 100644 --- a/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java +++ b/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java @@ -342,7 +342,7 @@ public class DrawingDemo xShapeProperties.setPropertyValue( "PolyPolygonBezier", aCoords ); // move the shape to the back by changing the ZOrder - xShapeProperties.setPropertyValue( "ZOrder", new Integer( 1 ) ); + xShapeProperties.setPropertyValue( "ZOrder", Integer.valueOf( 1 ) ); } catch ( Exception ex ) { diff --git a/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java b/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java index f7c50a4bedbc..932747cbef51 100644 --- a/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java +++ b/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java @@ -116,8 +116,8 @@ public class FillAndLineStyleDemo aLineDash.DashLen = 300; aLineDash.Distance = 150; xPropSet.setPropertyValue( "LineDash", aLineDash ); - xPropSet.setPropertyValue( "LineColor", new Integer( 0x0000ff ) ); - xPropSet.setPropertyValue( "LineWidth", new Integer( 200 ) ); + xPropSet.setPropertyValue( "LineColor", Integer.valueOf( 0x0000ff ) ); + xPropSet.setPropertyValue( "LineWidth", Integer.valueOf( 200 ) ); } catch( Exception ex ) diff --git a/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java b/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java index fc34da6fdfcf..6f75c921473a 100644 --- a/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java +++ b/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java @@ -119,11 +119,11 @@ public class GluePointDemo // if there is a shape to connect xConnectorPropSet.setPropertyValue( "StartShape", xShape1 ); xConnectorPropSet.setPropertyValue( "StartGluePointIndex", - new Integer( nStartIndex ) ); + Integer.valueOf( nStartIndex ) ); xConnectorPropSet.setPropertyValue( "EndShape", xShape2 ); xConnectorPropSet.setPropertyValue( "EndGluePointIndex", - new Integer( nEndIndex ) ); + Integer.valueOf( nEndIndex ) ); XGluePointsSupplier xGluePointsSupplier; XIndexContainer xIndexContainer; @@ -162,11 +162,11 @@ public class GluePointDemo xConnector2PropSet.setPropertyValue( "StartShape", xShape1 ); xConnector2PropSet.setPropertyValue( "StartGluePointIndex", - new Integer( nIndexOfGluePoint1 ) ); + Integer.valueOf( nIndexOfGluePoint1 ) ); xConnector2PropSet.setPropertyValue( "EndShape", xShape2 ); xConnector2PropSet.setPropertyValue( "EndGluePointIndex", - new Integer( nIndexOfGluePoint2 ) ); + Integer.valueOf( nIndexOfGluePoint2 ) ); } diff --git a/odk/examples/DevelopersGuide/Drawing/Organigram.java b/odk/examples/DevelopersGuide/Drawing/Organigram.java index 362f38a2e6f8..67d183cf61a4 100644 --- a/odk/examples/DevelopersGuide/Drawing/Organigram.java +++ b/odk/examples/DevelopersGuide/Drawing/Organigram.java @@ -169,9 +169,9 @@ public class Organigram { xConnectorProps.setPropertyValue("StartShape", xStartShape); xConnectorProps.setPropertyValue("EndShape", xShape); xConnectorProps.setPropertyValue("StartGluePointIndex", - new Integer(2)); // 2 = bottom glue point + Integer.valueOf(2)); // 2 = bottom glue point xConnectorProps.setPropertyValue("EndGluePointIndex", - new Integer(0)); // 0 = top glue point + Integer.valueOf(0)); // 0 = top glue point } } } diff --git a/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java b/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java index bfa352016488..82f3cf3cd072 100644 --- a/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java +++ b/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java @@ -118,7 +118,7 @@ public class PresentationDemo after the animation has been finished */ xShapePropSet.setPropertyValue( "DimHide", Boolean.FALSE ); xShapePropSet.setPropertyValue( "DimPrevious", Boolean.TRUE ); - xShapePropSet.setPropertyValue( "DimColor", new Integer( 0xff0000 ) ); + xShapePropSet.setPropertyValue( "DimColor", Integer.valueOf( 0xff0000 ) ); // set the slide transition for the second page @@ -189,7 +189,7 @@ public class PresentationDemo XPropertySet xPresPropSet = UnoRuntime.queryInterface( XPropertySet.class, xPresentation ); xPresPropSet.setPropertyValue( "IsEndless", Boolean.TRUE ); xPresPropSet.setPropertyValue( "IsAlwaysOnTop", Boolean.TRUE ); - xPresPropSet.setPropertyValue( "Pause", new Integer( 0 ) ); + xPresPropSet.setPropertyValue( "Pause", Integer.valueOf( 0 ) ); xPresentation.start(); } catch( Exception ex ) @@ -218,8 +218,8 @@ public class PresentationDemo XPropertySet xPropSet = UnoRuntime.queryInterface( XPropertySet.class, xPage ); xPropSet.setPropertyValue( "Effect", eEffect ); xPropSet.setPropertyValue( "Speed", eSpeed ); - xPropSet.setPropertyValue( "Change", new Integer( nChange ) ); - xPropSet.setPropertyValue( "Duration", new Integer( nDuration ) ); + xPropSet.setPropertyValue( "Change", Integer.valueOf( nChange ) ); + xPropSet.setPropertyValue( "Duration", Integer.valueOf( nDuration ) ); } catch( Exception ex ) { diff --git a/odk/examples/DevelopersGuide/Drawing/StyleDemo.java b/odk/examples/DevelopersGuide/Drawing/StyleDemo.java index 945b7a78c6f6..e494e296f987 100644 --- a/odk/examples/DevelopersGuide/Drawing/StyleDemo.java +++ b/odk/examples/DevelopersGuide/Drawing/StyleDemo.java @@ -123,7 +123,7 @@ public class StyleDemo if ( xStylePropSetInfo.hasPropertyByName( "CharColor" ) ) { xStylePropSet.setPropertyValue( "CharColor", - new Integer( 0xff0000 ) ); + Integer.valueOf( 0xff0000 ) ); } } } diff --git a/odk/examples/DevelopersGuide/Drawing/TextDemo.java b/odk/examples/DevelopersGuide/Drawing/TextDemo.java index 3dd22e4bd0ed..012432a3fc38 100644 --- a/odk/examples/DevelopersGuide/Drawing/TextDemo.java +++ b/odk/examples/DevelopersGuide/Drawing/TextDemo.java @@ -102,16 +102,16 @@ public class TextDemo // first paragraph xTextPropSet = ShapeHelper.addPortion( xRectangle, "Portion1", false ); - xTextPropSet.setPropertyValue( "CharColor", new Integer( 0xff0000 ) ); + xTextPropSet.setPropertyValue( "CharColor", Integer.valueOf( 0xff0000 ) ); xTextPropSet = ShapeHelper.addPortion( xRectangle, "Portion2", false ); - xTextPropSet.setPropertyValue( "CharColor", new Integer( 0x8080ff ) ); + xTextPropSet.setPropertyValue( "CharColor", Integer.valueOf( 0x8080ff ) ); aLineSpacing.Height = 100; ShapeHelper.setPropertyForLastParagraph( xRectangle, "ParaLineSpacing", aLineSpacing ); // second paragraph xTextPropSet = ShapeHelper.addPortion( xRectangle, "Portion3", true ); - xTextPropSet.setPropertyValue( "CharColor", new Integer( 0xff ) ); + xTextPropSet.setPropertyValue( "CharColor", Integer.valueOf( 0xff ) ); aLineSpacing.Height = 200; ShapeHelper.setPropertyForLastParagraph( xRectangle, "ParaLineSpacing", aLineSpacing ); @@ -127,18 +127,18 @@ public class TextDemo xShapePropSet = UnoRuntime.queryInterface( XPropertySet.class, xRectangle ); xShapePropSet.setPropertyValue( "TextFitToSize", TextFitToSizeType.PROPORTIONAL ); - xShapePropSet.setPropertyValue( "TextLeftDistance", new Integer(2500)); - xShapePropSet.setPropertyValue( "TextRightDistance", new Integer(2500)); - xShapePropSet.setPropertyValue( "TextUpperDistance", new Integer(2500)); - xShapePropSet.setPropertyValue( "TextLowerDistance", new Integer(2500)); + xShapePropSet.setPropertyValue( "TextLeftDistance", Integer.valueOf(2500)); + xShapePropSet.setPropertyValue( "TextRightDistance", Integer.valueOf(2500)); + xShapePropSet.setPropertyValue( "TextUpperDistance", Integer.valueOf(2500)); + xShapePropSet.setPropertyValue( "TextLowerDistance", Integer.valueOf(2500)); xTextPropSet = ShapeHelper.addPortion( xRectangle, "using TextFitToSize", false ); xTextPropSet.setPropertyValue( "ParaAdjust", ParagraphAdjust.CENTER ); - xTextPropSet.setPropertyValue( "CharColor", new Integer(0xff00)); + xTextPropSet.setPropertyValue( "CharColor", Integer.valueOf(0xff00)); xTextPropSet = ShapeHelper.addPortion(xRectangle, "and a Border distance of 2,5 cm", true ); - xTextPropSet.setPropertyValue( "CharColor", new Integer( 0xff0000 ) ); + xTextPropSet.setPropertyValue( "CharColor", Integer.valueOf( 0xff0000 ) ); } catch( Exception ex ) diff --git a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java index 9d27e66a5d42..1818418d5766 100644 --- a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java +++ b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java @@ -188,7 +188,7 @@ public class HelloTextTableShape { table = xIndexedTables.getByIndex(i); xTableProps = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, table); - xTableProps.setPropertyValue("BackColor", new Integer(0xC8FFB9)); + xTableProps.setPropertyValue("BackColor", Integer.valueOf(0xC8FFB9)); } */ } @@ -371,7 +371,7 @@ public class HelloTextTableShape { XPropertySet.class, xCellRange); } // set cell background color - xCellProps.setPropertyValue(backColorPropertyName, new Integer(0x99CCFF)); + xCellProps.setPropertyValue(backColorPropertyName, Integer.valueOf(0x99CCFF)); // set table borders // create description for blue line, width 10 @@ -399,14 +399,14 @@ public class HelloTextTableShape { protected void manipulateShape(XShape xShape) throws com.sun.star.uno.Exception { XPropertySet xShapeProps = UnoRuntime.queryInterface(XPropertySet.class, xShape); - xShapeProps.setPropertyValue("FillColor", new Integer(0x99CCFF)); - xShapeProps.setPropertyValue("LineColor", new Integer(0x000099)); - xShapeProps.setPropertyValue("RotateAngle", new Integer(3000)); - - xShapeProps.setPropertyValue("TextLeftDistance", new Integer(0)); - xShapeProps.setPropertyValue("TextRightDistance", new Integer(0)); - xShapeProps.setPropertyValue("TextUpperDistance", new Integer(0)); - xShapeProps.setPropertyValue("TextLowerDistance", new Integer(0)); + xShapeProps.setPropertyValue("FillColor", Integer.valueOf(0x99CCFF)); + xShapeProps.setPropertyValue("LineColor", Integer.valueOf(0x000099)); + xShapeProps.setPropertyValue("RotateAngle", Integer.valueOf(3000)); + + xShapeProps.setPropertyValue("TextLeftDistance", Integer.valueOf(0)); + xShapeProps.setPropertyValue("TextRightDistance", Integer.valueOf(0)); + xShapeProps.setPropertyValue("TextUpperDistance", Integer.valueOf(0)); + xShapeProps.setPropertyValue("TextLowerDistance", Integer.valueOf(0)); } diff --git a/odk/examples/DevelopersGuide/Forms/DataAwareness.java b/odk/examples/DevelopersGuide/Forms/DataAwareness.java index 6c5cc5154709..e7401c13bb34 100644 --- a/odk/examples/DevelopersGuide/Forms/DataAwareness.java +++ b/odk/examples/DevelopersGuide/Forms/DataAwareness.java @@ -662,7 +662,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan xColProps.setPropertyValue( "Name", sDataField ); if ( nWidth > 0 ) - xColProps.setPropertyValue( "Width", new Integer( nWidth * 10 ) ); + xColProps.setPropertyValue( "Width", Integer.valueOf( nWidth * 10 ) ); // insert xColumnContainer.insertByIndex( xColumnContainer.getCount(), xNewCol ); @@ -720,7 +720,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan // set the data source signature at the form m_xMasterForm.setPropertyValue( "DataSourceName", m_database.getDocumentURL() ); - m_xMasterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) ); + m_xMasterForm.setPropertyValue( "CommandType", Integer.valueOf( CommandType.TABLE ) ); m_xMasterForm.setPropertyValue( "Command", "SALESMEN" ); @@ -743,7 +743,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan XPropertySet xSalesFormProps = UNO.queryPropertySet( xSalesForm ); xSalesFormProps.setPropertyValue( "DataSourceName", m_database.getDocumentURL() ); - xSalesFormProps.setPropertyValue( "CommandType", new Integer( CommandType.COMMAND ) ); + xSalesFormProps.setPropertyValue( "CommandType", Integer.valueOf( CommandType.COMMAND ) ); String sCommand = new String( "SELECT * FROM " ); sCommand += s_tableNameSales; diff --git a/odk/examples/DevelopersGuide/Forms/FormLayer.java b/odk/examples/DevelopersGuide/Forms/FormLayer.java index b582ee4fe701..0e8ebb88eb44 100644 --- a/odk/examples/DevelopersGuide/Forms/FormLayer.java +++ b/odk/examples/DevelopersGuide/Forms/FormLayer.java @@ -123,7 +123,7 @@ public class FormLayer xModelProps.setPropertyValue( "VisualEffect", new Short( com.sun.star.awt.VisualEffect.FLAT ) ); if ( m_document.classify() != DocumentType.CALC ) if ( xPSI.hasPropertyByName( "BorderColor" ) ) - xModelProps.setPropertyValue( "BorderColor", new Integer( 0x00C0C0C0 ) ); + xModelProps.setPropertyValue( "BorderColor", Integer.valueOf( 0x00C0C0C0 ) ); } catch( com.sun.star.uno.Exception e ) { diff --git a/odk/examples/DevelopersGuide/Forms/RowSet.java b/odk/examples/DevelopersGuide/Forms/RowSet.java index c37ce1448037..8c0a1534a294 100644 --- a/odk/examples/DevelopersGuide/Forms/RowSet.java +++ b/odk/examples/DevelopersGuide/Forms/RowSet.java @@ -48,7 +48,7 @@ public class RowSet implements XRowSet, XRow m_rowSetProps = UnoRuntime.queryInterface( XPropertySet.class, _context.getServiceManager().createInstanceWithContext( "com.sun.star.sdb.RowSet", _context ) ); m_rowSetProps.setPropertyValue( "DataSourceName", _dataSource ); - m_rowSetProps.setPropertyValue( "CommandType", new Integer( _commandType ) ); + m_rowSetProps.setPropertyValue( "CommandType", Integer.valueOf( _commandType ) ); m_rowSetProps.setPropertyValue( "Command", _command ); m_rowSet = UnoRuntime.queryInterface( XRowSet.class, m_rowSetProps ); diff --git a/odk/examples/DevelopersGuide/Forms/SalesFilter.java b/odk/examples/DevelopersGuide/Forms/SalesFilter.java index 2506f16a3666..2a6ed6a66c35 100644 --- a/odk/examples/DevelopersGuide/Forms/SalesFilter.java +++ b/odk/examples/DevelopersGuide/Forms/SalesFilter.java @@ -175,7 +175,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis nDate = nDate * 100 + aCalDate.get( Calendar.MONTH ) + 1; nDate = nDate * 100 + aCalDate.get( Calendar.DAY_OF_MONTH ); - aReturn = new Integer( nDate ); + aReturn = Integer.valueOf( nDate ); } else if ( aDate.getClass().equals( Class.forName( "java.lang.Integer" ) ) ) { @@ -215,19 +215,19 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis aCal.setTime( (java.util.Date)aDate ); sOdbcDate += new String( "{D '" ); - sOdbcDate += (new Integer( aCal.get( Calendar.YEAR ) ) ).toString(); + sOdbcDate += (Integer.valueOf( aCal.get( Calendar.YEAR ) ) ).toString(); sOdbcDate += "-"; int nMonth = aCal.get( Calendar.MONTH ) + 1; if ( nMonth < 10 ) sOdbcDate += "0"; - sOdbcDate += (new Integer( nMonth ) ).toString(); + sOdbcDate += (Integer.valueOf( nMonth ) ).toString(); sOdbcDate += "-"; int nDay = aCal.get( Calendar.DAY_OF_MONTH ); if ( nDay < 10 ) sOdbcDate += "0"; - sOdbcDate += (new Integer( nDay ) ).toString(); + sOdbcDate += (Integer.valueOf( nDay ) ).toString(); sOdbcDate += "'}"; } } diff --git a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java index c22054b46f37..f4c2e0fba29f 100644 --- a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java +++ b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java @@ -151,7 +151,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 ) diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java index 1eab64cd08ae..d599eeef54ae 100644 --- a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java +++ b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java @@ -45,7 +45,7 @@ public class SpreadsheetValueBinding extends DocumentBasedExample final short sheet = (short)0; final short exchangeColumn = (short)1; // B final short exchangeRow = (short)1; // 2 - final Integer backColor = new Integer( 0x00E0E0E0 ); + final Integer backColor = Integer.valueOf( 0x00E0E0E0 ); // a numeric control diff --git a/odk/examples/DevelopersGuide/GUI/DialogDocument.java b/odk/examples/DevelopersGuide/GUI/DialogDocument.java index 9db851852006..8ec7681cab38 100644 --- a/odk/examples/DevelopersGuide/GUI/DialogDocument.java +++ b/odk/examples/DevelopersGuide/GUI/DialogDocument.java @@ -65,13 +65,13 @@ 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[] { new Integer(400), Boolean.TRUE, "Dialog1", new Integer(102),new Integer(41), new Integer(1), new Short((short) 0), "Document-Dialog", new Integer(300)}); + 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)}); oDialogDocument.createWindowPeer(); Object oFTHeaderModel = oDialogDocument.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel"); XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel); xFTHeaderModelMPSet.setPropertyValues( new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(8), "This code-sample demonstrates how to display an office document in a dialog window", "HeaderLabel", new Integer(6), new Integer(6), new Integer(300)}); + new Object[] { Integer.valueOf(8), "This code-sample demonstrates how to display an office document in a dialog window", "HeaderLabel", Integer.valueOf(6), Integer.valueOf(6), Integer.valueOf(300)}); // add the model to the NameContainer of the dialog model oDialogDocument.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel); oDialogDocument.showDocumentinDialogWindow(oDialogDocument.m_xWindowPeer, new Rectangle(40, 50, 420, 550), "private:factory/swriter"); diff --git a/odk/examples/DevelopersGuide/GUI/ImageControlSample.java b/odk/examples/DevelopersGuide/GUI/ImageControlSample.java index c22e6701394b..ac2bf2791930 100644 --- a/odk/examples/DevelopersGuide/GUI/ImageControlSample.java +++ b/odk/examples/DevelopersGuide/GUI/ImageControlSample.java @@ -69,12 +69,12 @@ 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[] { new Integer(100), Boolean.TRUE, "MyTestDialog", new Integer(102),new Integer(41), new Integer(0), new Short((short) 0), "OpenOffice", new Integer(230)}); + 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)}); Object oFTHeaderModel = oImageControlSample.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel"); XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel); xFTHeaderModelMPSet.setPropertyValues( new String[] {"Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(16), "This code-sample demonstrates how to create an ImageControlSample within a dialog", Boolean.TRUE, "HeaderLabel", new Integer(6), new Integer(6), new Integer(210)}); + new Object[] { Integer.valueOf(16), "This code-sample demonstrates how to create an ImageControlSample within a dialog", Boolean.TRUE, "HeaderLabel", Integer.valueOf(6), Integer.valueOf(6), Integer.valueOf(210)}); // add the model to the NameContainer of the dialog model oImageControlSample.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel); XPropertySet xICModelPropertySet = oImageControlSample.insertImageControl(68, 30, 32, 90); @@ -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), new Integer(_nHeight), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.FALSE, new Integer(_nWidth)}); + new Object[] { new Short((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/RoadmapItemStateChangeListener.java b/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java index 4f084d629df6..61fbf5f6958b 100644 --- a/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java +++ b/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java @@ -54,7 +54,7 @@ public class RoadmapItemStateChangeListener implements XItemListener { // in the following line "ID" and "Step" are mixed together. // In fact in this case they denot the same if (nNewID != nOldStep){ - xDialogModelPropertySet.setPropertyValue("Step", new Integer(nNewID)); + xDialogModelPropertySet.setPropertyValue("Step", Integer.valueOf(nNewID)); } } catch (com.sun.star.uno.Exception exception) { exception.printStackTrace(System.err); diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java index 750b4a5d4a59..6a0f6fab85dd 100644 --- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java +++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java @@ -134,12 +134,12 @@ 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[] { new Integer(380), Boolean.TRUE, "MyTestDialog", new Integer(102),new Integer(41), new Integer(0), new Short((short) 0), "OpenOffice", new Integer(380)}); + 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)}); Object oFTHeaderModel = oUnoDialogSample.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel"); XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel); xFTHeaderModelMPSet.setPropertyValues( new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(8), "This code-sample demonstrates how to create various controls in a dialog", "HeaderLabel", new Integer(106), new Integer(6), new Integer(300)}); + new Object[] { Integer.valueOf(8), "This code-sample demonstrates how to create various controls in a dialog", "HeaderLabel", Integer.valueOf(106), Integer.valueOf(6), Integer.valueOf(300)}); // add the model to the NameContainer of the dialog model oUnoDialogSample.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel); oUnoDialogSample.insertFixedText(oUnoDialogSample, 106, 18, 100, 0, "My ~Label"); @@ -297,7 +297,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis xFTModelMPSet.setPropertyValues( new String[] {"Height", "Name", "PositionX", "PositionY", "Step", "Width"}, - new Object[] { new Integer(8), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nStep), new Integer(_nWidth)}); + new Object[] { Integer.valueOf(8), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nStep), Integer.valueOf(_nWidth)}); // add the model to the NameContainer of the dialog model m_xDlgModelNameContainer.insertByName(sName, oFTModel); @@ -340,7 +340,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! xCFModelMPSet.setPropertyValues( new String[] {"Height", "Name", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(12), sName, new Integer(_nPositionX), new Integer(_nPositionY), new Integer(_nWidth)}); + new Object[] { Integer.valueOf(12), sName, Integer.valueOf(_nPositionX), Integer.valueOf(_nPositionY), Integer.valueOf(_nWidth)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oCFModel); @@ -386,7 +386,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! xPBModelMPSet.setPropertyValues( new String[] {"Height", "Name", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(8), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)}); + new Object[] { Integer.valueOf(8), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oPBModel); @@ -394,8 +394,8 @@ 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 - xPBModelPSet.setPropertyValue("ProgressValueMin", new Integer(0)); - xPBModelPSet.setPropertyValue("ProgressValueMax", new Integer(_nProgressMax)); + xPBModelPSet.setPropertyValue("ProgressValueMin", Integer.valueOf(0)); + xPBModelPSet.setPropertyValue("ProgressValueMax", Integer.valueOf(_nProgressMax)); } catch (com.sun.star.uno.Exception ex) { /* perform individual exception handling here. * Possible exception types are: @@ -425,7 +425,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! xFLModelMPSet.setPropertyValues( new String[] {"Height", "Name", "Orientation", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(8), sName, new Integer(0), new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)}); + new Object[] { Integer.valueOf(8), sName, Integer.valueOf(0), Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oFLModel); @@ -462,7 +462,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! xGBModelMPSet.setPropertyValues( new String[] {"Height", "Name", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(_nHeight), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)}); + new Object[] { Integer.valueOf(_nHeight), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oGBModel); @@ -500,7 +500,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! xTFModelMPSet.setPropertyValues( new String[] {"Height", "Name", "PositionX", "PositionY", "Text", "Width"}, - new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), "MyText", new Integer(_nWidth)}); + new Object[] { Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), "MyText", Integer.valueOf(_nWidth)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oTFModel); @@ -545,7 +545,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! xTFModelMPSet.setPropertyValues( new String[] {"Height", "Name", "PositionX", "PositionY", "Spin", "Width"}, - new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, new Integer(_nWidth)}); + new Object[] { Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.TRUE, Integer.valueOf(_nWidth)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oTFModel); @@ -587,7 +587,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! xDFModelMPSet.setPropertyValues( new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "Width"}, - new Object[] {Boolean.TRUE, new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)}); + new Object[] {Boolean.TRUE, Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oDFModel); @@ -633,7 +633,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! xPFModelMPSet.setPropertyValues( new String[] {"Height", "Name", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)}); + new Object[] { Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oPFModel); @@ -676,7 +676,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! xNFModelMPSet.setPropertyValues( new String[] {"Height", "Name", "PositionX", "PositionY", "Spin", "StrictFormat", "Width"}, - new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, Boolean.TRUE, new Integer(_nWidth)}); + new Object[] { Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.TRUE, Boolean.TRUE, Integer.valueOf(_nWidth)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oNFModel); @@ -712,7 +712,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis // create a unique name by means of an own implementation... String sName = createUniqueName(m_xDlgModelNameContainer, "ScrollBar"); - Integer NOrientation = new Integer(com.sun.star.awt.ScrollBarOrientation.VERTICAL); + Integer NOrientation = Integer.valueOf(com.sun.star.awt.ScrollBarOrientation.VERTICAL); // create a controlmodel at the multiservicefactory of the dialog model... Object oSBModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlScrollBarModel"); @@ -720,7 +720,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! xSBModelMPSet.setPropertyValues( new String[] {"Height", "Name", "Orientation", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(_nHeight), sName, NOrientation, new Integer(_nPosX), new Integer(_nPosY), new Integer(8)}); + new Object[] { Integer.valueOf(_nHeight), sName, NOrientation, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(8)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oSBModel); @@ -728,11 +728,11 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis xSBModelPSet = UnoRuntime.queryInterface(XPropertySet.class, oSBModel); // The following properties may also be set with XMultiPropertySet but we // use the XPropertySet interface merely for reasons of demonstration - xSBModelPSet.setPropertyValue("ScrollValueMin", new Integer(0)); - xSBModelPSet.setPropertyValue("ScrollValueMax", new Integer(100)); - xSBModelPSet.setPropertyValue("ScrollValue", new Integer(5)); - xSBModelPSet.setPropertyValue("LineIncrement", new Integer(2)); - xSBModelPSet.setPropertyValue("BlockIncrement", new Integer(10)); + xSBModelPSet.setPropertyValue("ScrollValueMin", Integer.valueOf(0)); + xSBModelPSet.setPropertyValue("ScrollValueMax", Integer.valueOf(100)); + xSBModelPSet.setPropertyValue("ScrollValue", Integer.valueOf(5)); + xSBModelPSet.setPropertyValue("LineIncrement", Integer.valueOf(2)); + xSBModelPSet.setPropertyValue("BlockIncrement", Integer.valueOf(10)); // Add an Adjustment that will listen to changes of the scrollbar... XControl xSBControl = m_xDlgContainer.getControl(sName); @@ -787,7 +787,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis XMultiPropertySet xCBMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oCBModel); xCBMPSet.setPropertyValues( new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width" } , - new Object[] {new Integer(8), "~Include page number", sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)}); + new Object[] {Integer.valueOf(8), "~Include page number", sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)}); // The following property may also be set with XMultiPropertySet but we // use the XPropertySet interface merely for reasons of demonstration @@ -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[] {new Integer(8), "~First Option", sName, new Integer(_nPosX), new Integer(_nPosY), new Short((short) 1), new Short(_nTabIndex++),new Integer(_nWidth)}); + new Object[] {Integer.valueOf(8), "~First Option", sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), new Short((short) 1), new Short(_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[] {new Integer(8), "~Second Option", sName, new Integer(130), new Integer(214), new Short(_nTabIndex), new Integer(150)}); + new Object[] {Integer.valueOf(8), "~Second Option", sName, Integer.valueOf(130), Integer.valueOf(214), new Short(_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) { @@ -872,7 +872,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! xLBModelMPSet.setPropertyValues( new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "Step", "StringItemList", "Width" } , - new Object[] {Boolean.TRUE, new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nStep), _sStringItemList, new Integer(_nWidth)}); + new Object[] {Boolean.TRUE, Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nStep), _sStringItemList, Integer.valueOf(_nWidth)}); // The following property may also be set with XMultiPropertySet but we // use the XPropertySet interface merely for reasons of demonstration XPropertySet xLBModelPSet = UnoRuntime.queryInterface(XPropertySet.class, xLBModelMPSet); @@ -914,7 +914,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! xCbBModelMPSet.setPropertyValues( new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "StringItemList", "Width" } , - new Object[] {Boolean.TRUE, new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), sStringItemList, new Integer(_nWidth)}); + new Object[] {Boolean.TRUE, Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), sStringItemList, Integer.valueOf(_nWidth)}); // The following property may also be set with XMultiPropertySet but we // use the XPropertySet interface merely for reasons of demonstration @@ -957,7 +957,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! xFFModelMPSet.setPropertyValues( new String[] {"EffectiveValue", "Height", "Name", "PositionX", "PositionY", "StrictFormat", "Spin", "Width"}, - new Object[] { new Double(12348), new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, Boolean.TRUE, new Integer(_nWidth)}); + new Object[] { new Double(12348), Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.TRUE, Boolean.TRUE, Integer.valueOf(_nWidth)}); xFFModelPSet = UnoRuntime.queryInterface(XPropertySet.class, oFFModel); // to define a numberformat you always need a locale... @@ -981,7 +981,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 xFFModelPSet.setPropertyValue("FormatsSupplier", xNumberFormatsSupplier); - xFFModelPSet.setPropertyValue("FormatKey", new Integer(nFormatKey)); + xFFModelPSet.setPropertyValue("FormatKey", Integer.valueOf(nFormatKey)); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oFFModel); @@ -1033,7 +1033,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis XMultiPropertySet xFCModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFCModel); xFCModelMPSet.setPropertyValues( new String[] {"Height", "Name", "PositionX", "PositionY", "Text", "Width"}, - new Object[] { new Integer(14), sName, new Integer(_nPosX), new Integer(_nPosY), sSystemWorkPath, new Integer(_nWidth)}); + new Object[] { Integer.valueOf(14), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), sSystemWorkPath, Integer.valueOf(_nWidth)}); // The controlmodel is not really available until inserted to the Dialog container m_xDlgModelNameContainer.insertByName(sName, oFCModel); @@ -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[] {new Integer(14), _sLabel, sName, new Integer(_nPosX), new Integer(_nPosY), new Short(_nPushButtonType), new Integer(_nWidth)}); + new Object[] {Integer.valueOf(14), _sLabel, sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), new Short(_nPushButtonType), Integer.valueOf(_nWidth)}); // add the model to the NameContainer of the dialog model m_xDlgModelNameContainer.insertByName(sName, oButtonModel); @@ -1320,7 +1320,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis // define the properties of the roadmapmodel XMultiPropertySet xRMMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oRoadmapModel); xRMMPSet.setPropertyValues( new String[] {"Complete", "Height", "Name", "PositionX", "PositionY", "Text", "Width" }, - new Object[] {Boolean.FALSE, new Integer(nDialogHeight - 26), sRoadmapName, new Integer(0), new Integer(0), "Steps", new Integer(85)}); + new Object[] {Boolean.FALSE, Integer.valueOf(nDialogHeight - 26), sRoadmapName, Integer.valueOf(0), Integer.valueOf(0), "Steps", Integer.valueOf(85)}); m_xRMPSet = UnoRuntime.queryInterface(XPropertySet.class, oRoadmapModel); // add the roadmapmodel to the dialog container.. @@ -1354,7 +1354,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis // sometimes steps are supposed to be set disabled depending on the program logic... xRMItemPSet.setPropertyValue("Enabled", Boolean.valueOf(_bEnabled)); // in this context the "ID" is meant to refer to a step of the dialog - xRMItemPSet.setPropertyValue("ID", new Integer(_ID)); + xRMItemPSet.setPropertyValue("ID", Integer.valueOf(_ID)); m_xRMIndexCont.insertByIndex(Index, oRoadmapItem); } catch (com.sun.star.uno.Exception exception) { exception.printStackTrace(System.err); diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java index 225262732e49..a73362a53a87 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[] { new Integer(nDialogHeight), Boolean.TRUE, "Dialog1", new Integer(102),new Integer(41), new Integer(1), new Short((short) 0), "Inspect a Uno-Object", new Integer(nDialogWidth)}); + 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)}); 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... @@ -220,7 +220,7 @@ public class UnoDialogSample2 extends UnoDialogSample { // Set the properties at the model - keep in mind to pass the property names in alphabetical order! xLBModelMPSet.setPropertyValues( new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "ReadOnly", "Step", "StringItemList", "Width" } , - new Object[] {Boolean.FALSE, new Integer(_nHeight), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, new Integer(_nStep), _sStringItemList, new Integer(_nWidth)}); + new Object[] {Boolean.FALSE, Integer.valueOf(_nHeight), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.TRUE, Integer.valueOf(_nStep), _sStringItemList, Integer.valueOf(_nWidth)}); m_xDlgModelNameContainer.insertByName(sName, xLBModelMPSet); }catch (com.sun.star.uno.Exception ex) { throw new java.lang.RuntimeException("cannot happen..."); @@ -240,7 +240,7 @@ public class UnoDialogSample2 extends UnoDialogSample { // Set the properties at the model - keep in mind to pass the property names in alphabetical order! xFTModelMPSet.setPropertyValues( new String[] {"Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "Width"}, - new Object[] { new Integer(nHeight), _sLabel, Boolean.TRUE, sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nStep), new Integer(_nWidth)}); + new Object[] { Integer.valueOf(nHeight), _sLabel, Boolean.TRUE, sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nStep), Integer.valueOf(_nWidth)}); // add the model to the NameContainer of the dialog model m_xDlgModelNameContainer.insertByName(sName, oFTModel); }catch (com.sun.star.uno.Exception ex){ diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu2.java b/odk/examples/DevelopersGuide/GUI/UnoMenu2.java index 24b0aabab04e..8869cf4394e3 100644 --- a/odk/examples/DevelopersGuide/GUI/UnoMenu2.java +++ b/odk/examples/DevelopersGuide/GUI/UnoMenu2.java @@ -42,13 +42,13 @@ 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[] { new Integer(140), Boolean.TRUE, "Dialog1", new Integer(102),new Integer(41), new Integer(1), new Short((short) 0), "Menu-Dialog", new Integer(200)}); + 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)}); Object oFTHeaderModel = oUnoMenu2.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel"); XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel); xFTHeaderModelMPSet.setPropertyValues( new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(8), "This code-sample demonstrates the creation of a popup-menu", "HeaderLabel", new Integer(6), new Integer(6), new Integer(200)}); + new Object[] { Integer.valueOf(8), "This code-sample demonstrates the creation of a popup-menu", "HeaderLabel", Integer.valueOf(6), Integer.valueOf(6), Integer.valueOf(200)}); // add the model to the NameContainer of the dialog model oUnoMenu2.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel); oUnoMenu2.addLabelForPopupMenu(); @@ -75,7 +75,7 @@ public UnoMenu2(XComponentContext _xContext, XMultiComponentFactory _xMCF) { // Set the properties at the model - keep in mind to pass the property names in alphabetical order! xFTModelMPSet.setPropertyValues( new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"}, - new Object[] { new Integer(8), "Right-click here", sName, new Integer(50), new Integer(50), new Integer(100)}); + new Object[] { Integer.valueOf(8), "Right-click here", sName, Integer.valueOf(50), Integer.valueOf(50), Integer.valueOf(100)}); // add the model to the NameContainer of the dialog model m_xDlgModelNameContainer.insertByName(sName, oFTModel); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, m_xDlgContainer.getControl(sName)); diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java index 712abb91fcc3..63fc3cd8392c 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java @@ -155,7 +155,7 @@ public class NativeView extends java.awt.Canvas { if(maHandle==null) { - maHandle = new Integer((int)getNativeWindow()); + maHandle = Integer.valueOf((int)getNativeWindow()); maSystem = getNativeWindowSystemType(); } return maHandle; diff --git a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java index 0f7e25851a4d..f6a8f8c035d8 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java @@ -114,7 +114,7 @@ public class Number_Formats com.sun.star.beans.XPropertySet.class, xCellRange ); // Set number format to default currency - xCellProp.setPropertyValue( "NumberFormat", new Integer(nCurrencyKey) ); + xCellProp.setPropertyValue( "NumberFormat", Integer.valueOf(nCurrencyKey) ); // Get cell B3 com.sun.star.table.XCell xCell = maSheet.getCellByPosition( 1, 2 ); @@ -158,7 +158,7 @@ public class Number_Formats // Set the new format at the cell if ( nIndexKey != -1 ) - xCellProp.setPropertyValue( "NumberFormat", new Integer(nIndexKey) ); + xCellProp.setPropertyValue( "NumberFormat", Integer.valueOf(nIndexKey) ); // Set column containing the example values to optimal width to show diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java index e72861db0233..593e8e572f48 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java @@ -269,12 +269,12 @@ class ExampleLevel implements public com.sun.star.sheet.MemberResult[] getResults() { int nDimensions = 0; - int nPosition = aSettings.aColDimensions.indexOf( new Integer(nDimension)); + int nPosition = aSettings.aColDimensions.indexOf( Integer.valueOf(nDimension)); if ( nPosition >= 0 ) nDimensions = aSettings.aColDimensions.size(); else { - nPosition = aSettings.aRowDimensions.indexOf( new Integer(nDimension)); + nPosition = aSettings.aRowDimensions.indexOf( Integer.valueOf(nDimension)); if ( nPosition >= 0 ) nDimensions = aSettings.aRowDimensions.size(); } @@ -604,7 +604,7 @@ class ExampleDimension implements eNewOrient != com.sun.star.sheet.DataPilotFieldOrientation.DATA ) { // remove from list for old orientation and add for new one - Integer aDimInt = new Integer(nDimension); + Integer aDimInt = Integer.valueOf(nDimension); if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.COLUMN ) aSettings.aColDimensions.remove( aDimInt ); else if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.ROW ) @@ -621,7 +621,7 @@ class ExampleDimension implements else if ( aPropertyName.equals( "Position" ) ) { int nNewPos = ((Integer) aValue).intValue(); - Integer aDimInt = new Integer(nDimension); + Integer aDimInt = Integer.valueOf(nDimension); if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.COLUMN ) { aSettings.aColDimensions.remove( aDimInt ); @@ -655,17 +655,17 @@ class ExampleDimension implements { int nPosition; if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.COLUMN ) - nPosition = aSettings.aColDimensions.indexOf( new Integer(nDimension) ); + nPosition = aSettings.aColDimensions.indexOf( Integer.valueOf(nDimension) ); else if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.ROW ) - nPosition = aSettings.aRowDimensions.indexOf( new Integer(nDimension) ); + nPosition = aSettings.aRowDimensions.indexOf( Integer.valueOf(nDimension) ); else nPosition = nDimension; - return new Integer( nPosition ); + return Integer.valueOf( nPosition ); } else if ( aPropertyName.equals( "Function" ) ) return com.sun.star.sheet.GeneralFunction.SUM; else if ( aPropertyName.equals( "UsedHierarchy" ) ) - return new Integer(0); + return Integer.valueOf(0); else if ( aPropertyName.equals( "Filter" ) ) return new com.sun.star.sheet.TableFilterField[0]; else diff --git a/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java b/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java index f25a9cfded8f..a40722f5e625 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java @@ -106,7 +106,7 @@ public class GeneralTableSample extends SpreadsheetDocHelper // *** Change cell properties *** int nValue = bValid ? 0x00FF00 : 0xFF4040; xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( nValue ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( nValue ) ); // *** Accessing a CELL RANGE *** @@ -117,14 +117,14 @@ public class GeneralTableSample extends SpreadsheetDocHelper // Change properties of the range. xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x8080FF ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( 0x8080FF ) ); // Accessing a cell range over its name. xCellRange = xSheet.getCellRangeByName( "C4:D5" ); // Change properties of the range. xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( 0xFFFF80 ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( 0xFFFF80 ) ); // *** Using the CELL CURSOR to add some data below of the filled area *** @@ -155,7 +155,7 @@ public class GeneralTableSample extends SpreadsheetDocHelper // Get column C by index (interface XIndexAccess). Object aColumnObj = xColumns.getByIndex( 2 ); xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aColumnObj ); - xPropSet.setPropertyValue( "Width", new Integer( 5000 ) ); + xPropSet.setPropertyValue( "Width", Integer.valueOf( 5000 ) ); // Get the name of the column. com.sun.star.container.XNamed xNamed = UnoRuntime.queryInterface( com.sun.star.container.XNamed.class, aColumnObj ); @@ -172,7 +172,7 @@ public class GeneralTableSample extends SpreadsheetDocHelper // Get row 7 by index (interface XIndexAccess) Object aRowObj = xRows.getByIndex( 6 ); xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aRowObj ); - xPropSet.setPropertyValue( "Height", new Integer( 5000 ) ); + xPropSet.setPropertyValue( "Height", Integer.valueOf( 5000 ) ); xSheet.getCellByPosition( 2, 6 ).setFormula( "What a big cell." ); diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java index dbdbc8004df2..4416440b10b4 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java @@ -202,7 +202,7 @@ public class SpreadsheetDocHelper com.sun.star.util.NumberFormat.DATE, new com.sun.star.lang.Locale() ); com.sun.star.beans.XPropertySet xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell ); - xPropSet.setPropertyValue( "NumberFormat", new Integer( nFormat ) ); + xPropSet.setPropertyValue( "NumberFormat", Integer.valueOf( nFormat ) ); } /** Draws a colored border around the range and writes the headline in the @@ -237,12 +237,12 @@ public class SpreadsheetDocHelper xCellRange = xSheet.getCellRangeByPosition( aAddr.StartColumn, aAddr.StartRow, aAddr.EndColumn, aAddr.StartRow ); xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x99CCFF ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( 0x99CCFF ) ); // write headline com.sun.star.table.XCell xCell = xCellRange.getCellByPosition( 0, 0 ); xCell.setFormula( aHeadline ); xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell ); - xPropSet.setPropertyValue( "CharColor", new Integer( 0x003399 ) ); + xPropSet.setPropertyValue( "CharColor", Integer.valueOf( 0x003399 ) ); xPropSet.setPropertyValue( "CharWeight", new Float( com.sun.star.awt.FontWeight.BOLD ) ); } diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java index 4438f880440e..467f3b5e91be 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java @@ -261,13 +261,13 @@ public class SpreadsheetSample extends SpreadsheetDocHelper // --- Change cell properties. --- xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell ); // from styles.CharacterProperties - xPropSet.setPropertyValue( "CharColor", new Integer( 0x003399 ) ); + xPropSet.setPropertyValue( "CharColor", Integer.valueOf( 0x003399 ) ); xPropSet.setPropertyValue( "CharHeight", new Float( 20.0 ) ); // from styles.ParagraphProperties - xPropSet.setPropertyValue( "ParaLeftMargin", new Integer( 500 ) ); + xPropSet.setPropertyValue( "ParaLeftMargin", Integer.valueOf( 500 ) ); // from table.CellProperties xPropSet.setPropertyValue( "IsCellBackgroundTransparent", Boolean.FALSE ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x99CCFF ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( 0x99CCFF ) ); // --- Get cell address. --- @@ -312,13 +312,13 @@ public class SpreadsheetSample extends SpreadsheetDocHelper // --- Change cell range properties. --- xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange ); // from com.sun.star.styles.CharacterProperties - xPropSet.setPropertyValue( "CharColor", new Integer( 0x003399 ) ); + xPropSet.setPropertyValue( "CharColor", Integer.valueOf( 0x003399 ) ); xPropSet.setPropertyValue( "CharHeight", new Float( 20.0 ) ); // from com.sun.star.styles.ParagraphProperties - xPropSet.setPropertyValue( "ParaLeftMargin", new Integer( 500 ) ); + xPropSet.setPropertyValue( "ParaLeftMargin", Integer.valueOf( 500 ) ); // from com.sun.star.table.CellProperties xPropSet.setPropertyValue( "IsCellBackgroundTransparent", Boolean.FALSE ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x99CCFF ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( 0x99CCFF ) ); // --- Replace text in all cells. --- @@ -366,7 +366,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper Object aColumnObj = xColumns.getByIndex( 0 ); xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aColumnObj ); - xPropSet.setPropertyValue( "Width", new Integer( 6000 ) ); + xPropSet.setPropertyValue( "Width", Integer.valueOf( 6000 ) ); com.sun.star.container.XNamed xNamed = UnoRuntime.queryInterface( com.sun.star.container.XNamed.class, aColumnObj ); System.out.println( "The name of the wide column is " + xNamed.getName() + "." ); @@ -647,7 +647,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper // modify properties of the new style xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aCellStyle ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x888888 ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( 0x888888 ) ); xPropSet.setPropertyValue( "IsCellBackgroundTransparent", Boolean.FALSE ); @@ -741,7 +741,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper Object aFieldObj = xAutoFormatIA.getByIndex( 4 * nRow + nColumn ); xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aFieldObj ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( nColor ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( nColor ) ); } } @@ -1208,7 +1208,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper com.sun.star.table.XCellRange xResultRange = xRef.getReferredCells(); com.sun.star.beans.XPropertySet xResultProp = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xResultRange ); xResultProp.setPropertyValue( "IsCellBackgroundTransparent", Boolean.FALSE ); - xResultProp.setPropertyValue( "CellBackColor", new Integer( 0xFFFFCC ) ); + xResultProp.setPropertyValue( "CellBackColor", Integer.valueOf( 0xFFFFCC ) ); } } } diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java b/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java index c313fa193d18..71b39d20a672 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java @@ -90,13 +90,13 @@ public class ViewSample extends SpreadsheetDocHelper com.sun.star.table.XCellRange xRange = xRefer.getReferredCells(); com.sun.star.beans.XPropertySet xRangeProp = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xRange ); xRangeProp.setPropertyValue( "IsCellBackgroundTransparent", Boolean.FALSE ); - xRangeProp.setPropertyValue( "CellBackColor", new Integer( 0xFFFFCC ) ); + xRangeProp.setPropertyValue( "CellBackColor", Integer.valueOf( 0xFFFFCC ) ); // --- View settings --- // change the view to display green grid lines com.sun.star.beans.XPropertySet xProp = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xController ); xProp.setPropertyValue( "ShowGrid", Boolean.TRUE ); - xProp.setPropertyValue( "GridColor", new Integer(0x00CC00) ); + xProp.setPropertyValue( "GridColor", Integer.valueOf(0x00CC00) ); // --- Range selection --- // let the user select a range and use it as the view's selection diff --git a/odk/examples/DevelopersGuide/Text/TextDocuments.java b/odk/examples/DevelopersGuide/Text/TextDocuments.java index 92b5504f536b..dc767f3d7494 100644 --- a/odk/examples/DevelopersGuide/Text/TextDocuments.java +++ b/odk/examples/DevelopersGuide/Text/TextDocuments.java @@ -591,7 +591,7 @@ public class TextDocuments { // Set the name and value of the FieldMaster xMasterPropSet.setPropertyValue ( "Name", "UserEmperor" ); - xMasterPropSet.setPropertyValue ( "Value", new Integer ( 42 ) ); + xMasterPropSet.setPropertyValue ( "Value", Integer.valueOf( 42 ) ); // Attach the field master to the user field xUserField.attachTextFieldMaster ( xMasterPropSet ); @@ -682,7 +682,7 @@ public class TextDocuments { try { // Set the colour of the text to white - xCellCursorProps.setPropertyValue( "CharColor", new Integer(16777215)); + xCellCursorProps.setPropertyValue( "CharColor", Integer.valueOf(16777215)); } catch ( Exception e) { @@ -719,7 +719,7 @@ public class TextDocuments { // If BackTransparant is false, then the background color is visible xRow.setPropertyValue( "BackTransparent", Boolean.FALSE); // Specify the color of the background to be dark blue - xRow.setPropertyValue( "BackColor", new Integer(6710932)); + xRow.setPropertyValue( "BackColor", Integer.valueOf(6710932)); // Access the property set of the whole table XPropertySet xTableProps = UnoRuntime.queryInterface( @@ -727,7 +727,7 @@ public class TextDocuments { // We want visible background colors xTableProps.setPropertyValue( "BackTransparent", Boolean.FALSE); // Set the background colour to light blue - xTableProps.setPropertyValue( "BackColor", new Integer(13421823)); + xTableProps.setPropertyValue( "BackColor", Integer.valueOf(13421823)); // set the text (and text colour) of all the cells in the first row // of the table @@ -866,7 +866,7 @@ public class TextDocuments { Boolean.FALSE); // We want the background to be light blue - xTableProps.setPropertyValue( "BackColor", new Integer(13421823)); + xTableProps.setPropertyValue( "BackColor", Integer.valueOf(13421823)); // Inser the table into the document mxDocText.insertTextContent( mxDocCursor, xTable, false); @@ -882,7 +882,7 @@ public class TextDocuments { xRow.setPropertyValue( "BackTransparent", Boolean.FALSE); // And let's make it dark blue - xRow.setPropertyValue( "BackColor", new Integer(6710932)); + xRow.setPropertyValue( "BackColor", Integer.valueOf(6710932)); // Put a description of the table contents into the first cell insertIntoCell( "A1", "AutoText Groups", xTable); @@ -1380,7 +1380,7 @@ public class TextDocuments { XPropertySet.class, xStyle ); // Give the new style a light blue background - xStyleProps.setPropertyValue ( "ParaBackColor", new Integer (13421823)); + xStyleProps.setPropertyValue ( "ParaBackColor", Integer.valueOf(13421823)); // Get the StyleFamiliesSupplier interface of the document XStyleFamiliesSupplier xSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, mxDoc); @@ -1628,7 +1628,7 @@ public class TextDocuments { XPropertySet xChildProps = UnoRuntime.queryInterface( XPropertySet.class, xChildNamed ); // Set the Child_Section's background colour to blue - xChildProps.setPropertyValue( "BackColor", new Integer(13421823)); + xChildProps.setPropertyValue( "BackColor", Integer.valueOf(13421823)); // Refresh the document, so the linked section matches the Child_Section XRefreshable xRefresh = UnoRuntime.queryInterface( diff --git a/odk/examples/java/Drawing/SDraw.java b/odk/examples/java/Drawing/SDraw.java index 54404e244de6..73a05022147a 100644 --- a/odk/examples/java/Drawing/SDraw.java +++ b/odk/examples/java/Drawing/SDraw.java @@ -182,7 +182,7 @@ public class SDraw { com.sun.star.beans.XPropertySet.class, xShape); try { - xSPS.setPropertyValue("FillColor", new Integer(col)); + xSPS.setPropertyValue("FillColor", Integer.valueOf(col)); } catch (Exception e) { System.err.println("Can't change colors " + e); e.printStackTrace(System.err); @@ -237,7 +237,7 @@ public class SDraw { xShape); try { - xSPS.setPropertyValue("FillColor", new Integer(getCol(r,g,b))); + xSPS.setPropertyValue("FillColor", Integer.valueOf(getCol(r,g,b))); xSPS.setPropertyValue("Shadow", Boolean.TRUE); } catch (Exception e) { System.err.println("Can't change colors " + e); diff --git a/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java b/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java index d419063b6879..52ec8ce47d33 100644 --- a/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java +++ b/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java @@ -891,7 +891,7 @@ public class EmbedContApp extends Applet implements MouseListener, XEmbeddedClie { Object aArgs[] = new Object[2]; aArgs[0] = aFileURI; - aArgs[1] = new Integer( ElementModes.READWRITE ); + aArgs[1] = Integer.valueOf( ElementModes.READWRITE ); Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs ); XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage ); @@ -926,7 +926,7 @@ public class EmbedContApp extends Applet implements MouseListener, XEmbeddedClie oStorageFactory ); Object aArgs[] = new Object[2]; aArgs[0] = aFileURI; - aArgs[1] = new Integer( ElementModes.READWRITE ); + aArgs[1] = Integer.valueOf( ElementModes.READWRITE ); Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs ); XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage ); diff --git a/odk/examples/java/Inspector/Introspector.java b/odk/examples/java/Inspector/Introspector.java index 4498e5257368..1d04e8dc21cf 100644 --- a/odk/examples/java/Inspector/Introspector.java +++ b/odk/examples/java/Inspector/Introspector.java @@ -172,7 +172,7 @@ public class Introspector extends WeakBase{ XIdlMethod mMethod = xIntrospectionAccessObject.getMethod("getByIndex", com.sun.star.beans.MethodConcept.INDEXCONTAINER); for ( int i = 0; i < xIndexAccess.getCount(); i++ ) { Object[][] aParamInfo = new Object[1][1]; - aParamInfo[0] = new Integer[] { new Integer(i) }; + aParamInfo[0] = new Integer[] { Integer.valueOf(i) }; oRetComponentsVector.add(mMethod.invoke(_oUnoParentObject, aParamInfo)); } } diff --git a/odk/examples/java/PropertySet/PropTest.java b/odk/examples/java/PropertySet/PropTest.java index fd77886a6678..148c000d9938 100644 --- a/odk/examples/java/PropertySet/PropTest.java +++ b/odk/examples/java/PropertySet/PropTest.java @@ -152,9 +152,9 @@ public class PropTest extends PropertySet implements XServiceInfo // readonly public int roIntA= 100; - public Integer roIntClassA= new Integer(100); - public Object roObjectA= new Integer(101); - public Any roAnyA= new Any( new Type(int.class), new Integer(102)); + public Integer roIntClassA= Integer.valueOf(100); + public Object roObjectA= Integer.valueOf(101); + public Any roAnyA= new Any( new Type(int.class), Integer.valueOf(102)); // BOUND & CONSTRAINED public boolean bcBoolA; diff --git a/odk/examples/java/Spreadsheet/EuroAdaption.java b/odk/examples/java/Spreadsheet/EuroAdaption.java index 498f18800dd3..870c20978245 100644 --- a/odk/examples/java/Spreadsheet/EuroAdaption.java +++ b/odk/examples/java/Spreadsheet/EuroAdaption.java @@ -213,7 +213,7 @@ public class EuroAdaption { // set the new numberformat to the cellrange DM->EUR xCellProp.setPropertyValue( "NumberFormat", - new Integer( iNewNumberFormat ) ); + Integer.valueOf( iNewNumberFormat ) ); // interate over all cells from the cellrange with an // content and use the DM/EUR factor @@ -297,7 +297,7 @@ public class EuroAdaption { XPropertySet xCellProp = UnoRuntime.queryInterface( XPropertySet.class, xCellRange ); xCellProp.setPropertyValue( "NumberFormat", - new Integer(iNumberFormatKey) ); + Integer.valueOf(iNumberFormatKey) ); } } catch( Exception e) { diff --git a/odk/examples/java/Spreadsheet/SCalc.java b/odk/examples/java/Spreadsheet/SCalc.java index a303fafabc65..0a8b705c7b17 100644 --- a/odk/examples/java/Spreadsheet/SCalc.java +++ b/odk/examples/java/Spreadsheet/SCalc.java @@ -139,15 +139,15 @@ public class SCalc { XPropertySet oCPS1 = UnoRuntime.queryInterface( XPropertySet.class, oInt1 ); oCPS1.setPropertyValue("IsCellBackgroundTransparent", Boolean.FALSE); - oCPS1.setPropertyValue("CellBackColor",new Integer(6710932)); - oCPS1.setPropertyValue("CharColor",new Integer(16777215)); + oCPS1.setPropertyValue("CellBackColor",Integer.valueOf(6710932)); + oCPS1.setPropertyValue("CharColor",Integer.valueOf(16777215)); XInterface oInt2 = (XInterface) oDocMSF.createInstance( "com.sun.star.style.CellStyle"); oStyleFamilyNameContainer.insertByName("My Style2", oInt2); XPropertySet oCPS2 = UnoRuntime.queryInterface( XPropertySet.class, oInt2 ); oCPS2.setPropertyValue("IsCellBackgroundTransparent", Boolean.FALSE); - oCPS2.setPropertyValue("CellBackColor",new Integer(13421823)); + oCPS2.setPropertyValue("CellBackColor",Integer.valueOf(13421823)); } catch (Exception e) { e.printStackTrace(System.err); } diff --git a/odk/examples/java/Storage/Test01.java b/odk/examples/java/Storage/Test01.java index 7ff1f4f498bc..b2e94b36ac44 100644 --- a/odk/examples/java/Storage/Test01.java +++ b/odk/examples/java/Storage/Test01.java @@ -95,7 +95,7 @@ public class Test01 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -119,7 +119,7 @@ public class Test01 implements StorageTest { // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.READWRITE ); + pArgs[1] = Integer.valueOf( ElementModes.READWRITE ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) diff --git a/odk/examples/java/Storage/Test02.java b/odk/examples/java/Storage/Test02.java index 10fda47a713a..5750f253939c 100644 --- a/odk/examples/java/Storage/Test02.java +++ b/odk/examples/java/Storage/Test02.java @@ -50,7 +50,7 @@ public class Test02 implements StorageTest { // create storage based on the temporary stream Object pArgs[] = new Object[2]; pArgs[0] = xTempFileStream; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempStorage = UnoRuntime.queryInterface( XStorage.class, oTempStorage ); diff --git a/odk/examples/java/Storage/Test04.java b/odk/examples/java/Storage/Test04.java index 89417471afa8..79a55dcb25a4 100644 --- a/odk/examples/java/Storage/Test04.java +++ b/odk/examples/java/Storage/Test04.java @@ -115,7 +115,7 @@ public class Test04 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -176,7 +176,7 @@ public class Test04 implements StorageTest { // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.READWRITE ); + pArgs[1] = Integer.valueOf( ElementModes.READWRITE ); Object oResStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResStorage = UnoRuntime.queryInterface( XStorage.class, oResStorage ); if ( xResStorage == null ) diff --git a/odk/examples/java/Storage/Test05.java b/odk/examples/java/Storage/Test05.java index 99a7716994a1..b0c84ae11b9f 100644 --- a/odk/examples/java/Storage/Test05.java +++ b/odk/examples/java/Storage/Test05.java @@ -51,7 +51,7 @@ public class Test05 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -214,7 +214,7 @@ public class Test05 implements StorageTest { // now check all the written and copied information - pArgs[1] = new Integer( ElementModes.READ ); + pArgs[1] = Integer.valueOf( ElementModes.READ ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) diff --git a/odk/examples/java/Storage/Test07.java b/odk/examples/java/Storage/Test07.java index ba92f649aafd..7ae850fab32c 100644 --- a/odk/examples/java/Storage/Test07.java +++ b/odk/examples/java/Storage/Test07.java @@ -73,7 +73,7 @@ public class Test07 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -97,7 +97,7 @@ public class Test07 implements StorageTest { // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.READWRITE ); + pArgs[1] = Integer.valueOf( ElementModes.READWRITE ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) diff --git a/odk/examples/java/Storage/Test08.java b/odk/examples/java/Storage/Test08.java index 6e5aec84b3e0..adc911ccb95f 100644 --- a/odk/examples/java/Storage/Test08.java +++ b/odk/examples/java/Storage/Test08.java @@ -128,7 +128,7 @@ public class Test08 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -152,7 +152,7 @@ public class Test08 implements StorageTest { // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.READ ); + pArgs[1] = Integer.valueOf( ElementModes.READ ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) diff --git a/odk/examples/java/Storage/Test09.java b/odk/examples/java/Storage/Test09.java index 4e7f5f2ba66c..171ce6f25627 100644 --- a/odk/examples/java/Storage/Test09.java +++ b/odk/examples/java/Storage/Test09.java @@ -70,7 +70,7 @@ public class Test09 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -104,7 +104,7 @@ public class Test09 implements StorageTest { // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.READ ); + pArgs[1] = Integer.valueOf( ElementModes.READ ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) diff --git a/odk/examples/java/Text/GraphicsInserter.java b/odk/examples/java/Text/GraphicsInserter.java index 0bcdcfa12443..82a263866e57 100644 --- a/odk/examples/java/Text/GraphicsInserter.java +++ b/odk/examples/java/Text/GraphicsInserter.java @@ -150,17 +150,17 @@ public class GraphicsInserter { // Setting the horizontal position xPropSet.setPropertyValue( "HoriOrientPosition", - new Integer( 5500 ) ); + Integer.valueOf( 5500 ) ); // Setting the vertical position xPropSet.setPropertyValue( "VertOrientPosition", - new Integer( 4200 ) ); + Integer.valueOf( 4200 ) ); // Setting the width - xPropSet.setPropertyValue( "Width", new Integer( 4400 ) ); + xPropSet.setPropertyValue( "Width", Integer.valueOf( 4400 ) ); // Setting the height - xPropSet.setPropertyValue( "Height", new Integer( 4000 ) ); + xPropSet.setPropertyValue( "Height", Integer.valueOf( 4000 ) ); } catch ( Exception exception ) { System.out.println( "Couldn't set property 'GraphicURL'" ); exception.printStackTrace( printwriterLog ); diff --git a/odk/examples/java/Text/HardFormatting.java b/odk/examples/java/Text/HardFormatting.java index 5f69d84acac4..6ed8296fa500 100644 --- a/odk/examples/java/Text/HardFormatting.java +++ b/odk/examples/java/Text/HardFormatting.java @@ -119,7 +119,7 @@ public class HardFormatting { com.sun.star.beans.XPropertySet.class, xWordCursor); xPropertySet.setPropertyValue("CharWeight", new Float(com.sun.star.awt.FontWeight.BOLD)); - xPropertySet.setPropertyValue("CharColor", new Integer( 255 ) ); + xPropertySet.setPropertyValue("CharColor", Integer.valueOf( 255 ) ); System.out.println( "Parastyle : " diff --git a/odk/examples/java/Text/SWriter.java b/odk/examples/java/Text/SWriter.java index 393edc1c01d5..4e65ae288fa8 100644 --- a/odk/examples/java/Text/SWriter.java +++ b/odk/examples/java/Text/SWriter.java @@ -156,9 +156,9 @@ public class SWriter { // Change the BackColor try { xTTPS.setPropertyValue("BackTransparent", Boolean.FALSE); - xTTPS.setPropertyValue("BackColor",new Integer(13421823)); + xTTPS.setPropertyValue("BackColor",Integer.valueOf(13421823)); xTTRowPS.setPropertyValue("BackTransparent", Boolean.FALSE); - xTTRowPS.setPropertyValue("BackColor",new Integer(6710932)); + xTTRowPS.setPropertyValue("BackColor",Integer.valueOf(6710932)); } catch (Exception e) { System.err.println("Couldn't change the color " + e); @@ -205,7 +205,7 @@ public class SWriter { // Change the CharColor and add a Shadow try { - xTCPS.setPropertyValue("CharColor",new Integer(255)); + xTCPS.setPropertyValue("CharColor",Integer.valueOf(255)); xTCPS.setPropertyValue("CharShadowed", Boolean.TRUE); } catch (Exception e) { System.err.println("Couldn't change the color " + e); @@ -315,7 +315,7 @@ public class SWriter { // Change the CharColor and add a Shadow try { - xTCPS.setPropertyValue("CharColor",new Integer(65536)); + xTCPS.setPropertyValue("CharColor",Integer.valueOf(65536)); xTCPS.setPropertyValue("CharShadowed", Boolean.FALSE); } catch (Exception e) { System.err.println("Couldn't change the color " + e); @@ -374,7 +374,7 @@ public class SWriter { com.sun.star.beans.XPropertySet xTPS = UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xTC); try { - xTPS.setPropertyValue("CharColor",new Integer(16777215)); + xTPS.setPropertyValue("CharColor",Integer.valueOf(16777215)); } catch (Exception e) { System.err.println(" Exception " + e); e.printStackTrace(System.err); diff --git a/odk/examples/java/Text/StyleCreation.java b/odk/examples/java/Text/StyleCreation.java index 04207407c41d..2861131aed0e 100644 --- a/odk/examples/java/Text/StyleCreation.java +++ b/odk/examples/java/Text/StyleCreation.java @@ -102,10 +102,10 @@ public class StyleCreation { xPropertySet.setPropertyValue("CharAutoKerning", Boolean.TRUE ); System.out.println( "set the paragraph attribute 'AutoKerning'" ); xPropertySet.setPropertyValue("ParaAdjust", - new Integer( com.sun.star.style.ParagraphAdjust.CENTER_value ) ); + Integer.valueOf( com.sun.star.style.ParagraphAdjust.CENTER_value ) ); System.out.println( "set the paragraph adjust to LEFT" ); - xPropertySet.setPropertyValue("ParaFirstLineIndent", new Integer( 0 ) ); + xPropertySet.setPropertyValue("ParaFirstLineIndent", Integer.valueOf( 0 ) ); System.out.println( "set the first line indent to 0 cm" ); xPropertySet.setPropertyValue("BreakType", diff --git a/odk/examples/java/Text/TextReplace.java b/odk/examples/java/Text/TextReplace.java index 4566130870b2..0e87656ebd0e 100644 --- a/odk/examples/java/Text/TextReplace.java +++ b/odk/examples/java/Text/TextReplace.java @@ -113,10 +113,10 @@ public class TextReplace { com.sun.star.beans.XPropertySet xCPS = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xTextCursor); // Set the word blue - xCPS.setPropertyValue( "CharColor", new Integer( 255 ) ); + xCPS.setPropertyValue( "CharColor", Integer.valueOf( 255 ) ); // Go to last character xTextCursor.gotoEnd(false); - xCPS.setPropertyValue( "CharColor", new Integer( 0 ) ); + xCPS.setPropertyValue( "CharColor", Integer.valueOf( 0 ) ); xText.insertString( xTextCursor, "in the alley. Like lightening he darted off to the left and disappeared between the two warehouses almost falling over the trash can lying in the ", false ); @@ -124,10 +124,10 @@ public class TextReplace { xCPS = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xTextCursor); // Set the word blue - xCPS.setPropertyValue( "CharColor", new Integer( 255 ) ); + xCPS.setPropertyValue( "CharColor", Integer.valueOf( 255 ) ); // Go to last character xTextCursor.gotoEnd(false); - xCPS.setPropertyValue( "CharColor", new Integer( 0 ) ); + xCPS.setPropertyValue( "CharColor", Integer.valueOf( 0 ) ); xText.insertString( xTextCursor, "of the sidewalk.", false ); diff --git a/odk/examples/java/ToDo/ToDo.java b/odk/examples/java/ToDo/ToDo.java index e40dfc8873f4..de80b92b213d 100644 --- a/odk/examples/java/ToDo/ToDo.java +++ b/odk/examples/java/ToDo/ToDo.java @@ -270,7 +270,7 @@ public class ToDo { // Changing the background color of the cell to white xpropertyset.setPropertyValue( "CellBackColor", - new Integer( 16777215 ) ); + Integer.valueOf( 16777215 ) ); // Getting the cell of the bug id XCell xcell = xcellrange.getCellByPosition( @@ -503,7 +503,7 @@ public class ToDo { // Changing the background color of the cell // to red xpropertyset.setPropertyValue( - "CellBackColor", new Integer( 16711680 ) ); + "CellBackColor", Integer.valueOf( 16711680 ) ); } else { // Querying for the interface XColumnRowRange // on the XCellRange @@ -720,7 +720,7 @@ public class ToDo { // Getting the Easter sunday Double dEasterSunday = ( Double ) xfunctionaccess.callFunction( - "EASTERSUNDAY", new Object[] { new Integer(intYear) }); + "EASTERSUNDAY", new Object[] { Integer.valueOf(intYear) }); int intEasterSunday = (int)Math.round( dEasterSunday.doubleValue()); @@ -729,9 +729,9 @@ public class ToDo { vectorHolidays.add( xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( intYear ), - new Integer( 1 ), - new Integer( 1 ) } )); + Integer.valueOf( intYear ), + Integer.valueOf( 1 ), + Integer.valueOf( 1 ) } )); // Good Friday vectorHolidays.add( @@ -745,9 +745,9 @@ public class ToDo { vectorHolidays.add( xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( intYear ), - new Integer( 5 ), - new Integer( 1 ) } )); + Integer.valueOf( intYear ), + Integer.valueOf( 5 ), + Integer.valueOf( 1 ) } )); // Ascension Day vectorHolidays.add(new Double(intEasterSunday + 39 )); @@ -759,25 +759,25 @@ public class ToDo { vectorHolidays.add( xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( intYear ), - new Integer( 10 ), - new Integer( 3 ) } )); + Integer.valueOf( intYear ), + Integer.valueOf( 10 ), + Integer.valueOf( 3 ) } )); // Christmas Day First vectorHolidays.add( xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( intYear ), - new Integer( 12 ), - new Integer( 25 ) } )); + Integer.valueOf( intYear ), + Integer.valueOf( 12 ), + Integer.valueOf( 25 ) } )); // Christmas Day Second vectorHolidays.add( xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( intYear ), - new Integer( 12 ), - new Integer( 26 ) } )); + Integer.valueOf( intYear ), + Integer.valueOf( 12 ), + Integer.valueOf( 26 ) } )); } } catch( Exception exception ) { @@ -805,14 +805,14 @@ public class ToDo { Double dDate = ( Double ) xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( gregCalStartDate.get( Calendar.YEAR ) ), - new Integer( gregCalStartDate.get( Calendar.MONTH ) + 1 ), - new Integer( gregCalStartDate.get( Calendar.DATE ) ) + Integer.valueOf( gregCalStartDate.get( Calendar.YEAR ) ), + Integer.valueOf( gregCalStartDate.get( Calendar.MONTH ) + 1 ), + Integer.valueOf( gregCalStartDate.get( Calendar.DATE ) ) } ); Double dWorkday = ( Double ) xfunctionaccess.callFunction( "com.sun.star.sheet.addin.Analysis.getWorkday", - new Object[] { dDate, new Integer( intDays ), objectHolidays } ); + new Object[] { dDate, Integer.valueOf( intDays ), objectHolidays } ); Double dYear = ( Double ) xfunctionaccess.callFunction( "YEAR", new Object[] { dWorkday } ); @@ -854,7 +854,7 @@ public class ToDo { while ( dHolidayStart != 0 ) { if ( dHolidayEnd == 0 ) { vectorHolidays.add( - new Integer( (int) Math.round( + Integer.valueOf( (int) Math.round( dHolidayStart ) ) ); } else { |